nfs root script breaks with absolute /sbin/init symlinks

Bug #1439955 reported by Lucas Gadani on 2015-04-03
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Debian)
Fix Released
initramfs-tools (Ubuntu)
Martin Pitt

Bug Description

The initramfs boot script try to mount the root filesystem into /root and look for a /sbin/init file inside that folder. systemd installs /sbin/init as a link to /lib/systemd/systemd, which the initramfs scripts can't find (because the link is an absolute path and the root is mounted under /root).

Making that link a relative path fixes the problem (i.e. making it ../lib/systemd/systemd).

Please, see /usr/share/initramfs-tools/scripts/nfs for the affected script.

I believe this should be fixed before the release of 15.04, as it breaks all nfs root installs.

Martin Pitt (pitti) wrote :

This reminds me of bug 1351295. For the main "init" initramfs script and local partitions there is code to get along with absolute symlinks. I don't see any readlink in the nfs script, but I figure this is a related problem. I see the Debian package has a fix for this:

Would you mind testing this? I. e. please put the attached "nfs" script into /usr/share/initramfs-tools/scripts/, revert /sbin/init to be an absolute link to /lib/systemd/systemd again, run "sudo update-initramfs -u", and check if booting now works?


affects: systemd (Ubuntu) → initramfs-tools (Ubuntu)
summary: - systemd breaks nfs root on vivid
+ nfs root script breaks with absolute /sbin/init symlinks
Changed in initramfs-tools (Ubuntu):
status: New → In Progress
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
tags: added: systemd-boot
Martin Pitt (pitti) on 2015-04-09
Changed in initramfs-tools (Ubuntu):
status: In Progress → Fix Committed
Changed in initramfs-tools (Debian):
status: Unknown → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.103ubuntu14

initramfs-tools (0.103ubuntu14) vivid; urgency=medium

  * scripts/nfs: Fix nfs mount check for absolute /sbin/init symlink, to make
    root NFS work again. Cherry-picked from Debian (commit 7bc24f829f).
    (LP: #1439955)
 -- Martin Pitt <email address hidden> Thu, 09 Apr 2015 10:03:26 +0200

Changed in initramfs-tools (Ubuntu):
status: Fix Committed → Fix Released
Lucas Gadani (lgadani) wrote :

Sorry for the delay, I can confirm that the fix works.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.