Reply
Thread Tools
Posts: 49 | Thanked: 3 times | Joined on Jul 2007
#1
Hi. I have been trying to set up my new kingston 1gig memory card on my 770 so that I can boot from it using the following tutorial:

http://maemo.org/community/wiki/howt...from_mmc_card/

I have had a few roadblocks along the way, but members from this forum have been very helpful so far, and now I have found a new roadblock at the mounting step after installing the initfs_flasher.
I answered all the questions and rebooted. I succesfully ran this line insmod /mnt/initfs/lib/modules/current/ext2.ko , but when trying to mount (mount /dev/mmcblk0p2 /opt ), I get one of the following errors. Either:
mount: Mounting /dev/mmcblk0p2 on /opt failed: No such file or directory
Or, if I type: mount /dev/mmcblk0p2 without the /opt option, I get :
Can't find /dev/mmcblk0p2 in /etc/fstab.

I am soooo close to finishing this. Please help me get over this hump !!!!
Should I format the memory card and try all the steps again from the begining ???, or is there an easy solution to this ???
Also, is there a tutorial for the xterm commands ??. I would love to know the commands for exploring folders and files, and deleting files, looking at the directory structure of a folder, etc.
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#2
Have you created the /opt directory as it explains immediately following the insmod command?

Code:
# insmod /mnt/initfs/lib/modules/current/ext2.ko
# mkdir /opt/
# mount /dev/mmcblk0p2 /opt
# mkdir /floppy/
# mount -t jffs2 /dev/mtdblock4 /floppy
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#3
List a directory

Simple:
Code:
ls
(that's the letter L, lowercase)

Long:
Code:
ls -la
Long, with most recently modified file listed last
Code:
ls -lart
Remove files/directories

File:
Code:
rm <filename>
eg. rm test.dat

Directory:
Code:
rm -fr <directory name>
Make a directory

Code:
mkdir <directory name>
eg. mkdir mydata

Change directory
Code:
cd <new directoryname>
eg cd ../user (change up one level and down into the user directory) or
cd /tmp (change to the /tmp directory)

The rest (including the above) is basic Unix/Linux, and not specific to xterm - you should find some Linux tutorials on the internet.

Standard Disclaimer: Be careful when deleting files/directories as you may risk making your device unbootable (you'll need to reflash it to recover).
 
Posts: 49 | Thanked: 3 times | Joined on Jul 2007
#4
Originally Posted by Milhouse View Post
Have you created the /opt directory as it explains immediately following the insmod command?

Code:
# insmod /mnt/initfs/lib/modules/current/ext2.ko
# mkdir /opt/
# mount /dev/mmcblk0p2 /opt
# mkdir /floppy/
# mount -t jffs2 /dev/mtdblock4 /floppy
when I try to create the /opt directory immediately following the insmod command, it comes up with the following error :
mkdir: Cannot create directory /opt/': File exists
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#5
OK, do you have two partitions created on your external memory card? The first partition should be formatted with FAT, the second formatted with ext2.

If you're not sure, run this command

Code:
sfdisk -L --force /dev/mmcblk0
and paste the results here (press ctrl-c to exit from the sfdisk prompt).
 
Posts: 49 | Thanked: 3 times | Joined on Jul 2007
#6
Originally Posted by Milhouse View Post
OK, do you have two partitions created on your external memory card? The first partition should be formatted with FAT, the second formatted with ext2.

If you're not sure, run this command

Code:
sfdisk -L --force /dev/mmcblk0
and paste the results here (press ctrl-c to exit from the sfdisk prompt).
O.K. I ran the sfdisk command and here are my results:

/ # sfdisk -L --force /dev/mmcblk0
Checking that no-one is using this disk right now ...
BLKRRPART: Device or resource busy

This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.

Disk /dev/mmcblk0: 30864 cylinders, 4 heads, 16 sectors/track
Old situation:
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/mmcblk0p1 1 15000 15000 480000 6 FAT16
/dev/mmcblk0p2 15001 30863 15863 507616 83 Linux
/dev/mmcblk0p3 0+ 0 1- 31+ 83 Linux
/dev/mmcblk0p4 0 - 0 0 0 Empty
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>)

Last edited by fibroman; 2007-07-08 at 20:12.
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#7
OK, so you have a second Linux partition... the directory exists... all should work. Have you formatted it with ext2? Beyond that, I don't know what the problem is... check you are typing the commands correctly.
 
Posts: 49 | Thanked: 3 times | Joined on Jul 2007
#8
Originally Posted by Milhouse View Post
OK, so you have a second Linux partition... the directory exists... all should work. Have you formatted it with ext2? Beyond that, I don't know what the problem is... check you are typing the commands correctly.
O.K. well here is exactly what I am doing:
I boot up, then open x-term, then go to root by typing sudo gainroot, it then says Root shell enabled.
I then type in insmod /mnt/initfs/lib/modules/current/ext2.ko. It accepts it and says: Using /mnt/initfs/lib/modules/current/ext2.ko.
Then I try to make the /opt/ directory. I type in: mkdir /opt/ , and this is where I get the error : mkdir: Cannot create directory /opt/': File exists.

Does that mean that I already have the /opt/ directory made ?? And if so, should I find it and delete it and make it again ??

Or would it be better to format the whole memory card and start the whole process over from scratch ?? Is this possible and is it safe ??
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#9
Originally Posted by fibroman View Post
Does that mean that I already have the /opt/ directory made ?? And if so, should I find it and delete it and make it again ??
Yes - that means it's already there. You can delete it and try again if you want (rm -fr /opt) but only do this if you're sure (getting it wrong could mean bad things happen).

Originally Posted by fibroman View Post
Or would it be better to format the whole memory card and start the whole process over from scratch ?? Is this possible and is it safe ??
Have you formatted the second partition on the memory card with the ext2 filesystem yet? If not, you should go ahead and do that before attempting to mount /opt (it's safe - as long as you don't make any mistakes - and it will of course delete all data in the second partition on you memory card).
 
Posts: 49 | Thanked: 3 times | Joined on Jul 2007
#10
Originally Posted by Milhouse View Post
Yes - that means it's already there. You can delete it and try again if you want (rm -fr /opt) but only do this if you're sure (getting it wrong could mean bad things happen).



Have you formatted the second partition on the memory card with the ext2 filesystem yet? If not, you should go ahead and do that before attempting to mount /opt (it's safe - as long as you don't make any mistakes - and it will of course delete all data in the second partition on you memory card).
What is the command to format the second partition on the memory card with the ext2 filesystem ?
I have followed the tutorial and every previous step up to the mount problem has been completed succesfully as far as I can tell. What are the ramifications of starting the whole tutorial over from the begining, even though I am so far through it already. Each time I boot up I get the boot menu first before it loads up. Would this be a problem if I wanted to start all over??
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:14.