Discussion:
[Ltsp-discuss] Jessie, gnome-flashback, ltsp-pnp, nfs or nbd ?
Nicolas LEBRUN
2015-01-31 10:07:48 UTC
Permalink
Hi,

I'm trying to build a ltsp-server as versatile as possible (old kernel
or not, fat or not...) because clients can be very different... We
have actually about 20 servers on Wheezy with NFS chroots with no fat.

At the moment, i install everything in a Jessie virtualbox... with the
script attached (thks Richard K and Vagrant C)

And i have many questions

- NBD seems to be really stable. The only advantage of NFS seems to
be able to modify chroot in real time... What do you think ?

- I can't login in gnome flashback when the client is not fat...
Apparently because there is no 3D acceleration... What can I do ?

- In my virtualbox, i can't try ltsp-pnp ... ltsp-update-image
--cleanup / remain stuck. Is it possible to have an ltsp-pnp in a
virtual machine (will surely be a kvm) ?

- Can ltsp-pnp have many kernels ? 586, 686-pae and amd64 ?

Thanks for your advices,

Nico


The script i use...

#!/bin/bash
#1 install packages (if ltsp-pnp install ltsp-client on the server)
apt-get install -y lightdm ltsp-server task-mate-desktop
task-french-desktop task-lxde-desktop gnome-session
gnome-session-flashback gnome-session-fallback ldm-server ltspfs
dnsmasq ltsp-docs aptitude iceweasel-l10n-fr inetutils-ping
libreoffice-l10n-fr hyphen-fr mythes-fr chromium-l10n chromium
pepperflashplugin-nonfree iceweasel-l10n-fr nano inetutils-ping htop
gimp ssh nfs-client gnome-flashback vlc

#2 add loop to /etc/modules and reboot the server (reported
athttps://bugs.debian.org/756990)*
#????????

#3 edit /etc/ltsp/ltsp-build-client.conf to have ARCH="i386" and DIST="jessie"
cat > /etc/ltsp/ltsp-build-client.conf << EOFbuild
BASE="/opt/ltsp"
ARCH="i386"
DIST="jessie"
FAT_CLIENT_DESKTOP="task-french-desktop"
LATE_PACKAGES="
iceweasel-l10n-fr
nano
inetutils-ping
libreoffice-l10n-fr
hyphen-fr
mythes-fr
chromium-l10n
chromium
pepperflashplugin-nonfree
iceweasel-l10n-fr
nano
inetutils-ping
htop
gimp
ssh
nfs-client
gnome-flashback
gnome-session
gnome-session-flashback
gnome-session-fallback
task-mate-desktop
gnome-shell-extensions
task-lxde-dekstop
vlc
"
MOUNT_PACKAGE_DIR="/var/cache/apt/archives/"
LOCALE="fr_FR.UTF-8"
EOFbuild

#4 aptitude update && aptitude -y full-upgrade && aptitude clean
aptitude update && aptitude -y full-upgrade

#5 ltsp-build-client (without parameters)
ltsp-build-client --copy-sourceslist --purge-chroot

#6 ajout de noyaux
ltsp-chroot -a i386 apt-get install -y linux-image-686-pae
linux-image-amd64 linux-image-586


