Debian Bug report logs - #482273
initscripts: mountall.sh doesn't wait for kernel to scan for USB storage devices

version graph

Package: initscripts; Maintainer for initscripts is Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>; Source for initscripts is src:sysvinit.

Reported by: Phil Endecott <spam_from_debian_bugs_5@chezphil.org>

Date: Wed, 21 May 2008 14:36:05 UTC

Severity: normal

Found in version sysvinit/2.86.ds1-13

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#482273; Package initscripts. Full text and rfc822 format available.

Acknowledgement sent to Phil Endecott <spam_from_debian_bugs_5@chezphil.org>:
New Bug report received and forwarded. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Phil Endecott <spam_from_debian_bugs_5@chezphil.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: initscripts: mountall.sh doesn't wait for kernel to scan for USB storage devices
Date: Wed, 21 May 2008 15:26:22 +0100
Package: initscripts
Version: 2.86.ds1-13
Severity: normal


My machine has its root filesystem on an IDE disk and a second filesystem on a USB 
device.  At boot, the kernel scans for and finds the USB device concurrently with other 
activities; this process includes a deliberate pause "waiting for device to settle" 
before the SCSI system takes over and looks for partitions.  Normally the device is ready by 
the time that mountall runs and the USB filesystem is mounted OK; however, about one time in 
four, the device is not ready and it is not mounted.  Ideally, initscripts would wait 
for an extra second or two until the kernel had created the device and retry the mount.

There are a couple of related cases to compare this with:

