Merge ~natureshadow/ltsp:boot-method-nfsi into ltsp:master

Proposed by Dominik George
Status: Needs review
Proposed branch: ~natureshadow/ltsp:boot-method-nfsi
Merge into: ltsp:master
Diff against target: 140 lines (+27/-7)
6 files modified
client/Debian/etc/ltsp/update-kernels.conf (+4/-1)
client/Debian/share/initramfs-tools/scripts/nfs-bottom/ltsploop (+2/-2)
client/Redhat/etc/ltsp/update-kernels.conf (+4/-1)
client/Ubuntu/etc/ltsp/update-kernels.conf (+4/-1)
client/share/ltsp/update-kernels (+2/-1)
server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image (+11/-1)
Reviewer Review Type Date Requested Status
LTSP5 developers Pending
Review via email: mp+368453@code.launchpad.net

Description of the change

This change allows the loading of a squashfs image over NFS instead of NBD by setting a boot method of NFSI (cf. https://sourceforge.net/p/ltsp/mailman/message/36669125/)

I am not sure about selecting the image name by $ARCH. Please give feedback on that.

To post a comment you must log in.

Unmerged commits

2b8e8fe... by Dominik George <email address hidden>

Support NFSI boot method everywhere.

NFSI means NFS image and can be used to mounta (squash)fs image over
NFS instead of NBS.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/client/Debian/etc/ltsp/update-kernels.conf b/client/Debian/etc/ltsp/update-kernels.conf
index f6e7bd4..bef0870 100644
--- a/client/Debian/etc/ltsp/update-kernels.conf
+++ b/client/Debian/etc/ltsp/update-kernels.conf
@@ -13,7 +13,7 @@
13#IFCPU64=true13#IFCPU64=true
1414
15# Supported boot methods15# Supported boot methods
16BOOT_METHODS="NBD AOE NFS"16BOOT_METHODS="NBD NFSI AOE NFS"
1717
18# Default commandline arguments common to all boot methods18# Default commandline arguments common to all boot methods
19CMDLINE_LINUX_DEFAULT="init=/sbin/init-ltsp quiet"19CMDLINE_LINUX_DEFAULT="init=/sbin/init-ltsp quiet"
@@ -21,6 +21,9 @@ CMDLINE_LINUX_DEFAULT="init=/sbin/init-ltsp quiet"
21# Commandline used with NFS root21# Commandline used with NFS root
22CMDLINE_NFS="root=/dev/nfs ip=dhcp boot=nfs"22CMDLINE_NFS="root=/dev/nfs ip=dhcp boot=nfs"
2323
24# Commandline used with NFSI (squashfs image over NFS) root
25CMDLINE_NFSI="$CMDLINE_NFS nfsroot=$BASE/images ltsploop=$ARCH.img"
26
24# Commandline used with NBD root27# Commandline used with NBD root
25CMDLINE_NBD="root=/dev/nbd0"28CMDLINE_NBD="root=/dev/nbd0"
2629
diff --git a/client/Debian/share/initramfs-tools/scripts/nfs-bottom/ltsploop b/client/Debian/share/initramfs-tools/scripts/nfs-bottom/ltsploop
index 12bc460..d9d5a37 100755
--- a/client/Debian/share/initramfs-tools/scripts/nfs-bottom/ltsploop
+++ b/client/Debian/share/initramfs-tools/scripts/nfs-bottom/ltsploop
@@ -2,11 +2,11 @@
22
3# Quick hack to mount an image file over NFS, as an alternative to NBD mounts.3# Quick hack to mount an image file over NFS, as an alternative to NBD mounts.
4#4#
5# Requires specifying nfsroot=/opt/ltsp/images and ltsploop=ARCH.img on the5# Requires specifying nfsroot=$BASE/images and ltsploop=ARCH.img on the
6# commandline. ltsploopfs=FS can be used to specify the filesystem, defaults to6# commandline. ltsploopfs=FS can be used to specify the filesystem, defaults to
7# "squashfs"7# "squashfs"
8#8#
9# Also needs a dummy /opt/ltsp/images/sbin/init-ltsp to be an executable file9# Also needs a dummy $BASE/images/sbin/init-ltsp to be an executable file
10# to work around a bug/feature in initramfs-tools's nfs mount checks...10# to work around a bug/feature in initramfs-tools's nfs mount checks...
1111
12PREREQ=""12PREREQ=""
diff --git a/client/Redhat/etc/ltsp/update-kernels.conf b/client/Redhat/etc/ltsp/update-kernels.conf
index 759be5e..a81f9bd 100644
--- a/client/Redhat/etc/ltsp/update-kernels.conf
+++ b/client/Redhat/etc/ltsp/update-kernels.conf
@@ -13,7 +13,7 @@
13#IFCPU64=true13#IFCPU64=true
1414
15# Supported boot methods15# Supported boot methods
16#BOOT_METHODS="NBD NFS AOE"16#BOOT_METHODS="NBD NFSI NFS AOE"
1717
18# Default commandline arguments common to all boot methods18# Default commandline arguments common to all boot methods
19#CMDLINE_LINUX_DEFAULT="init=/sbin/init-ltsp forcepae"19#CMDLINE_LINUX_DEFAULT="init=/sbin/init-ltsp forcepae"
@@ -21,6 +21,9 @@
21# Commandline used with NFS root21# Commandline used with NFS root
22#CMDLINE_NFS="root=dhcp"22#CMDLINE_NFS="root=dhcp"
2323
24# Commandline used with NFSI (squashfs image over NFS) root
25#CMDLINE_NFSI="$CMDLINE_NFS nfsroot=$BASE/images ltsploop=$ARCH.img"
26
24# Commandline used with NBD root27# Commandline used with NBD root
25#CMDLINE_NBD="root=/dev/nbd0"28#CMDLINE_NBD="root=/dev/nbd0"
2629
diff --git a/client/Ubuntu/etc/ltsp/update-kernels.conf b/client/Ubuntu/etc/ltsp/update-kernels.conf
index 453f15f..53900d1 100644
--- a/client/Ubuntu/etc/ltsp/update-kernels.conf
+++ b/client/Ubuntu/etc/ltsp/update-kernels.conf
@@ -13,7 +13,7 @@
13#IFCPU64=true13#IFCPU64=true
1414
15# Supported boot methods15# Supported boot methods
16BOOT_METHODS="NBD NFS AOE"16BOOT_METHODS="NBD NFSI NFS AOE"
1717
18# Default commandline arguments common to all boot methods18# Default commandline arguments common to all boot methods
19CMDLINE_LINUX_DEFAULT="init=/sbin/init-ltsp forcepae"19CMDLINE_LINUX_DEFAULT="init=/sbin/init-ltsp forcepae"
@@ -21,6 +21,9 @@ CMDLINE_LINUX_DEFAULT="init=/sbin/init-ltsp forcepae"
21# Commandline used with NFS root21# Commandline used with NFS root
22CMDLINE_NFS="root=/dev/nfs ip=dhcp boot=nfs"22CMDLINE_NFS="root=/dev/nfs ip=dhcp boot=nfs"
2323
24# Commandline used with NFSI (squashfs image over NFS) root
25CMDLINE_NFSI="$CMDLINE_NFS nfsroot=$BASE/images ltsploop=$ARCH.img"
26
24# Commandline used with NBD root27# Commandline used with NBD root
25CMDLINE_NBD="root=/dev/nbd0"28CMDLINE_NBD="root=/dev/nbd0"
2629
diff --git a/client/share/ltsp/update-kernels b/client/share/ltsp/update-kernels
index 568bdb6..a9c4a71 100755
--- a/client/share/ltsp/update-kernels
+++ b/client/share/ltsp/update-kernels
@@ -95,9 +95,10 @@ CHROOT_NAME=${CHROOT_NAME:-"$(detect_arch)"}
95# Ensure default values for BOOT_METHODS, CMDLINE_LINUX_DEFAULTS, CMDLINE_NFS 95# Ensure default values for BOOT_METHODS, CMDLINE_LINUX_DEFAULTS, CMDLINE_NFS
96# and CMDLINE_NBD. Distros *should* ship an /etc/ltsp/update-kernels.conf with96# and CMDLINE_NBD. Distros *should* ship an /etc/ltsp/update-kernels.conf with
97# appropriate values for their distro.97# appropriate values for their distro.
98BOOT_METHODS=${BOOT_METHODS:-"NFS NBD AOE"}98BOOT_METHODS=${BOOT_METHODS:-"NFS NBD NFSI AOE"}
99CMDLINE_LINUX_DEFAULTS=${CMDLINE_LINUX_DEFAULTS:-"ro init=/sbin/init-ltsp"}99CMDLINE_LINUX_DEFAULTS=${CMDLINE_LINUX_DEFAULTS:-"ro init=/sbin/init-ltsp"}
100CMDLINE_NFS=${CMDLINE_NFS:-"root=/dev/nfs ip=dhcp"}100CMDLINE_NFS=${CMDLINE_NFS:-"root=/dev/nfs ip=dhcp"}
101CMDLINE_NFSI=${CMDLINE_NFSI:-"$CMDLINE_NFS nfsroot=$BASE/images ltsploop=$ARCH.img"}
101CMDLINE_NBD=${CMDLINE_NBD:-"root=/dev/nbd0"}102CMDLINE_NBD=${CMDLINE_NBD:-"root=/dev/nbd0"}
102CMDLINE_AOE=${CMDLINE_AOE:-"root=/dev/etherd/e0.0"}103CMDLINE_AOE=${CMDLINE_AOE:-"root=/dev/etherd/e0.0"}
103104
diff --git a/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image b/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image
index 51b7c1b..752658b 100644
--- a/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image
+++ b/server/share/ltsp/plugins/ltsp-build-client/Debian/095-squashfs-image
@@ -3,6 +3,7 @@ case "$MODE" in
3 add_option "squashfs-image" "`eval_gettext "create squashfs image for use with NBD"`" "advanced" "false"3 add_option "squashfs-image" "`eval_gettext "create squashfs image for use with NBD"`" "advanced" "false"
4 add_option "no-squashfs-image" "`eval_gettext "skip squashfs image creation"`" "advanced" "false"4 add_option "no-squashfs-image" "`eval_gettext "skip squashfs image creation"`" "advanced" "false"
5 add_option "nfs-root" "`eval_gettext "use NFS instead of NBD as default"`" "advanced" "false"5 add_option "nfs-root" "`eval_gettext "use NFS instead of NBD as default"`" "advanced" "false"
6 add_option "nfs-image" "`eval_gettext "use NFS to load (squash)fs image instead of NBD as default"`" "advanced" "false"
6 ;;7 ;;
7 configure)8 configure)
8 if [ -n "$option_squashfs_image_value" ]; then9 if [ -n "$option_squashfs_image_value" ]; then
@@ -17,6 +18,11 @@ case "$MODE" in
17 # set an environment variable we can pick up later18 # set an environment variable we can pick up later
18 NFS_ROOT="True"19 NFS_ROOT="True"
19 fi20 fi
21 if [ -n "$option_nfs_image_value" ]; then
22 # set an environment variable we can pick up later
23 NFS_IMAGE="True"
24 SQUASHFS_IMAGE="True"
25 fi
20 if [ -z "$SQUASHFS_IMAGE" ]; then26 if [ -z "$SQUASHFS_IMAGE" ]; then
21 SQUASHFS_IMAGE="True"27 SQUASHFS_IMAGE="True"
22 fi28 fi
@@ -24,7 +30,11 @@ case "$MODE" in
24 after-install)30 after-install)
25 if [ "True" = "$NFS_ROOT" ]; then31 if [ "True" = "$NFS_ROOT" ]; then
26 mkdir -p $ROOT/etc/ltsp/update-kernels.conf.d32 mkdir -p $ROOT/etc/ltsp/update-kernels.conf.d
27 echo 'BOOT_METHODS="NFS NBD AOE"' > $ROOT/etc/ltsp/update-kernels.conf.d/nfs33 echo 'BOOT_METHODS="NFS NBD NFSI AOE"' > $ROOT/etc/ltsp/update-kernels.conf.d/nfs
34 fi
35 if [ "True" = "$NFS_IMAGE" ]; then
36 mkdir -p $ROOT/etc/ltsp/update-kernels.conf.d
37 echo 'BOOT_METHODS="NFSI NFS NBD AOE"' > $ROOT/etc/ltsp/update-kernels.conf.d/nfs
28 fi38 fi
29 ;;39 ;;
30 finalization)40 finalization)

Subscribers

People subscribed via source and target branches