Bug#677157: initramfs-tools: root=/dev/nfs mostly useless due to BOOT=local being defined in initramfs.conf
Package: initramfs-tools
Version: 0.106
Severity: normal
Tags: patch
Specifying root=/dev/nfs doesn't really do anything without also either
specifying boot=nfs or changing BOOT= in initramfs.conf:
/dev/nfs)
[ -z "${BOOT}" ] && BOOT=nfs
;;
At which point, you could just as well not specify root=/dev/nfs at all.
This breaks the historical method for network booting with nfsroot with the
kernel arguments:
ip=dhcp root=/dev/nfs
I guess the check to make sure BOOT wasn't already set was changed in order to
fix putting boot= anywhere in the boot commandline:
http://bugs.debian.org/453294
But it seems to me the correct thing to do in that case would be to specify
boot=live after root=/dev/nfs... since the order of the argument processing
matters, rather than preferring the result of one argument over another.
Alternately/Additionally, why is BOOT=local defined in initramfs.conf at all?
What about only setting BOOT=local if $BOOT is undefined, after all the
argument processing is done:
diff --git a/conf/initramfs.conf b/conf/initramfs.conf
index abc231b..995d455 100644
--- a/conf/initramfs.conf
+++ b/conf/initramfs.conf
@@ -53,7 +53,7 @@ COMPRESS=gzip
# nfs - Boot using an NFS drive as the root of the drive.
#
-BOOT=local
+#BOOT=local
#
# DEVICE: ...
diff --git a/init b/init
index cbd22e2..7e54a73 100755
--- a/init
+++ b/init
@@ -186,6 +186,11 @@ for x in $(cat /proc/cmdline); do
esac
done
+if [ -z "${BOOT}" ]; then
+ # Default to BOOT=local if no boot script defined.
+ BOOT=local
+fi
+
if [ -n "${noresume}" ]; then
export noresume
unset resume
live well,
vagrant
Reply to: