[Bug 696435] Re: wait-for-root fails to detect nbd root

Alkis Georgopoulos 696435 at bugs.launchpad.net
Fri Mar 21 04:45:18 UTC 2014


Yes, it's still an issue in Trusty.
Also please use "Incomplete", not "Invalid" when you need feedback from a bug reporter.

root at ltsp241:~# blkid
/dev/nbd0: TYPE="squashfs" 
/dev/nbd1: UUID="d7bfcbc8-9718-46f9-b9e3-daf9e46f596a" TYPE="swap" 
/dev/sr0: LABEL="Ubuntu 10.04.3 LTS i386" TYPE="iso9660" 
root at ltsp241:~# /usr/lib/initramfs-tools/bin/wait-for-root /dev/nbd0 1 || echo failed
failed
root at ltsp241:~# /usr/lib/initramfs-tools/bin/wait-for-root /dev/nbd1 1 || echo failed
failed
root at ltsp241:~# /usr/lib/initramfs-tools/bin/wait-for-root /dev/sr0 1 || echo failed
iso9660
root at ltsp241:~# lsb_release -sc
trusty

** Changed in: nbd (Ubuntu)
       Status: Invalid => New

** Changed in: initramfs-tools (Ubuntu)
       Status: Invalid => New

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

Title:
  wait-for-root fails to detect nbd root

Status in “initramfs-tools” package in Ubuntu:
  New
Status in “nbd” package in Ubuntu:
  New

Bug description:
  When using an nbd root, wait-for-root blocks for 30 seconds before
  booting continues successfully.

  Using Ubuntu Natty, related packages versions:
      nbd-client 1:2.9.16-6ubuntu1 
      initramfs-tools 0.98.1ubuntu9

  The wait-for-root call from /usr/share/initramfs-tools/scripts/local:
  	while [ -z "${FSTYPE}" ]; do
  		FSTYPE=$(wait-for-root "${ROOT}" ${ROOTDELAY:-30})

  		# Run failure hooks, hoping one of them can fix up the system
  		# and we can restart the wait loop.  If they all fail, abort
  		# and move on to the panic handler and shell.
  		if [ -z "${FSTYPE}" ] && ! try_failure_hooks; then
  			break
  		fi
  	done

  I replaced wait-for-root with a sh script that did `set >&2`, here are the relevant environment variables at the time wait-for-root was called:
  ROOT='/dev/nbd0'
  ROOTDELAY=''
  ROOTFLAGS=''
  ROOTFSTYPE=''
  nbdroot='192.168.0.1,2011'

  It's probably worth noting that "nbd0: unknown partition table" was
  displayed asynchronously 1-2 seconds after wait-for-root was invoked
  and while it was still waiting. But I tried adding a "sleep 5" as the
  last line of local-top/nbd, so that the nbd message was displayed a
  lot before wait-for-root was called, and it didn't make a difference.
  So I don't think a race condition is involved in this problem.

  Temporarily I'm passing rootdelay=1 in the kernel command line to work
  around the problem.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/696435/+subscriptions



More information about the foundations-bugs mailing list