Created
March 20, 2020 04:30
-
-
Save map7/bdcef100f7f9ecba38a439fed12bea53 to your computer and use it in GitHub Desktop.
debian 10 LTSP 20.3 install with chroot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- [-] Install *LTSP 20.3* on *debian10-ltsp* | |
- [X] Change to root | |
: su - | |
- [X] Configure PPA | |
The PPA gets updated before the repository (even debian testing) | |
: wget https://ltsp.org/misc/ltsp-ubuntu-ppa-bionic.list -O /etc/apt/sources.list.d/ltsp-ubuntu-ppa-bionic.list | |
: wget https://ltsp.org/misc/ltsp_ubuntu_ppa.gpg -O /etc/apt/trusted.gpg.d/ltsp_ubuntu_ppa.gpg | |
: apt update | |
- [X] Install LTSP 20.3 | |
Install ltsp and required packages | |
: apt install --install-recommends ltsp ltsp-binaries dnsmasq nfs-kernel-server openssh-server squashfs-tools ethtool net-tools epoptes | |
- [X] Add permissions for epoptes | |
: gpasswd -a <user> epoptes | |
eg; | |
: gpasswd -a map7 epoptes | |
- [X] Configure dnsmasq for tftp only (no DHCP) | |
: ltsp dnsmasq | |
- [X] Build chroot image | |
: ltsp image -m "-comp zstd" / | |
- [X] Configure NFS mounts | |
: ltsp nfs | |
- [X] Configure iPXE menu | |
: ltsp ipxe | |
- [X] Generate ltsp.img | |
: ltsp initrd | |
- [X] Test booting fat-client = 29secs iPXE -> Login with 10secs blank | |
- [X] Test booting with dd cache = 28secs iPXE => Login with 3secs blank | |
Create config | |
: install -m 0660 -g sudo /usr/share/ltsp/common/ltsp/ltsp.conf /etc/ltsp/ltsp.conf | |
Add to /etc/ltsp/ltsp.conf [clients] section | |
: PRE_INITRD_BOTTOM_IMAGE_TO_RAM="dd if=/root/images/x86_64.img of=/dev/null &" | |
Update settings | |
: ltsp initrd | |
The total time isn't that different from booting without cache as we have to copy over the entire | |
image to the thin clients RAM, but once that is done everything loads fast, including what ever it's | |
doing in the 'blank' part. | |
- [X] Create Chroot for LTSP clients | |
Why not use the root image? Because it's 180GB! Let's create a smaller version. | |
: cd /srv | |
: mkdir ltsp | |
: cd ltsp | |
: apt install debootstrap | |
: debootstrap buster x86_64 | |
: chroot x86_64 | |
: apt install --no-install-recommends linux-image-amd64 initramfs-tools | |
: passwd | |
: exit | |
Add the following line in /etc/exports | |
: /srv/ltsp/x86_64 *(rw,async,crossmnt,no_subtree_check,no_root_squash,insecure) | |
To export it via NFS | |
: exportfs -ra | |
- [X] Chroot into image and install xfce4 | |
Add the following to a script /srv/ltsp/ltsp-chroot-bind | |
: #!/bin/bash | |
: | |
: # Edit to suit | |
: CHROOT_PATH=/srv/ltsp/x86_64 | |
: | |
: sudo mount -o bind /proc ${CHROOT_PATH}/proc | |
: sudo mount -o bind /dev ${CHROOT_PATH}/dev | |
: sudo mount -o bind /dev/pts ${CHROOT_PATH}/dev/pts | |
: sudo mount -o bind /sys ${CHROOT_PATH}/sys | |
: | |
: sudo chroot ${CHROOT_PATH} /bin/bash | |
: | |
: CHROOT_PID=$! | |
: wait $CHROOT_PID | |
: | |
: echo "Unmounting chroot environment" | |
: sudo umount $CHROOT_PATH/sys | |
: sudo umount $CHROOT_PATH/dev/pts | |
: sudo umount $CHROOT_PATH/dev | |
: sudo umount $CHROOT_PATH/proc | |
Then run the script | |
: bash ./ltsp-chroot-bind | |
Install xfce4 | |
: apt install xfce4 | |
- [X] Build chroot image | |
: ltsp image -m "-comp zstd" x86_64 | |
: ltsp initrd | |
NOTE: I remarked out the dd cache in /etc/ltsp/ltsp.conf for now. | |
- [ ] Test booting = fails | |
: mount: No such file or dir | |
: mount: invalid option -- | |
: done. | |
: mount: No such file or dir | |
: run-init: opening console: No such file or dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Had to install ltsp
Then rebuilt image and it worked