[Bug 182616] Re: Checkfs fails on USB partition because initialization isn't finished yet; prompts on every boot

Steve Langasek steve.langasek at canonical.com
Fri May 17 21:06:52 UTC 2013


This issue is long since resolved in Ubuntu, which no longer uses the
scripts in the sysvinit package for fsck/mount of filesystems.

** Changed in: sysvinit (Ubuntu)
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sysvinit in Ubuntu.
https://bugs.launchpad.net/bugs/182616

Title:
  Checkfs fails on USB partition because initialization isn't finished
  yet; prompts on every boot

Status in “sysvinit” package in Ubuntu:
  Fix Released

Bug description:
  Binary package hint: initscripts

  I have a USB hard drive which is permanently connected to my computer.
  Hence I included it in /etc/fstab like this:

  UUID=b9682ea8-9076-4417-be3c-3240d9b57dac       /media/usbdisk  ext3
  defaults,errors=remount-ro,noatime,auto,rw,dev,exec,suid,nouser 0 2

  On almost every boot, fsck (called from checkfs) complains it can't
  find this partition. From /var/log/fsck/checkfs:

  "Log of fsck -C -R -A -a 
  Sun Jan 13 17:12:03 2008

  fsck 1.40.2 (12-Jul-2007)
  /dev/hda2: clean, 16/1593088 files, 1493231/3184886 blocks
  fsck.ext3: Unable to resolve 'UUID=b9682ea8-9076-4417-be3c-3240d9b57dac'
  fsck died with exit status 8"

  Then a prompt appears to allow a root login. I can simply bypass this
  with ctrl-D. The boot process finishes, everything is fine and the USB
  drive is mounted correctly.

  After booting in failsafe mode with all logging enabled, I can explain
  what happens: about two seconds after the fsck error message, messages
  about the drive appear, indicating it's finished initializing:

  [   43.295158] sd 0:0:0:0: [sda] Assuming drive cache: write through

  So what seems to happen is this:

  1. The USB drive starts initializing
  2. /etc/init.d/checkfs.sh is called. It looks for all drives in /etc/fstab, and can't find the USB drive yet because it's still initalizing.
  3. The USB drive finishes initializing.

  A workaround for my situation is to add the following line in the
  beginning of /etc/init.d/checkfs.sh:

  sleep 5

  That allows enough time for the drive to finish initializing.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/182616/+subscriptions




More information about the foundations-bugs mailing list