maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Troubleshooting (https://talk.maemo.org/forumdisplay.php?f=6)
-   -   You guys have been great, but new Mount error !! (https://talk.maemo.org/showthread.php?t=7432)

fibroman 2007-07-08 18:09

You guys have been great, but new Mount error !!
 
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.

Milhouse 2007-07-08 18:26

Re: You guys have been great, but new Mount error !!
 
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


Milhouse 2007-07-08 18:34

Re: You guys have been great, but new Mount error !!
 
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).

fibroman 2007-07-08 19:26

Re: You guys have been great, but new Mount error !!
 
Quote:

Originally Posted by Milhouse (Post 57960)
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

Milhouse 2007-07-08 19:35

Re: You guys have been great, but new Mount error !!
 
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).

fibroman 2007-07-08 20:02

Re: You guys have been great, but new Mount error !!
 
Quote:

Originally Posted by Milhouse (Post 57980)
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>)

Milhouse 2007-07-08 20:29

Re: You guys have been great, but new Mount error !!
 
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.

fibroman 2007-07-08 20:50

Re: You guys have been great, but new Mount error !!
 
Quote:

Originally Posted by Milhouse (Post 57992)
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 ??

Milhouse 2007-07-08 21:02

Re: You guys have been great, but new Mount error !!
 
Quote:

Originally Posted by fibroman (Post 58003)
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).

Quote:

Originally Posted by fibroman (Post 58003)
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).

fibroman 2007-07-08 21:12

Re: You guys have been great, but new Mount error !!
 
Quote:

Originally Posted by Milhouse (Post 58012)
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??

Milhouse 2007-07-08 21:31

Re: You guys have been great, but new Mount error !!
 
It's linked from the tutorial - follow the link in the section titled "Second: you need to partition your MMC !".

There should be no problems starting from scratch, although some directories you have previously created may be present so just be prepared to see a few "directory already exists" type errors when creating (mkdir) directories.

fibroman 2007-07-08 22:46

Re: You guys have been great, but new Mount error !!
 
Quote:

Originally Posted by Milhouse (Post 58012)
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).

O.K. I went back and properly formatted the second partition on the memory card with the ext2 filesystem. I then was finally able to mount /opt !!!
But now, I am stuck at the step just before I clone the system to the memory card.
I have typed in the following lines without a problem:
# apt-get -d install tar
# cd /var/cache/apt/archives/
# mkdir /tar-temp/
These all worked fine, but after typing the next line: # dpkg -x tar*.deb /tar-temp/
I get the following error: dpkg-deb: failed to read archive tar*.deb': No such file or directory.

If I can get passed this I think I am home free !!!!

Milhouse 2007-07-08 23:20

Re: You guys have been great, but new Mount error !!
 
Is your current directory correct? Check it with the command "pwd"

Your current directory should be "/var/cache/apt/archives" - if it is, then check what files are in that directory by typing "ls -la" and pasting the output here.

3. If you're in the correct directory and you can't see the tar*.deb file (it will be called something like tar_1.14-2.1osso_armel.deb) then double check that you downloaded it correctly when you ran "apt-get -d install tar"

fibroman 2007-07-09 00:56

Re: You guys have been great, but new Mount error !!
 
Quote:

Originally Posted by Milhouse (Post 58051)
Is your current directory correct? Check it with the command "pwd"

Your current directory should be "/var/cache/apt/archives" - if it is, then check what files are in that directory by typing "ls -la" and pasting the output here.

3. If you're in the correct directory and you can't see the tar*.deb file (it will be called something like tar_1.14-2.1osso_armel.deb) then double check that you downloaded it correctly when you ran "apt-get -d install tar"


When I run apt-get -d install tar, this is what it says:
Reading package lists ... Done
Building dependency tree... Done
Note, selecting busybox instead of tar
busybox is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Does this mean that the tar*.deb file was not sucessfully downloaded ??