- If an NFS mount attempt fails, a mount process will be backgrounded to keep retrying 
it.  (I think this functionality is inside mount.  See man 5 nfs.)  (Actually this can be
the wrong thing to do if the failure was e.g. "mount point does not exist" as it hides 
the actual error, see bug #389055.)

- If a USB storage device provides the root filesystem, the kernel and/or the initramfs 
code will wait for it to be ready.


Regards,  Phil.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.25
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages initscripts depends on:
ii  debianutils   2.15.3                     Miscellaneous utilities specific t
ii  e2fsprogs     1.38+1.39-WIP-2005.12.31-1 ext2 file system utilities and lib
ii  libc6         2.7-10                     GNU C Library: Shared libraries
ii  lsb-base      3.2-10                     Linux Standard Base 3.2 init scrip
ii  mount         2.12r-10                   Tools for mounting and manipulatin

initscripts recommends no packages.

-- no debconf information





Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#482273; Package initscripts. (Tue, 07 Jul 2009 09:33:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Vollmert <rvollmert@gmx.net>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Tue, 07 Jul 2009 09:33:12 GMT) Full text and rfc822 format available.

Message #10 received at 482273@bugs.debian.org (full text, mbox):

From: Robert Vollmert <rvollmert@gmx.net>
To: 482273@bugs.debian.org
Subject: confirmation; workaround
Date: Tue, 7 Jul 2009 11:27:59 +0200
I'm running into the same problem consistently -- my external usb disk  
always comes up too late for mountall.sh. This is not on Debian proper  
but the derivative Voyage Linux, initscripts version 2.86.ds1-61.

My workaround for now is to run mount again later via udev (the  
filesystems are still set up in /etc/fstab). This should fail  
gracefully if mountall.sh was successful.


/etc/udev/rules.d/mount-late.rules:

# usb disk comes up too late for /etc/init.d/mountall.sh
ENV{ID_FS_LABEL}=="usbrw", ACTION=="add", RUN+="/bin/mount /dev/%k"
ENV{ID_FS_LABEL}=="usbmedia", ACTION=="add", RUN+="/bin/mount /dev/%k"


Cheers
Robert





Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#482273; Package initscripts. (Fri, 08 Jan 2010 11:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to andrew_debian@16paws.com:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Fri, 08 Jan 2010 11:27:03 GMT) Full text and rfc822 format available.

Message #15 received at 482273@bugs.debian.org (full text, mbox):

From: Andrew <andrew_debian@16paws.com>
To: 482273@bugs.debian.org
Subject: initscripts: race condition between checkfs.sh and USB disk discovery
Date: Fri, 08 Jan 2010 00:53:33 -1000
I don't know why this has not happened before but I'm running a recent 
Squeeze system and this race condition manifests itself when the checkfs 
script fails, leaving /var/log/fsck/checkfs with cryptiv messages like:

"fsck from util-linux-ng 2.16.2"  "fsck.ext3: no such file or directory"

My boot fails, and my USB disks are not mounted.  Which kinda sucks 
because /usr is a USB SSD.

It took me a while to figure out that "fsck" (2.16.2) was actually 
finding "fsck.ext3", it was "fsck.ext3" that could not find my USB disk 
because it had not been fully blessed by what ever glacial process we're 
now using for this purpose.

I fixed the problem by putting a "sleep 20" into "checkfs.sh".  It 
sucks.  But what else can I do?  I'd rip out hald if I could but instead 
of helping here, it's just another impediment.

It seems that there have been a boatload of swell updates that have made 
upgrading to Squeeze exceptionally painful, and this is just another 
one.  Like evdev leaving my system with inert as a brick since X won't 
take the keyboard and X won't let anyone else take it, so I have to 
power cycle the machine, and hope my disks are recoverable.  Great move 
forward.

I notice from the lack of Debian responses in 7 months, no one seems to 
care.  Whatever.  So much for "no bug too deep," instead it's "lets make 
Firefox lamer by calling it Iceweasel - but  the binary is still 
firefox-bin" or "let's break cdrecord by replacing it with 'wodim' which 
was abandoned years ago".  Nice work.










Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#482273; Package initscripts. (Sat, 24 Sep 2011 20:09:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Jütte <debian@lennartjuette.de>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Sat, 24 Sep 2011 20:09:07 GMT) Full text and rfc822 format available.

Message #20 received at 482273@bugs.debian.org (full text, mbox):

From: Lennart Jütte <debian@lennartjuette.de>
To: 482273@bugs.debian.org
Subject: RE: initscripts: mountall.sh doesn't wait for kernel to scan for USB storage devices
Date: Sat, 24 Sep 2011 21:24:02 +0200
Same problem here…

On my bootleg it looks like the Disk is found (see lines [   24.031380] to [   24.270993]). But the disk is not available when mountall.sh is run. Then it will be detected again. Mounting it at this point works as expected.


initscripts: 2.88dsf-13.1
deban_version: 6.0.2

Uncompressing Linux... done, booting the kernel.
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.32-5-kirkwood (Debian 2.6.32-30) (ben@decadent.org.uk) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 Wed Jan 12 15:27:07 UTC 2011
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Marvell eSATA SheevaPlug Reference Board
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 256MB 256MB = 512MB total
[    0.000000] Memory: 508544KB available (3512K code, 583K data, 124K init, 0K highmem)
[    0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:114
[    0.000000] Console: colour dummy device 80x30
[   21.474969] Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
[   21.714924] Security Framework initialized
[   21.714943] SELinux:  Disabled at boot.
[   21.714970] Mount-cache hash table entries: 512
[   21.715271] Initializing cgroup subsys ns
[   21.715287] Initializing cgroup subsys cpuacct
[   21.715297] Initializing cgroup subsys devices
[   21.715306] Initializing cgroup subsys freezer
[   21.715315] Initializing cgroup subsys net_cls
[   21.715372] CPU: Testing write buffer coherency: ok
[   21.716112] devtmpfs: initialized
[   21.717864] regulator: core version 0.5
[   21.718078] NET: Registered protocol family 16
[   21.718589] Kirkwood: MV88F6281-A0, TCLK=200000000.
[   21.718602] Feroceon L2: Enabling L2
[   21.718635] Feroceon L2: Cache support initialised.
[   21.720587] bio: create slab <bio-0> at 0
[   21.720857] vgaarb: loaded
[   21.721325] Switching to clocksource orion_clocksource
[   21.725141] NET: Registered protocol family 2
[   21.725388] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[   21.726187] TCP established hash table entries: 16384 (order: 5, 131072 bytes:
[   21.726721] TCP: Hash tables configured (established 16384 bind 16384)
[   21.726731] TCP reno registered
[   21.726887] NET: Registered protocol family 1
[   21.727058] Unpacking initramfs...
[   22.158777] Freeing initrd memory: 6576K
[   22.158890] NetWinder Floating Point Emulator V0.97 (double precision)
[   22.159139] audit: initializing netlink socket (disabled)
[   22.159173] type=2000 audit(0.670:1): initialized
[   22.165805] VFS: Disk quotas dquot_6.5.2
[   22.166079] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[   22.166175] JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[   22.166841] msgmni has been set to 1006
[   22.168544] alg: No test for stdrng (krng)
[   22.168669] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[   22.168682] io scheduler noop registered
[   22.168690] io scheduler anticipatory registered
[   22.168698] io scheduler deadline registered
[   22.168887] io scheduler cfq registered (default)
[   22.175023] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   22.175501] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[   22.497083] console [ttyS0] enabled
[   22.501150] NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
[   22.509844] Scanning device for bad blocks
[   22.654865] Bad eraseblock 3799 at 0x00001dae0000
[   22.669231] Bad eraseblock 4059 at 0x00001fb60000
[   22.675304] Creating 3 MTD partitions on "orion_nand":
[   22.680468] 0x000000000000-0x000000100000 : "u-boot"
[   22.686044] 0x000000100000-0x000000500000 : "uImage"
[   22.691524] 0x000000500000-0x000020000000 : "root"
[   22.697803] mice: PS/2 mouse device common for all mice
[   22.703324] rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
[   22.709251] i2c /dev entries driver
[   22.712974] cpuidle: using governor ladder
[   22.717202] cpuidle: using governor menu
[   22.721239] Registered led device: plug:green:health
[   22.726297] mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
[   22.732708] mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
[   22.771391] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[   22.811388] mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
[   22.851387] mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
[   22.891388] mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
[   22.898111] TCP cubic registered
[   22.901378] NET: Registered protocol family 17
[   22.906180] registered taskstats version 1
[   22.910960] rtc-mv rtc-mv: setting system clock to 2097-04-13 10:03:08 UTC (4016685788)
[   22.919025] Initalizing network drop monitor service
[   22.924079] Freeing init memory: 124K
Loading, please wait...
[   23.001793] udev[44]: starting version 164
[   23.298017] SCSI subsystem initialized
[   23.333664] MV-643xx 10/100/1000 ethernet driver version 1.4
[   23.339614] mv643xx_eth smi: probed
[   23.413830] net eth0: port 0 with MAC address f0:ad:4e:00:2f:ea
[   23.505137] usbcore: registered new interface driver usbfs
[   23.512053] usbcore: registered new interface driver hub
[   23.518142] usbcore: registered new device driver usb
[   23.547298] mmc0: mvsdio driver initialized, using GPIO 47 for card detection
[   23.572907] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   23.579527] orion-ehci orion-ehci.0: Marvell Orion EHCI
[   23.584873] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[   23.621389] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[   23.636403] mmc0: new high speed SDHC card at address 0002
[   23.642916] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[   23.648918] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   23.655767] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   23.663037] usb usb1: Product: Marvell Orion EHCI
[   23.667760] usb usb1: Manufacturer: Linux 2.6.32-5-kirkwood ehci_hcd
[   23.674152] usb usb1: SerialNumber: orion-ehci.0
[   23.691951] mmcblk0: mmc0:0002 00000 7.49 GiB
[   23.696586]  mmcblk0:
[   23.699326] usb usb1: configuration #1 chosen from 1 choice
[   23.705242]  p1 p2 p3 <
[   23.707944] hub 1-0:1.0: USB hub found
[   23.711981]  p5 >
[   23.714820] hub 1-0:1.0: 1 port detected
[   23.718992] sata_mv sata_mv.0: version 1.28
[   23.726199] sata_mv sata_mv.0: slots 32 ports 2
[   23.748386] scsi0 : sata_mv
[   23.758971] scsi1 : sata_mv
[   23.764317] ata1: SATA max UDMA/133 irq 21
[   23.768444] ata2: SATA max UDMA/133 irq 21
[   24.031380] usb 1-1: new high speed USB device using orion-ehci and address 2
[   24.121372] ata1: SATA link down (SStatus 0 SControl F300)
[   24.182659] usb 1-1: New USB device found, idVendor=13fd, idProduct=1840
[   24.189391] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   24.196577] usb 1-1: Product: USB 2.0 Drive
[   24.201039] usb 1-1: Manufacturer: PI-239
[   24.205256] usb 1-1: SerialNumber: 313031303331504247343030
[   24.212559] usb 1-1: configuration #1 chosen from 1 choice
[   24.252155] Initializing USB Mass Storage driver...
[   24.257302] scsi2 : SCSI emulation for USB Mass Storage devices
[   24.264339] usbcore: registered new interface driver usb-storage
[   24.270993] USB Mass Storage support registered.
[   24.471377] ata2: SATA link down (SStatus 0 SControl F300)
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... [   24.588640] device-mapper: uevent: version 1.0.3
[   24.595461] device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
done.
Begin: Running /scripts/local-premount ... done.
[   24.704861] kjournald starting.  Commit interval 5 seconds
[   24.710394] EXT3-fs: mounted filesystem with ordered data mode.
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
Using makefile-style concurrent boot in runlevel S.
Starting the hotplug events dispatcher: udevd[   25.912034] udev[163]: starting 
version 164
.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...done.
Setting parameters of disc: (none).
Setting up LVM Volume Groups  File-based locking initialisation failed.
  Reading all physical volumes.  This may take a while...
  No volume groups found
  No volume groups found
  File-based locking initialisation failed.
  No volume groups found
