Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clients not booting on NFS root image #126

Closed
Xpons opened this issue Apr 2, 2020 · 6 comments
Closed

Clients not booting on NFS root image #126

Xpons opened this issue Apr 2, 2020 · 6 comments

Comments

@Xpons
Copy link

Xpons commented Apr 2, 2020

Hi, we are working long time ago with LTSP5, and now we are trying to move to the 'new' LTSP. With LTSP5 we use a read only NFS ubuntu image and clients mount with a tmpfs overlay upper layer this lower layer filesystem.

With LTSP v20.03 we get an error on 55-initrd-bottom.sh script execution of 'read-only filesystem' and client startup fail (see attached image). Script on install_ltsp function tries to sync and remove on NFS read only filesystem without mount any overlay fs.
Please, what we are doing wrong?

On this script I found this comment:

Make root writable using a tmpfs overlay and install ltsp-init

@LTSP.CONF: IMAGE OVERLAY

exists some variable 'IMAGE OVERLAY' on LTSP.conf?, I have not found any documentation about this. And seems like in older versions( 19.12-1) script 55-initrd-bottom.sh and 55-init.sh was responsible to mount the overlay layer but now only exists this comentary header but nothing more.

It's a code bug or a misconfiguration we have?
thank you very much

Xpons
Captura

@alkisg
Copy link
Member

alkisg commented Apr 2, 2020

Hi, can you upload your /srv/tftp/ltsp/ltsp.ipxe, and the output of ltsp info?

@Xpons
Copy link
Author

Xpons commented Apr 2, 2020

Hi,
yes here are the ltsp info output:

root@LTSP2020:/srv/tftp/ltsp# ltsp info
LTSP version: 20.03.1-1202003221407ubuntu18.04.1

SERVER OS: PRETTY_NAME="Ubuntu 18.04.4 LTS"

CHROOTS:
UDS20200306
UDSlocal

VMs:

IMAGES:
x86_64

and attached our ltsp.ipxe:

ltsp_ipxe.txt

The two images UDS20200306 and UDSlocal are the NFS root images

Thank you
Xpons

@alkisg
Copy link
Member

alkisg commented Apr 2, 2020

Does it boot from x86_64?

@Xpons
Copy link
Author

Xpons commented Apr 2, 2020

Yes, X86_64 it's a squashfs image and works without problem, only both NFS images (UDS20200306 and UDSlocal) fail boot because not rw overlay over readonly NFS filesystem it's created.

@alkisg
Copy link
Member

alkisg commented Apr 2, 2020

@Xpons, thanks, you're right, the fix for #43 broke chroot-over-NFS booting. Are you able to apply and test the following patch? You'll need to run sudo ltsp initrd after applying it on the server.

diff --git a/ltsp/client/initrd-bottom/55-initrd-bottom.sh b/ltsp/client/initrd-bottom/55-initrd-bottom.sh
index b31a2a5..6d60b60 100644
--- a/ltsp/client/initrd-bottom/55-initrd-bottom.sh
+++ b/ltsp/client/initrd-bottom/55-initrd-bottom.sh
@@ -40,11 +40,14 @@ initrd_bottom_main() {
             re umount "$rootmnt"
             img_src="$tmpfs/${img##*/}$rest"
         fi
-        re mount_img_src "$img_src" "$rootmnt" "$tmpfs"
-        re set_readahead "$rootmnt"
-    elif [ ! -d "$rootmnt/proc" ]; then
+    elif [ -d "$rootmnt/proc" ]; then
+        # Plain NFS chroot booting
+        img_src=$rootmnt
+    else
         die "$rootmnt/proc doesn't exist and ltsp.image wasn't specified"
     fi
+    re mount_img_src "$img_src" "$rootmnt" "$tmpfs"
+    re set_readahead "$rootmnt"
     test -d "$rootmnt/proc" || die "$rootmnt/proc doesn't exist in $_APPLET"
     re install_ltsp
 }

P.S. I edited the patch, please test with the updated version.

@alkisg
Copy link
Member

alkisg commented Apr 3, 2020

Thanks, fix committed in cc407ed, please reopen if it's still an issue.

I'll upload a new 20.04 version in the PPA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants