View previous topic :: View next topic |
Author |
Message |
rainbow82 n00b
Joined: 19 Jul 2011 Posts: 6
|
Posted: Tue Jul 19, 2011 5:16 pm Post subject: Problem with Gentoo on USB flash drive |
|
|
Hi I installed Gentoo on a USB flash drive using a liveCD after following all the steps given in installation documents. When I completed the install and tried to boot from the USB flash drive, after selecting gentoo on LILO, I got the following error:
VFS: Cannot open root device "823" or unknown-block (8,35)
Please append a correct "root=" boot option; here are the available partitions":
0800 31808 sda driver: sd
0801 31728 sda1 <something here.......>
Kernel panic- not syncing: VFS: Unable to mount root fs on unknown block (8, 35)
Pid: 1, comm: swapper Not tainted 2.6.38-gentoo-r6 #1
<something after this....>
I have partitioned the device in the following way:
/dev/sdc1 boot ext2
/dev/sdc2 swap
/dev/sdc3 root ext3
Here is the lilo.conf I used:
boot=/dev/sdc
prompt
timeout=50
default=gentoo
image=/boot/bzImage.manual #name of my kernel image
label=gentoo
read-only
root=/dev/sdc3
Is the installation procedure for a flash drive different from that of a hard drive? Am I writing lilo.conf wrong?
Please help me with this.. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Jul 20, 2011 12:00 am Post subject: |
|
|
boot=/dev/sdc
timeout=50
default=gentoo
image=/boot/bzImage.manual #name of my kernel image
label=gentoo
read-only
root=/dev/sdc3
append = rootdelay=10 usb drives need a delay, leave to you where to put this line (I do grub) _________________ Defund the FCC. |
|
Back to top |
|
|
rainbow82 n00b
Joined: 19 Jul 2011 Posts: 6
|
Posted: Wed Jul 20, 2011 8:41 pm Post subject: |
|
|
Hi the append="rootdelay=10" didn't work, still got the same root file system error. While browsing on forums I tried compiling kernel using 'genkernel' option, but didn't work either. I did emerge xz-utils but even then it gave me the following error:
lzma: (stdin): Cannot allocate memory
make[2]: *** [arch/x86/boot/compressed/vmlinux.bin.lzma] Error 1
make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [bzImage] Error 2
* Gentoo Linux Genkernel; Version 3.4.16
* Running with options: all
*ERROR: Failed to compile the "bzImage" target...
* -- End log... --
Is there a way out?
Please help me... |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Wed Jul 20, 2011 9:17 pm Post subject: |
|
|
rainbow82,
unknown-block (8,35) means /dev/sdc3 See /usr/src/linux/Documentation/devices.txt
The lines Code: | 0800 31808 sda driver: sd
0801 31728 sda1 <something here.......> | tell that only /dev/sda and partition /dev/sda1 were found.
When you boot from a USB device, it will become /dev/sda
Build your kernel by hand, or follow kernel-seeds.org but be sure to include eveything needed to support USB and USB storage as <*>
You will need the append = "rootdelay=10" too as the kernel normally tries to mount root before it starts USB. This is a bad thing when root is on USB.
The rootdelay allows USB to start before the kernel looks for its root filesystem.
Don't forget to run /sbin/lilo every time you change /etc/lilo.conf or your kernel. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
rainbow82 n00b
Joined: 19 Jul 2011 Posts: 6
|
Posted: Thu Jul 21, 2011 8:58 pm Post subject: |
|
|
Thanks NeddySeagoon...
By the way, would there be a speed improvement if I use a compact flash card instead of a USB. And, would the install work if I just copy an 'install' from a USB to a compact flash? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Thu Jul 21, 2011 10:36 pm Post subject: |
|
|
rainbow82,
Its all FLASH memory. If you invest in fast FLASH memory, it does not matter what the format.
You can copy an install between different media of the same size with dd. However the copy may not boot.
Compact FLASH cards have different names to USD storage devices, so you would need to fix /etc/fstab and grub.conf to allow for that.
You would also need to find a way to boot from compact flash.
IF your flash devices are different sizes, use cp -a or tar or rsync to copy the filesystem space, then chroot into the copy and install grub to the MBR. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Jul 21, 2011 11:38 pm Post subject: |
|
|
Quote: | would there be a speed improvement if I use a compact flash card instead of a USB | another factor: how fast is the card reader? _________________ Defund the FCC. |
|
Back to top |
|
|
rainbow82 n00b
Joined: 19 Jul 2011 Posts: 6
|
Posted: Fri Jul 22, 2011 4:36 pm Post subject: |
|
|
Hi all, I finally got the system working!!
The 'rootdelay=10' actually worked, however I could not realize it initially. Actually, the system hung similar to when it hung first--I mentioned in my first post. This time, however, it showed me correct partitions but with some different names--b401, b402, b403--instead of /dev/sda1, /dev/sda2, /dev/sda3. I changed "root=b403" (root file system partition) in the grub.conf (I am using grub this time), and it worked!!
Can anybody please tell me why the kernel does not recognize /dev/sd* ?
And, thanks for all the help..
By compact flash and USB I mean, if the interfaces are different, would there be a change in speed? (The compact flash module is integrated in the PC-104 board) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Fri Jul 22, 2011 5:52 pm Post subject: |
|
|
rainbow82,
Please put your kernel .config file on a pastebin. I suspect you are using the slow USB block driver rather than the SCSI layer.
Your lspci will help too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
rainbow82 n00b
Joined: 19 Jul 2011 Posts: 6
|
Posted: Fri Jul 22, 2011 7:56 pm Post subject: |
|
|
Here is my grub.conf
Code: | default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux 2.6.34-r1
root (hd0,0)
kernel /boot/bzImage.manual root=b403 rootdelay=10 #bzImage.manual is the name of my kernel image |
|
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Fri Jul 22, 2011 8:34 pm Post subject: |
|
|
boot to cli and internet connection, then run
Code: | emerge wgetpaste pciutils
wgetpaste /usr/src/linux/.config
lspci -k | wgetpaste | Post the url's returned _________________ Defund the FCC. |
|
Back to top |
|
|
rainbow82 n00b
Joined: 19 Jul 2011 Posts: 6
|
|
Back to top |
|
|
|