From 64333346c2073e672e10151bc616d0649ac3b91f Mon Sep 17 00:00:00 2001 From: Jesse Hathaway Date: Tue, 30 Oct 2007 14:17:16 -0400 Subject: 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. --- helpers/lh_binary_syslinux | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'helpers/lh_binary_syslinux') 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 -- cgit v1.2.3