getting udev to mount a slow usb sdhc card on boot...
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.
Once the boot process has completed I can log in as root and execute
and all is well giving me the mtab that I need:
Help appreciated guys!
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)
/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?)
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.
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.
I must investigate this approach; thank you for the suggestion.
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?
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).
|All times are GMT -5. The time now is 12:56 PM.|