I managed to come up with a workaround.

The following patch skips the entire ordinary NFS mounting procedure and
only replaces NBD with NFS in the ltsp scripts. That means that the root
folder will be a unionfs of /cow and /rofs, but  /rofs is not mounted
with NBD but NFS.

The patch has to be applied to /usr/share/initramfs-
tools/scripts/ltsp_nbd inside the ltsp chroot, and in addition to that
the PXE configuration should look exactly look like the one for NBD,
i.e. the boot=nfs and nfsroot= options should *not* be given.


--- ltsp_nbd.bak        2010-01-05 15:32:43.232058101 -0500
+++ ltsp_nbd    2010-01-05 15:40:16.196557912 -0500
@@ -27,7 +27,7 @@
 # NBD root mounting
 mountroot()
 {
-    [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-top"
+    [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/ltsp_nbd"
     run_scripts /scripts/nfs-top
     [ "$quiet" != "y" ] && log_end_msg
 
@@ -67,16 +67,7 @@
     mount -t tmpfs tmpfs /cow
 
     # mount the readonly root
-    if nbd-client ${NBD_ROOT_SERVER} ${NBD_ROOT_PORT} /dev/nbd0 ; then
-        eval $(fstype /dev/nbd0)
-        if [ -z "$FSTYPE" ]; then
-            echo "Warning: unable to detect filesystem, assuming squashfs."
-            FSTYPE=squashfs
-        fi
-        mount -o ro -t $FSTYPE /dev/nbd0 /rofs
-    else
-        panic "Error: failed to connect to NBD server."
-    fi
+    mount -o ro,nolock -t nfs ${NBD_ROOT_SERVER}:/opt/ltsp/i386 /rofs
 
     # merge ro and rw filesystems
     mount -t aufs -o dirs=/cow=rw:/rofs=ro aufs ${rootmnt}

-- 
/etc/init/mountall.conf fails when root is mounted using NFS instead of NBD
https://bugs.launchpad.net/bugs/485709
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to