-----Valtteri Suojanen <vsuoja...@gmail.com> skrev: -----
Från: Valtteri Suojanen <vsuoja...@gmail.com>
Datum: 2015-09-11 14:10
Ärende: [Ltsp-discuss] Fatclient when network / PXE booting is not possible
This is not a LTSP client and image doesn't require a network connection. This is designed for laptops that start the image locally. You can create and use the same ltsp client chroot image on server for both localboot clients (laptops) and ltsp fatclients. User is expecting the same image as he/she gets in the LTSP network at office/school.
One benefit of network/PXE booting is that you can update the client image once to all LTSP clients/users. For testing purposes I started finding a way to get the localboot clients connecting every once in while securely to ltsp server or a separate image server. This allows laptop (or user) to download and update needed images.
I have created a special three partition layout to update & rollback the images so that users don't have to manually go download new image or configure new settings when new image is stored on the disk. My goal was automating the update and rollback. The update & rollback process uses some very simple shell scripts in the chroot image / initramfs image.
https://bitbucket.org/vsuojanen/root-updates/wiki/Home
yes, it's very far from LTSP thin clients, it's just one expiriment to boot/update local images in clients.
It should be possible to continue developing the idea further if anyone is interested and I'm sure there are already people doing similar (and bigger) in their own multi-user Linux server environment.
Short overview how to set up the client localboot with your fatclient image:
- Using localboot requires in chroot image a local user (guest/username), screen session and session settings
lts.conf
[default]
SCREEN_04 = "shell"
SCREEN_05 = "xterm"
SCREEN_07 = "localboot"
/usr/share/ltsp/screen.d/localboot
#!/bin/sh
/usr/sbin/lightdm
#/usr/sbin/gdm
- How do you stop LTSP boot in client ?
Here is one workaround to solve this problem in ubuntu 14.04:
(this could work also with Debian)
Customize initramfs image in client chroot image (e.x. /opt/ltsp/i386)
/usr/share/initramfs-tools/init
export serverip=
/usr/share/initramfs-tools/init-premount/udhcp
# Exit if an LTSP boot was not requested
grep -Eqsw "init=/sbin/init-ltsp|ltsp" /proc/cmdline || exit 0
grep -Eqsw "serverip=127.0.0.1" /proc/cmdline && exit 0
Remember to update initramfs:
update-initramfs -u
- Creating the image and setup the local boot devie
Finally:
ltsp-update-image
Default path for the chroot /boot is in /opt/ltsp/i386/boot
Copy /opt/ltsp/i386/boot/vmlinuz and /opt/ltsp/i386/boot/initrd.img to laptop hard drive or USB disk.
Copy the client image i386.img to laptop hard drive or USB disk in a safely named location e.x. /Boot/LTSP
The bootloader configuration (how you start the laptop image) depends on the boot device and bootloader.
e.x. Configuring USB and image loading with syslinux/extlinux
Install syslinux/extlinux:
sudo apt-get install extlinux mtools
sudo fdisk -l (tarkista tulosteesta usb-tikun laitenimi)
Unmount the USB device and run:
WRONG DEVICE NAME CAN DESTROY YOUR DATA!
sudo syslinux /dev/sdX1 (sdX1 = device/partition)
Make sure the UBS is bootable. Write MBR to beginning of the disk and set active partition.
dd conv=notrunc bs=440 count=1 if=mbr.bin of=/dev/sdX
parted /dev/sdX set 1 boot on
fdisk, sfdisk or any other partitioning tool works here as good as parted.
Copy /opt/ltsp/i386/boot/vmlinuz and /opt/ltsp/i386/boot/initrd.img to USB boot device root direcctory
Create syslinux.cfg
DEFAULT linux
LABEL linux
SAY Now booting the kernel from SYSLINUX...
KERNEL vmlinuz
APPEND ro initrd=initrd.img init=/sbin/init-ltsp root=/dev/sda2 rootflags=ro loop=/Boot/LTSP/i386.img serverip=127.0.0.1
USB booting with grub?
Someone told me that with grub you can load Linux kernel and initrd from inside the loop device (i386.img). I hope I have time to test grub in some point and it sure looks like a good option.
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.freenode.net
------------------------------------------------------------------------------
_____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.freenode.net