fibroman 2007-07-09 01:04

Re: You guys have been great, but new Mount error !!
 
Quote:

Originally Posted by Milhouse (Post 58051)
Is your current directory correct? Check it with the command "pwd"

Your current directory should be "/var/cache/apt/archives" - if it is, then check what files are in that directory by typing "ls -la" and pasting the output here.

3. If you're in the correct directory and you can't see the tar*.deb file (it will be called something like tar_1.14-2.1osso_armel.deb) then double check that you downloaded it correctly when you ran "apt-get -d install tar"

This is what is currently in my /var/cache/apt/archives directory:

/var/cache/apt/archives # ls -la
drwxr-xr-x 3 root root 0 Jul 7 06:05 .
drwxr-xr-x 3 root root 0 Jul 7 06:05 ..
-rw-r----- 1 root root 0 Jul 7 06:05 lock
drwxr-xr-x 2 root root 0 Jul 7 06:04 partial
/var/cache/apt/archives #

It does not look like I have succesfully downloaded the tar*.deb file.
I have made sure that I am connected to the internet when I try to apt-get command, so I do not know what else I should do to find the tar*deb file.

Milhouse 2007-07-09 03:04

Re: You guys have been great, but new Mount error !!
 
1 Attachment(s)
I really don't know what you've done... I have you didn't run "apt-get install tar" by mistake as you don't seem to have downloaded tar at all. I've attached a copy to this message which may work for you instead.

Unzip tar from the attached file and when it's on your 770, execute "chmod +x tar" as root.

fibroman 2007-07-09 09:08

Re: You guys have been great, but new Mount error !!
 
Quote:

Originally Posted by Milhouse (Post 58104)
I really don't know what you've done... I have you didn't run "apt-get install tar" by mistake as you don't seem to have downloaded tar at all. I've attached a copy to this message which may work for you instead.

Unzip tar from the attached file and when it's on your 770, execute "chmod +x tar" as root.


Thanks for the tar file. I have downloaded and unziped it on my 770, and executed the chmod +x tar command.
The tar file is sitting in MyDocs/.documents directory. Do I need to move it to another directory and if so, what are the commands for doing it.
What is supposed to happen next ?
should I now skip this command : # dpkg -x tar*.deb /tar-temp/
and go directly to this command : # /tar-temp/bin/tar cf - -C /floppy . | /tar-temp/bin/tar xvf - -C /opt

Milhouse 2007-07-09 14:12

Re: You guys have been great, but new Mount error !!
 
Use "mv <sourcepath> <destinationpath>" to move a file Unix, or "cp <sourcepath> <destinationpath>" to copy a file.

You need to create the following directory:

Code:

mkdir /tar-temp/bin
Then move the tar file executable to the /tar-temp/bin directory using the following command (which assumes your current directory is MyDocs/.documents)

Code:

mv tar /tar-temp/bin
Then continue with the "/tar-temp/bin/tar cf - -C ..." command, you're now done with dpkg.

fibroman 2007-07-09 18:36

Re: You guys have been great, but new Mount error !!
 
Quote:

Originally Posted by Milhouse (Post 58218)
Use "mv <sourcepath> <destinationpath>" to move a file Unix, or "cp <sourcepath> <destinationpath>" to copy a file.

You need to create the following directory:

Code:

mkdir /tar-temp/bin
Then move the tar file executable to the /tar-temp/bin directory using the following command (which assumes your current directory is MyDocs/.documents)

Code:

mv tar /tar-temp/bin
Then continue with the "/tar-temp/bin/tar cf - -C ..." command, you're now done with dpkg.

O.K. I am DONE !!!! With your help, I have finally completed this !!!!
I have sucessfully transfered the system to the Memory card and have booted directly to the card !!!
I just want to thank you for your patience with me, and your continued support. I hope that I become savy enough with this operating system, so that I may help others in the future, like you helped me.


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

vBulletin® Version 3.8.8