nfs root script breaks with absolute /sbin/init symlinks

Bug #1439955 reported by Lucas Gadani
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Debian)
Fix Released
Unknown
initramfs-tools (Ubuntu)
Fix Released
High
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.

Tags: systemd-boot
Revision history for this message
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: http://anonscm.debian.org/cgit/kernel/initramfs-tools.git/commit/scripts/nfs?id=7bc24f829f

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?

Thanks!

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)
Changed in initramfs-tools (Ubuntu):
status: In Progress → Fix Committed
Changed in initramfs-tools (Debian):
status: Unknown → Fix Released
Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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