Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#15282 - [mkinitcpio] Latest initrd not recognising usb storage devices?

Attached to Project: Arch Linux
Opened by James Bannon (jamesbannon) - Saturday, 27 June 2009, 06:34 GMT
Last edited by Thomas Bächler (brain0) - Sunday, 28 June 2009, 19:21 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture i686
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Just installed 2.6.30 with all the necessary files. Everything seemed fine, except for one thing: my external USB hard drive is no longer recognised on boot.


Additional info:
* package version(s)

mkinitcpio 0.5.25-1
kernel26 2.6.30-5
udev 141-3

* config and/or log files etc.
fstab:
# <file system> <dir> <type> <options> <dump> <pass>
none /dev/pts devpts defaults 0 0
none /dev/shm tmpfs rw,noexec,nosuid 0 0

#/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
#/dev/fd0 /media/fl auto user,noauto 0 0

UUID=139cf76d-425a-4c40-a5b1-bbbf22533d9a /boot ext4 defaults 0 1
UUID=4eddd177-23f6-49ab-a8ad-d3e1303133e0 / ext4 defaults 0 1
UUID=ED83-B8D4 /media/flash vfat rw,user,noauto 0 0
#UUID=ac46c6ae-d9eb-47d4-809b-19a2484b3133 /iomega ext4 rw,noexec,nosuid 0 1
UUID=ac46c6ae-d9eb-47d4-809b-19a2484b3133 /media/iomega ext4 rw,user,noauto 0 0
UUID=da9e741f-3525-47c6-8c7f-edf1ded00e7a swap swap defaults 0 0

HOOKS line from mkinitcpio.conf:
HOOKS="base udev autodetect pata scsi sata usb keymap filesystems"

Steps to reproduce:
Build the system & set the fstab to mount the external USB hard drive on boot.

On boot the fsck fails because the device is not recognised. The device is in perfect working order & is fine with being automounted by HAL.

When the check fails and I login @ the single user prompt, I can mount the device simply using mount -a after I remount / rw. The device also appears in /dev/disk/by-uuid.

This may be a USB timing issue (I see an older open item with that, but I wasn't having that problem until I upgraded to the new kernel).
This task depends upon

Closed by  Thomas Bächler (brain0)
Sunday, 28 June 2009, 19:21 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Deferred to mailing list, this is a problem, but none that is that easily solved. What do other distributions do here?
Comment by Thomas Bächler (brain0) - Sunday, 28 June 2009, 12:37 GMT
You can never rely on external hard drives to show up "in time".

The difference was that adding the "usb" hook to mkinitcpio used to add a 6 second delay on boot by default, this doesn't happen anymore. I think external drives simply don't belong in fstab, because there's too many possible race conditions. If you insist, you can try to force the usb storage driver to scan for devices sooner after detection, see the delay_use parameter to the usb-storage module.
Comment by James Bannon (jamesbannon) - Sunday, 28 June 2009, 18:11 GMT
Ah, I thought it might be a timing / race issue. No matter, I've set the device so that it loads when I fire up GNOME. That will do.

You may close this if you wish and mark it as a non-bug.
Comment by Thomas Bächler (brain0) - Sunday, 28 June 2009, 19:20 GMT
Okay, before I close this, I need to write down a longer explanation as to why we cannot solve this issue cleanly:

We don't parse fstab ourselves, but two commands do: fsck and mount - they act upon all entries in fstab that haven't been marked "noauto". A better behaviour would be to allow fsck and mount to delay mounting non-essential devices or wait until essential ones show up.

To get this functionality, we either have to parse fstab ourselves and check the availability of all devices, then let fsck/mount parse fstab again - or we have to implement such functions in fsck and mount. IMO, upstream should handle non-existent devices better, right now fsck and mount just have an exit code indicating failure. I recommend only putting essential devices in fstab and handle everything else differently. If you want, we can discuss this problem on the arch-general mailing list, the bug tracker is not the right place.

Loading...