Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with Gentoo on USB flash drive
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
rainbow82
n00b
n00b


Joined: 19 Jul 2011
Posts: 6

PostPosted: Tue Jul 19, 2011 5:16 pm    Post subject: Problem with Gentoo on USB flash drive Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Wed Jul 20, 2011 12:00 am    Post subject: Reply with quote

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
View user's profile Send private message
rainbow82
n00b
n00b


Joined: 19 Jul 2011
Posts: 6

PostPosted: Wed Jul 20, 2011 8:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Wed Jul 20, 2011 9:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
rainbow82
n00b
n00b


Joined: 19 Jul 2011
Posts: 6

PostPosted: Thu Jul 21, 2011 8:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Thu Jul 21, 2011 10:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Thu Jul 21, 2011 11:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
rainbow82
n00b
n00b


Joined: 19 Jul 2011
Posts: 6

PostPosted: Fri Jul 22, 2011 4:36 pm    Post subject: Reply with quote

Hi all, I finally got the system working!! :D

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Fri Jul 22, 2011 5:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
rainbow82
n00b
n00b


Joined: 19 Jul 2011
Posts: 6

PostPosted: Fri Jul 22, 2011 7:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Jul 22, 2011 8:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
rainbow82
n00b
n00b


Joined: 19 Jul 2011
Posts: 6

PostPosted: Fri Jul 22, 2011 10:23 pm    Post subject: Reply with quote

Here they are:

.config
http://paste.pocoo.org/show/444545/


lspci
http://paste.pocoo.org/show/444546/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum