summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_syslinux
diff options
context:
space:
mode:
authorJesse Hathaway <jesse@mbuki-mvuki.org>2007-10-30 14:17:16 -0400
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:28 +0100
commit64333346c2073e672e10151bc616d0649ac3b91f (patch)
tree96072f2e8ed0dbae13979afda974c18d825c63e4 /helpers/lh_binary_syslinux
parentb7b7cd4c8193041eff058eaa2bf39c5a8bf32458 (diff)
downloadvyos-live-build-64333346c2073e672e10151bc616d0649ac3b91f.tar.gz
vyos-live-build-64333346c2073e672e10151bc616d0649ac3b91f.zip
add new option to mount cow device on nfs volume
At the moment this only works with the root volume on nfs as well. If we add a switch to configure the network early in the boot process then this option could be made available for other root mediums. This option works reliably on the latest kernel 2.6.23.1 On earlier kernels I experienced frequent oopses.
Diffstat (limited to 'helpers/lh_binary_syslinux')
-rwxr-xr-xhelpers/lh_binary_syslinux27
1 files changed, 22 insertions, 5 deletions
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux
index 9e85f4612..34ea104ba 100755
--- a/helpers/lh_binary_syslinux
+++ b/helpers/lh_binary_syslinux
@@ -411,13 +411,13 @@ fi
if [ "${LH_BINARY_IMAGES}" = "net" ]
then
- case "${LH_NET_FILESYSTEM}" in
+ case "${LH_NET_ROOT_FILESYSTEM}" in
nfs)
- LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} netboot=nfs nfsroot=${LH_NET_SERVER}:${LH_NET_PATH}"
+ LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} netboot=nfs nfsroot=${LH_NET_ROOT_SERVER}:${LH_NET_ROOT_PATH}"
;;
cifs)
- LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} netboot=cifs nfsroot=//${LH_NET_SERVER}${LH_NET_PATH}"
+ LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} netboot=cifs nfsroot=//${LH_NET_ROOT_SERVER}${LH_NET_ROOT_PATH}"
;;
*)
@@ -426,12 +426,29 @@ then
;;
esac
- if [ -n "${LH_NET_MOUNTOPTIONS}" ]
+ if [ -n "${LH_NET_ROOT_MOUNTOPTIONS}" ]
then
- LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} nfsopts=${LH_NET_MOUNTOPTIONS}"
+ LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} nfsopts=${LH_NET_ROOT_MOUNTOPTIONS}"
fi
fi
+if [ -n "${LH_NET_COW_PATH}" ]
+then
+ case "${LH_NET_COW_FILESYSTEM}" in
+ nfs)
+ if [ -n "${LH_NET_COW_MOUNTOPTIONS}" ]
+ then
+ LH_NET_COW_MOUNTOPTIONS=",${LH_NET_COW_MOUNTOPTIONS}"
+ fi
+ LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} nfscow=${LH_NET_COW_SERVER}:${LH_NET_COW_PATH}${LH_NET_COW_MOUNTOPTIONS}"
+ ;;
+ *)
+ Echo_error "Unsupported net filesystem"
+ exit 1
+ ;;
+ esac
+fi
+
LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //')"
# Parameters are listed at: linux/Documentation/kernel-parameters.txt