Hi all,
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.
Code:
mineeepc ~ # cat /etc/udev/rules.d/10-local.rules
SUBSYSTEMS=="usb", ATTRS{serial}=="146030377350", KERNEL=="sd?", NAME="%k", SYMLINK="sdhc"
SUBSYSTEMS=="usb", ATTRS{serial}=="146030377350", KERNEL=="sd?1", NAME="%k", SYMLINK="sdhc1"
SUBSYSTEMS=="usb", ATTRS{serial}=="146030377350", KERNEL=="sd?2", NAME="%k", SYMLINK="sdhc2"
SUBSYSTEMS=="usb", ATTRS{serial}=="146030377350", KERNEL=="sd?3", NAME="%k", SYMLINK="sdhc3"
SUBSYSTEMS=="usb", ATTRS{serial}=="100", ATTRS{manufacturer}=="Myson Century, Inc.", ATTRS{product}=="USB Mass Storage Device", KERNEL=="sd?2", NAME="%k", SYMLINK="bindport"
# mount block device when added
#SUBSYSTEMS=="block", ACTION=="add", RUN+="/usr/local/bin/mount-device.sh /dev/%k"
mineeepc ~ #
This creates a working instance like this:
Code:
mineeepc ~ # ls -l /dev/sdh*
lrwxrwxrwx 1 root root 3 May 9 08:42 /dev/sdhc -> sdb
lrwxrwxrwx 1 root root 4 May 9 08:42 /dev/sdhc1 -> sdb1
lrwxrwxrwx 1 root root 4 May 9 08:42 /dev/sdhc2 -> sdb2
lrwxrwxrwx 1 root root 4 May 9 08:42 /dev/sdhc3 -> sdb3
mineeepc ~ #
However when booting the system reports that local filesystems failed to mount at around the time that the udev rules are initially processed.
Once the boot process has completed I can log in as root and execute
mount /home
mount /tmp
and all is well giving me the mtab that I need:
Code:
mineeepc log # cat /etc/mtab
/dev/sda2 / ext2 rw,noatime 0 0
proc /proc proc rw,nosuid,nodev,noexec 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw,nosuid 0 0
devpts /dev/pts devpts rw,nosuid,noexec 0 0
shm /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0
usbfs /proc/bus/usb usbfs rw,noexec,nosuid,devmode=0664,devgid=85 0 0
/dev/sdc2 /mnt/usbhdd ext2 rw,noatime 0 0
/mnt/usbhdd/maint/bindport /usr/portage none rw,bind,noatime 0 0
/mnt/usbhdd/maint/bindlport /usr/local/portage none rw,bind,noatime 0 0
/mnt/usbhdd/maint/bindvartmp /var/tmp none rw,bind,noatime 0 0
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!