[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#685375: Breaks booting with nfsroot

Package: live-boot
Version: 3.0~b1-1
Severity: normal


I'm trying to setup a FAI netbooting environment, which uses live-boot
for booting the installation system via NFS. As union filesystem, I'm
using overlayfs by using the union=overlayfs kernel commandline parameter.

the live-boot scripts all seem to run as expected. However, in the last
stage, run-init fails with this error message:

run-init: nuking initramfs contents: Directory not empty.
Kernel panic - not syncing: Attempted to kill init! [...]

By booting with 'break=init', I could verify that /root is fully in
place, that is, all bind mounts succeeded. However, a "rm -rf
/live/overlayfs" fails with "Device busy". If I manually 'umount
/tmp/overlayfs', the boot process continues successfully.

While reading the commit logs, I noticed this commit:


Laying tmpfs on /live/overlay only during initramfs stage, fixes boot
failure with plain filesystems (Closes: #681579).

diff --git a/scripts/boot/9990-overlay.sh b/scripts/boot/9990-overlay.sh
index cb12c4b..00c53c8 100755
--- a/scripts/boot/9990-overlay.sh
+++ b/scripts/boot/9990-overlay.sh
@@ -155,9 +155,8 @@ setup_unionfs ()
        # tmpfs file systems
        touch /etc/fstab
-       mkdir -p /live
-       mount -t tmpfs tmpfs /live
        mkdir -p /live/overlay
+       mount -t tmpfs tmpfs /live/overlay
        # Looking for persistence devices or files
        if [ -n "${PERSISTENCE}" ] && [ -z "${NOPERSISTENCE}" ]

It seems to me that when you mount the tmpfs in /live/overlay, you need
to umount it before booting manually as well, that is, after
bind-mounting /live to the final boot location.


Reply to: