You are not logged in.

#1 2009-06-25 12:02:50

jamesbannon
Member
From: Paisley, Scotland
Registered: 2008-10-24
Posts: 50

Latest Initrd not recognising USB storage devices?

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. Here is my fstab and my mkinitcpio.conf.

# 
# /etc/fstab: static file system information
#
# <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

As you can see from this, I originally had my external usb drive mounted on /iomega @ boot. However, since that no longer works, I have changed it to /media/iomega and let HAL mount it automatically when I fire up GNOME (the same way I have my flash drive set up). I used the original line with 2.6.29 with no problems.

The strange thing is, the device is there, because, when it fails, I go into single user mode, remount / read-write and then run mount -a and the device appears with no errors. If I change the line so it doesn't do an fsck on boot, it doesn't mount the device, but I do get an error saying the device is not there. I can then mount it manually at the command prompt.

The device is shown in /etc/blkid.tab and in /dev/disk/by-uuid.

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES=""

# BINARIES
# This setting includes, into the CPIO image, and additional
# binaries a given user may wish.  This is run first, so may
# be used to override the actual binaries used in a given hook.
# (Existing files are NOT overwritten is already added)
# BINARIES are dependancy parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in anyway.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options,
# like so:
#    FILES="/etc/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'modload' may be used in place of 'udev', but is not recommended
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
#    This setup specifies all modules in the MODULES setting above.
#    No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
#    This setup will autodetect all modules for your system and should
#    work as a sane default
#    HOOKS="base udev autodetect pata scsi sata filesystems"
#
#    This is identical to the above, except the old ide subsystem is
#    used for IDE devices instead of the new pata subsystem.
#    HOOKS="base udev autodetect ide scsi sata filesystems"
#
#    This setup will generate a 'full' image which supports most systems.
#    No autodetection is done.
#    HOOKS="base udev pata scsi sata usb filesystems"
#
#    This setup assembles an pata raid array with an encrypted root FS.
#    Note: See 'mkinitcpio -H raid' for more information on raid devices.
#    HOOKS="base udev pata raid encrypt filesystems"
#
#    This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev usb lvm2 filesystems"
HOOKS="base udev autodetect pata scsi sata usb keymap filesystems"

# COMPRESSION
# Use this to compress the initramfs image. With kernels earlier than
# 2.6.30, only gzip is supported, which is also the default. Newer kernels
# support gzip, bzip2 and lzma.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"

This is essentially the same as I had it in 2.6.29. I did initially use LZMA, since that gives slightly faster compression & decompression, but changed it back in case it was a timing issue (and rebuilt initrd). No joy. I also tried usbdelay=10 on boot, but again no difference.

This isn't exactly a "show-stopper", since the device functions normally otherwise and everything else is fine, but it is annoying. I would much rather have this device available automatically on boot, so that it gets checked when the max mount count comes up.

Offline

#2 2009-06-26 21:59:53

jamesbannon
Member
From: Paisley, Scotland
Registered: 2008-10-24
Posts: 50

Re: Latest Initrd not recognising USB storage devices?

Is anyone having this problem?

Offline

#3 2009-06-27 06:42:11

jamesbannon
Member
From: Paisley, Scotland
Registered: 2008-10-24
Posts: 50

Re: Latest Initrd not recognising USB storage devices?

Never mind. I've logged it as a low priority bug since it's not a show stopper.

Offline

#4 2009-06-27 16:32:10

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Latest Initrd not recognising USB storage devices?

jamesbannon:

I have the same problem only worse!

My usb HDD is not recognized and it is the boot device!!

The boot fails because the root device is not recognized.  I have three HDD's which do not boot, one is an ext4 filesystem type. 

I re-installed into a new HDD with x86-64 system and the same failed boot occurred with the latest kernel.

The other two drives were upgraded to the new kernel and both failed to boot with the same ...root device not recognized.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2009-06-27 17:13:06

Perre
Member
Registered: 2008-01-22
Posts: 189

Re: Latest Initrd not recognising USB storage devices?

I have the same problem as you jamesbannon. It's really annoying. sad

My fstab:

# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0


#/dev/cdrom /media/cdrom   iso9660   ro,user,noauto,unhide   0      0
#/dev/dvd /media/dvd   udf   ro,user,noauto,unhide   0      0
/dev/sda1 /boot ext2 defaults 0 1
/dev/sda2 / ext3 defaults 0 1
/dev/sda3 /var reiserfs defaults 0 1
/dev/sda4 /home ext3 defaults 0 1
/dev/sdb1 /extra ext3 defaults 0 1
#/dev/sdc1 /media/disk ext3 defaults 0 0
UUID=94911fb3-def7-4440-b6a5-5e09f91b19f6 /media/disk ext3 defaults 0 0