#7 Config dnsmasq
ltsp-config dnsmasq --overwrite
cat > /etc/dnsmasq.d/ltsp-server-dnsmasq.conf << EOFdnsmasq
#log-dhcp
dhcp-range=192.168.0.0,proxy
dhcp-option=17,/opt/ltsp/i386
dhcp-vendorclass=etherboot,Etherboot
dhcp-vendorclass=pxe,PXEClient
dhcp-vendorclass=ltsp,"Linux ipconfig"
dhcp-boot=net:pxe,/ltsp/i386/pxelinux.0
dhcp-boot=net:etherboot,/ltsp/i386/nbi.img
dhcp-boot=net:ltsp,/ltsp/i386/lts.conf
dhcp-option=vendor:pxe,6,2b
dhcp-no-override
#pxe-prompt="Press F8 for boot menu", 3
# The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
# Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
pxe-service=X86PC, "Boot from network", /ltsp/i386/pxelinux
# A boot service type of 0 is special, and will abort the
# net boot procedure and continue booting from local media.
#pxe-service=X86PC, "Boot from local hard disk", 0
enable-tftp
tftp-root=/var/lib/tftpboot/
# Disable the DNS server functionality of dnsmasq by setting port=0
port=0
# Don't listen on lo, to prevent conflicts with Ubuntu's local
resolver hack (LP: #959037).
#except-interface=lo
#bind-interfaces
EOFdnsmasq

service dnsmasq restart

#8 Config NFS
cat > /etc/exports << EOFnfs
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
/opt/ltsp *(ro,no_root_squash,async,no_subtree_check)
#/home *(rw,sync,no_subtree_check)
EOFnfs

service nfs-kernel-server restart
service nfs-common restart

#9 edit /opt/ltsp/i386/etc/ltsp/update-kernels.conf to have
BOOT_METHODS=NBD, ARCH="i386" and IPAPPEND=3 uncommented
cat > /opt/ltsp/i386/etc/ltsp/update-kernels.conf << EOFkernels
ONTIMEOUT=ltsp-NFS
PXELINUX_DEFAULT=ltsp-ifcpu64-NFS
IFCPU64=true
BOOT_METHODS="NFS NB"
CMDLINE_LINUX_DEFAULT="init=/sbin/init-ltsp"
CMDLINE_NFS="root=/dev/nfs ip=dhcp boot=nfs"
CMDLINE_NBD="root=/dev/nbd0"
CMDLINE_AOE="root=/dev/etherd/e0.0"
KERNEL_NAMES='s/\(vmlinu[xz]-\)\([^-]*-[^-]*-\)\(.*\)/& \1 \2 \3/p'
INITRD_NAME='s/vmlinu[xz]/initrd.img/p'
KERNEL_PREFIX="vmlinu[z|x]-*"
KERNEL_SUFFIX=""
LIST_KERNELS_64="amd64"
LIST_KERNELS_PAE="686-pae"
LIST_KERNELS_32="486 686"
IPAPPEND=3
EOFkernels

ltsp-chroot -a i386 /usr/share/ltsp/update-kernels

ltsp-update-kernels

#10 Config du lts.conf /var/lib/tftpboot/ltsp/i386/lts.conf
cat > /var/lib/tftpboot/ltsp/i386/lts.conf << EOFlts
[default]
LDM_DEBUG=True
#DNS_SERVER=#dnsserver#
#CUPS_SERVER=#cupsserver#
#TIMESERVER =#ntpserver#
#LDM_SERVER=192.168.0.200 (maybe
LTSP_CONFIG = True
LDM_DIRECTX=True
LDM_SESSION="gnome-flashback"
#LDM_FORCE_SESSION="gnome-flashback"
#FSTAB_0="server:/home /home nfs defaults,nolock 0 0"
#LDM_THEME=ltsp
LOCALDEV = True
# Use local swap (if available) and network swap
USE_LOCAL_SWAP=True
#NBD_SWAP=True
#ENCRYPT_SWAP=False
#Une seule session par utilisateur
LDM_LIMIT_ONE_SESSION = True
# Fat or not
#LTSP_FATCLIENT=True
FAT_RAM_THRESHOLD=1025
# Autorise les local-apps
LOCAL_APPS = True
LOCAL_APPS_MENU = true
LOCAL_APPS_MENU_ITEMS = iceweasel,chromium,vlc
# On eteint les machines
#SHUTDOWN_TIME="18:45:00"
# Required so clients can mount HTC Desire phones as disk drives
#MODULE_01 = "usb-uhci"
#MODULE_02 = "usb-storage"
#MODULE_03 = "sd_mod"
#FSTAB_0="server:/home /home nfs defaults,sec=sys 0 0"
#PRINTER_0_DEVICE = /dev/usb/lp0
#PRINTER_0_TYPE = U
EOFlts


#Ajout de la clef ssh du server dans le chroot
for ROOT in /opt/ltsp/*/root; do
sudo mkdir -p "$ROOT/.ssh"
sudo chmod 700 "$ROOT/.ssh"
sudo cp /etc/ssh/ssh_host_rsa_key.pub "$ROOT/.ssh/authorized_keys"
sudo chmod 644 "$ROOT/.ssh/authorized_keys"
done

ltsp-update-image

ltsp-config nbd-server

service nbd-server restart

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.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
Vagrant Cascadian
2015-01-31 17:35:43 UTC
Permalink
Post by Nicolas LEBRUN
I'm trying to build a ltsp-server as versatile as possible (old kernel
or not, fat or not...) because clients can be very different... We
have actually about 20 servers on Wheezy with NFS chroots with no fat.
...
Post by Nicolas LEBRUN
And i have many questions
- NBD seems to be really stable. The only advantage of NFS seems to
be able to modify chroot in real time... What do you think ?
I find NFS to be more resilient in case of brief network outages, where
NBD seems more prone to hang. With LTSP on Debian wheezy or jessie, you
should be able to switch between NBD and NFS at boot time by configuring
the menu options in update-kernels.conf:

PXELINUX_DEFAULT=menu
#PXELINUX_DEFAULT=vesamenu
# 10 second timeout:
TIMEOUT=100
ONTIMEOUT=ltsp-ifcpu64-NFS
#ONTIMEOUT=ltsp-ifcpu64-NBD
IFCPU64=true
BOOT_METHODS="NFS NBD"


If you need to switch between Jessie ltsp-pnp and wheezy chroots, you'll
need to manually generate your own PXE configuration to select between
the various options.
Post by Nicolas LEBRUN
- I can't login in gnome flashback when the client is not fat...
Apparently because there is no 3D acceleration... What can I do ?
If it works fine on fat clients, I suspect it's an issue with running at
16-bit color depth (the default for thin clients). Experiment with
setting X_SMART_COLOR_DEPTH=false in lts.conf:

https://bugs.debian.org/705143
Post by Nicolas LEBRUN
- In my virtualbox, i can't try ltsp-pnp ... ltsp-update-image
--cleanup / remain stuck. Is it possible to have an ltsp-pnp in a
virtual machine (will surely be a kvm) ?
No idea with virtualbox. I've mostly been testing using libvirt with
KVM, and haven't experienced problems like that.
Post by Nicolas LEBRUN
- Can ltsp-pnp have many kernels ? 586, 686-pae and amd64 ?
Yes, though you'll need to install the server as i386 instead of amd64,
but you can run the amd64 kernel to gain (most of) the benefits of 4GB+
ram. You'll want to make sure the initramfs for all kernel versions get
updated, edit /etc/initramfs-tools/update-initramfs.conf:

update_initramfs=all
Post by Nicolas LEBRUN
At the moment, i install everything in a Jessie virtualbox... with the
script attached (thks Richard K and Vagrant C)
That script is probably more invasive than it needs to be; there are
several options (dnsmasq, /etc/exports) to write to .d dirs instead of
overwriting the whole configuration file, which will result in easier
upgrades, and also preserve the original comments in the configuration
files.

Running both "ltsp-config dnsmasq --overwrite" and then manually
overwriting /etc/dnsmasq.d/ltsp-server-dnsmasq.conf is a bit
redundant. :)


live well,
vagrant
Alkis Georgopoulos
2015-01-31 18:17:04 UTC
Permalink
Post by Nicolas LEBRUN
- NBD seems to be really stable. The only advantage of NFS seems to
be able to modify chroot in real time... What do you think ?
NBD is 5 times faster, NFS is more stable on disconnects (where you also
lose SSHFS connections, processes etc though).
Btw it's possible to run squashfs over NFS (exporting only a single file
over NFS, i386.img) for stability + 90% of the NBD speed.
Post by Nicolas LEBRUN
- I can't login in gnome flashback when the client is not fat...
Apparently because there is no 3D acceleration... What can I do ?
https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1251281
https://bugzilla.gnome.org/show_bug.cgi?id=731173
Hopefully someone will backport this for jessie + 14.04 users.
Post by Nicolas LEBRUN
- In my virtualbox, i can't try ltsp-pnp ... ltsp-update-image
--cleanup / remain stuck. Is it possible to have an ltsp-pnp in a
virtual machine (will surely be a kvm) ?
Virtualbox works fine with ltsp-pnp, the problem is elsewhere.
Are you using a separate partition for /boot?
I think there's a bug in ltsp-pnp in that case...

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.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
Ivaylo Ganchev
2015-02-04 17:04:05 UTC
Permalink
Hello,
Post by Alkis Georgopoulos
NBD is 5 times faster, NFS is more stable on disconnects (where you also
lose SSHFS connections, processes etc though).
Btw it's possible to run squashfs over NFS (exporting only a single file
over NFS, i386.img) for stability + 90% of the NBD speed.
Is it 5x faster at boot-time or also during the normal work of the thin client.
--
Ivaylo Ganchev
System administrator
Lecturer
UFR MITSIC

Université Paris 8
2 rue de la Liberté
93536 Saint-Denis

tél. : +33 1 49 40 64 08
e-mail : ***@univ-paris8.fr


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.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
Nicolas LEBRUN
2015-02-08 13:49:34 UTC
Permalink
Thks Alkis and Vagrant for yours answers... Still a little bit work for me ;-)

Yes, Vagrant, my script is harsh and dirty... I'll work on it ;-)
Thks Alkis and Vagrant for yours answers...
Still a little bit work for me ;-)
Post by Alkis Georgopoulos
Post by Nicolas LEBRUN
- NBD seems to be really stable. The only advantage of NFS seems to
be able to modify chroot in real time... What do you think ?
NBD is 5 times faster, NFS is more stable on disconnects (where you also
lose SSHFS connections, processes etc though).
Btw it's possible to run squashfs over NFS (exporting only a single file
over NFS, i386.img) for stability + 90% of the NBD speed.
Post by Nicolas LEBRUN
- I can't login in gnome flashback when the client is not fat...
Apparently because there is no 3D acceleration... What can I do ?
https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1251281
https://bugzilla.gnome.org/show_bug.cgi?id=731173
Hopefully someone will backport this for jessie + 14.04 users.
Post by Nicolas LEBRUN
- In my virtualbox, i can't try ltsp-pnp ... ltsp-update-image
--cleanup / remain stuck. Is it possible to have an ltsp-pnp in a
virtual machine (will surely be a kvm) ?
Virtualbox works fine with ltsp-pnp, the problem is elsewhere.
Are you using a separate partition for /boot?
I think there's a bug in ltsp-pnp in that case...
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_____________________________________________________________________
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.freenode.net
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.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
Loading...