.
y:-1 extents:1 across:385016k SS
done.
Checking root file system...fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/mmcblk0p2: clean, 33908/451584 files, 338351/1805824 blocks
done.
[   27.714262] EXT3-fs warning: checktime reached, running e2fsck is recommended
[   27.731943] EXT3 FS on mmcblk0p2, internal journal
Cleaning up ifupdown....
[   27.922867] loop: module loaded
Setting up networking....
[   28.004402] cryptodev: driver 1.0 loaded.
Loading kernel modules...done.
Activating lvm and md swap...done.
Checking file systems...fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/mmcblk0p1: clean, 21/124496 files, 39520/248832 blocks
e2fsck 1.41.12 (17-May-2010)
fsck.ext3: No such file or directory while trying to open /dev/sda1

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

fsck died with exit status 8
failed (code 8).
File system check failed. A log is being saved in /var/log/fsck/checkfs if that location is writable. Please repair the file system manually. ... failed!
 resume system boot. ... (warning).
Give root password for maintenance
PI-239   USB 2.0 Drive    1.08 PQ: 0 ANSI: 4
GiB)
[   29.332801] sd 2:0:0:0: [sda] Write Protect is off
[   29.337630] sd 2:0:0:0: [sda] Assuming drive cache: write through
[   29.345053] sd 2:0:0:0: [sda] Assuming drive cache: write through
[   29.351180]  sda: sda1
[   31.861429] sd 2:0:0:0: [sda] Assuming drive cache: write through
[   31.867554] sd 2:0:0:0: [sda] Attached SCSI disk






Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#482273; Package initscripts. (Sat, 24 Sep 2011 20:15:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Jütte <debian@lennartjuette.de>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Sat, 24 Sep 2011 20:15:07 GMT) Full text and rfc822 format available.

