I have built a Gentoo install for my EeePC and am very happy with it overall; everything I need working except a small udev boot issue:

on boot I want the main root to be on the internal sdhc /dev/sda2 and boot is at /dev/sda1 - these are found and work fine from grub and the boot proceeds normally. However conscious of space I have elected to put /home and /tmp on an 8GB SDHC that inserts into the internal slot.

Depending on what other usb disks are inserted this disk gets a different /dev/sd? and therefore I wrote a simple 10local.rule udev rule.

So how do I make sure that the internal card is ready and/or able to be mounted during boot by udev - or should I get it to delay the mounting of home and tmp till later in the process to give the usb bus time to catch up with the disk??

Help appreciated guys!

aus9

05-21-2008 07:35 AM

until you get a better reply I suggest a work a round

1) boot process with init and all that stuff wants to find and mount the root system

2) so why not create back on your internal drive..../home and /tmp and refix your /etc/fstab to point to those files.

the part A....in /etc/rc.local with already root created folders (say)
/home2
/tmp2

/bin/mount -t /dev/sd1 /home2
/bin/mount -t /dev/sd2 /tmp2

note when you look at /var/log/syslog....your usb system is not available for quite a while so by running it in rc.local you give it the max time to settle

3) if that fails still keep internal fstab etc and manually mount on boot up

4) I am sure you have your reasons for choosing gentoo but consider dsl or puppy pls as they are better suited to run on small footprints (puppy small footprints get it?)

stardotstar

05-22-2008 05:51 AM

Great answer; thank you.

1) true; very relevant in this context
2) very true - mount bind them after booting with a script?
3) good fallback - might even work better as a bind mount with the basics there as fallback.
4) yeah I just like gentoo and thought of it as a challenge to cram it onto the lil 'puter 'cause that is the linux I like to use day to day.
Portage is all mount bind to an external disk and it seems to be working pretty well for me.

Thanks again for the help; I will try these suggestions.

Will

jschiwal

05-22-2008 06:10 AM

Would it help to simply use "UUID=" instead of the device entry in /etc/fstab. You can use "udevinfo -q env -n <device node>" and take the number from the FS_UUID line. This will alleviate the problem with the device node being different. It may solve the your other problem as well. This is a lot easier than mounting from a udev rule.

stardotstar

05-24-2008 06:36 PM

I must investigate this approach; thank you for the suggestion.

Will

jakemagee

05-06-2009 12:42 AM

Has anyone found a solution to this problem?

I have the same issue trying to mount a usb key and a sdcard on boot. It appears that the issue might have to do with the "Mounting USB device filesystem (usbfs)" being executed after fstab has been parsed. It looks like the usb devices are not ready somehow.

I did try editing localmount to move usbfs ahead of fstab, however this did not fix the issue.

Is there not a standard way to mount usb devices on boot with fstab?

jakemagee

12-01-2009 09:06 PM

Ok, so I finally got around to looking at the issue again.

The solution is to add rootdelay=X to the kernel boot parameters (X in seconds). This is in the kernel docs, kernel-parameters. Add enough time to allow the usb devices to come up (this was the issue).