#user defined
#/dev/sr0   /media/dvd    auto     defaults,noauto,users,ro   0 0

I originally used #/dev/sdc1 /media/disk ext3 defaults 0 0 to mount the device, but as you can see I've tried using UUID. I still get an error that the special device does not exist when I boot.

Offline

#6 2009-06-28 18:19:31

jamesbannon
Member
From: Paisley, Scotland
Registered: 2008-10-24
Posts: 50

Re: Latest Initrd not recognising USB storage devices?

This was the bug update I received today:

FS#15282 - [mkinitcpio] Latest initrd not recognising usb storage devices?
User who did this - Thomas Bächler (brain0)

----------
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.

You're going to have to modify the delay_use parameter to get it to work. Be prepared for race conditions, though. I didn't bother myself as it wasn't a show stopper for me, so I've advised that it can be closed as a non-bug.

ETA: usbdelay=10 doesn't work as that flag is apparently no longer recognised for some reason.

ETTA: I've always used UUID in the fstab because udev can remap devices on boot (I've had fstab not recognising devices because of this).

In case some people don't know, to see what the uuid for a device is, use the following:

sudo tune2fs -l <device-name>

Last edited by jamesbannon (2009-06-28 18:30:23)

Offline

#7 2009-06-29 02:41:28

jamesbannon
Member
From: Paisley, Scotland
Registered: 2008-10-24
Posts: 50

Re: Latest Initrd not recognising USB storage devices?

Another update (just before the close):

FS#15282 - [mkinitcpio] Latest initrd not recognising usb storage devices?
User who did this - Thomas Bächler (brain0)

----------
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.

Offline

#8 2009-06-29 03:33:19

brenix
Member
From: California
Registered: 2008-03-05
Posts: 185

Re: Latest Initrd not recognising USB storage devices?

Well, im glad I found this post. I was going crazy. My only problem is some daemons look for the files on my external to be able to start properly. I guess Using the autofs daemon is my workaround for now..

Offline

#9 2009-06-29 04:48:19

jamesbannon
Member
From: Paisley, Scotland
Registered: 2008-10-24
Posts: 50

Re: Latest Initrd not recognising USB storage devices?

That might work, provided you can start the daemons after autofs has mounted the filesystem.

Offline

#10 2009-06-29 06:14:52

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Latest Initrd not recognising USB storage devices?

jamesbannon wrote:

In case some people don't know, to see what the uuid for a device is, use the following:

sudo tune2fs -l <device-name>

tune2fs is for ext2/3/4 filesystems only. You can use the blkid command to list block device attributes, including UUIDs.

Offline

#11 2009-07-02 04:12:17

jamesbannon
Member
From: Paisley, Scotland
Registered: 2008-10-24
Posts: 50

Re: Latest Initrd not recognising USB storage devices?

Thanks tomk

Offline

#12 2009-07-02 08:01:49

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Latest Initrd not recognising USB storage devices?

Isn't the problem here that you have the device AT ALL in /etc/fstab. Isn't it the case that HAL doesn't load (at least usb)devices in that file?


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#13 2009-07-12 16:48:13

jamesbannon
Member
From: Paisley, Scotland
Registered: 2008-10-24
Posts: 50

Re: Latest Initrd not recognising USB storage devices?

test1000 wrote:

Isn't the problem here that you have the device AT ALL in /etc/fstab. Isn't it the case that HAL doesn't load (at least usb)devices in that file?

Nope, the problem occurs before HAL looks at its own tables. It used to be the case, with the earlier kernel, that using a mount in fstab would work, if usb was added as a hook to mkiniticpio.conf. That no longer works with the newer kernels due to timing and other issues as explained by the developers.

Using the rw,user,noauto options in fstab doesn't cause a problem with HAL, at least not for me running Gnome. I understand that it can cause problems using Thunar, though. Last time I checked, Thunar would refuse to mount the device to a mount point in /media if one was defined in fstab.

Offline

#14 2009-08-04 18:24:44

dusan.jaluvka
Member
Registered: 2009-08-04
Posts: 3

Re: Latest Initrd not recognising USB storage devices?

Hi, I have the same problem, but unfortunately with my root device. I am booting from USB drive and after upgrade to 2.6.30 I am not able to boot. Do you have a clue how can I solve this?

Offline

#15 2009-08-05 08:54:10

dusan.jaluvka
Member
Registered: 2009-08-04
Posts: 3

Re: Latest Initrd not recognising USB storage devices?

dusan.jaluvka wrote:

Hi, I have the same problem, but unfortunately with my root device. I am booting from USB drive and after upgrade to 2.6.30 I am not able to boot. Do you have a clue how can I solve this?

OK I found this FS#15376 - [mkinitcpio] USB hook doesn't include USB storage sub-driver modules, so I will try it out

Offline

Board footer

Powered by FluxBB