Message #25 received at 482273@bugs.debian.org (full text, mbox):

From: Lennart Jütte <debian@lennartjuette.de>
To: 482273@bugs.debian.org
Subject: Re: Bug#482273: Info received (initscripts: mountall.sh doesn't wait for kernel to scan for USB storage devices)
Date: Sat, 24 Sep 2011 22:12:52 +0200
I forgot my fstab:

proc            /proc           proc    defaults        0       0
# / was on /dev/mmcblk0p2 during installation
UUID=802d0420-89ad-4db1-9c71-db44c986eaf1 /               ext3    errors=remount-ro 0       1
# /boot was on /dev/mmcblk0p1 during installation
UUID=b01176b8-b390-493f-aa46-df332269cace /boot           ext2    defaults        0       2
# swap was on /dev/mmcblk0p5 during installation
UUID=160ba32a-fff2-427f-aa9f-0623f67a4a81 none            swap    sw              0       0

## interesting stuff HERE!
/dev/sda1      /mnt/backup     ext3    defaults        0       0


Just after posting my last message i switched an UUID based entry for this disk:

UUID=8b2b92c6-d3db-4757-a1ec-2773f12dadf1 /mnt/backup   ext3    defaults        0       2

this works fine - for now.

Am 24.09.2011 um 22:09 schrieb Debian Bug Tracking System:

> Thank you for the additional information you have supplied regarding
> this Bug report.
> 
> This is an automatically generated reply to let you know your message
> has been received.
> 
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
> 
> Your message has been sent to the package maintainer(s):
> Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>
> 
> If you wish to submit further information on this problem, please
> send it to 482273@bugs.debian.org.
> 
> Please do not send mail to owner@bugs.debian.org unless you wish
> to report a problem with the Bug-tracking system.
> 
> -- 
> 482273: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482273
> Debian Bug Tracking System
> Contact owner@bugs.debian.org with problems





Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 12:13:12 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.