Migrating legacy k12ltsp to k12linux

William Fragakis william at fragakis.com
Wed Nov 5 15:26:51 UTC 2008


Hope this helps someone. Please forgive any errors. I've been able to
move a F9 (originally K12LTSP based on f7) to k12linux, back and again
forward to k12linux based on these steps. Excuse the length but I wanted
to be thorough. Comments, corrections, etc. welcome.

Regards,
William

---

Moving Fedora 9 K12LTSP (ltsp 4.2) to k12linux/ltsp 5

Edits/Corrections/Flames to william at fragakis.com

This uses legacy network configuration of eth0 facing clients and eth1
facing outside world. This simplifies certain network setup issues (ie
uses existing network profile), can use existing dhcpd and existing
iptable rules. This is meant to be reversable; if you need to, you can
revert to your previous configuration quickly and without restarting the
server. The process doesn't take long - building the new ltsp image
takes the longest - and doesn't require restarting your server. 

Test system started as F7 and has been updated, over time, to F9. 
(Because I'm lazy and didn't want to figure out everthing that i need to
reinstall)

A familiarity with https://fedorahosted.org/k12linux/wiki/InstallGuide
will be a big plus as well as having set up a K12Linux system from
scratch just
to become comfortable with any differences and nuances in the new setup.

Backup to safe location:

/etc/cron.daily/ltsp-swap-delete  
	(or will be duplicate file from new package)
/etc/xinetd.d/tftp 
	(xinetd will see any file in /etc/xinetd/ as a service, you'll end up
with multiple, conflicting tftp configs if you leave
this file in. e.g. tftp and tftp.rpmnew)

Rename
	from
		/opt/ltsp

	 to 
		 /opt/ltsp4
	(or something suitable, for  our purposes here, we'll say /opt/ltsp4)



Install new components
## yum install ltsp-server will fail
because /etc/cron.daily/ltsp-swap-delete is part of ## the old ltsp
package. We could bomb 
## the old ltsp package but we are trying to keep the old setup "just in
case".

# yum install ltspfs nbd. bridge-utils livecd-tools squashfs-tools
pykickstart live555

Download latest ltsp-server from
http://togami.com/~k12linux-temporary/fedora/9/
depending upon architecture

# wget
http://togami.com/~k12linux-temporary/fedora/9/i386/ltsp-server-5.1.32-1.fc9.i386.rpm

# rpm -ivh /ltsp-server-5.1.32-1.fc9.i386.rpm --replacefile


transfer any machine specific settings - especially if using thin
clients as print servers

transfer from: /opt/ltsp4/i386/etc/lts.conf

to: /var/lib/tftpboot/ltsp/i386/lts.conf

simply replacing the file is not recommended because certain settings in
LTSP4 are not recognized in 5 and ver 5 does a good job of recognizing a
lot of hardware that ver. 4 struggled with (e.g. my ISA soundcards and
PCI video cards).

see: http://www.ltsp.org/~sbalneav/LTSPManual.html#lts-conf for more

At this point, if you wish you can migrate to new style of bridge and
virtual network interface serving the clients. Please consult K12Linux
docs on advanced network setup.
	https://fedorahosted.org/k12linux/wiki/NetworkSetup


## Ugly simplification if you are using only PXE boot thin clients and
have a bunch of
fixed ips you don't want to have to copy over
	in /etc/dhcpd-k12ltsp.conf
		verify that this line is correct for your system 

		option root-path		"192.168.0.254:/opt/ltsp/i386";
 
	and change   # NOTE: kernels are specified
in /tftpboot/lts/pxe/pxelinux.cfg/
       			 filename      "/lts/pxe/pxelinux.0";

		to 
			# NOTE: kernels are specified in /tftpboot/lts/pxe/pxelinux.cfg/
			 filename      "/ltsp/i386/pxelinux.0";

##better: option

rename /etc/dhcpd-k12ltsp.conf to etc/dhcpd-k12ltsp.conf.bk

and copy to /etc/ltsp/dhcpd.conf to /etc/dhcpd-k12ltsp.conf
you may want to replace all instances of 172.31.100 with 192.168.0 if
you are fond of the previous ip range.
Also, make any appropriate changes if you are using a static ip
addressing scheme.


Restart existing services

# service dhcpd restart
# service xinetd restart

Start new services
# for server in ldminfod nbdrootd nbdswapd; do chkconfig $server on;
done 

Note that other services mentioned in the k12linux docs should already
be running.

Lastly, one of the reasons you did this is to take advantage of newer
versions of flash. Go to adobe.com and download the 
latest version. If you already have the adobe repositories in your yum
configuration -
# yum update -y flash-plugin

Consult http://macromedia.mplug.org/ for any tweaks. This one is highly
recommended:
	Create  /etc/adobe/mms.cfg
		containing this line 
  		WindowlessDisable=true
and  remove libflashsupport as it is no longer needed for anything with
Flash 10, and it might even be the cause of crashes.

# yum remove -y libflashsupport




### Undoing the damage
If you need to revert, for whatever reason, to using ltsp ver. 4:

change  in /etc/xinetd.d/tftp 
	from
		server_args		=  -s /var/lib/tftpboot
	to
		server_args		= -s /tftpboot


If you wish to keep two ltsp directories, you can do this:
change in  /etc/exports
	from	
		/opt/ltsp/i386
192.168.0.0/255.255.255.0(ro,no_root_squash,sync)
	to
		/opt/ltsp4/ i 386
192.168.0.0/255.255.255.0(ro,no_root_squash,sync)
	and 
	from 
		/opt/ltsp/ppc
192.168.0.0/255.255.255.0(ro,no_root_squash,sync)
	to
		/opt/ltsp4/ppc
192.168.0.0/255.255.255.0(ro,no_root_squash,sync)

or rename from /opt/ltsp to /opt/ltsp5 and /opt/ltsp4 to /opt/ltsp

switch dhcpd-k12ltsp.conf files (make .bk the current one and the
current one .bk or .new as you wish)
or aim pxe filename to lts (not ltsp) directory - depending whether you
swapped .conf files or hacked the original
Don't forget to replace all instances of /opt/ltsp with /opt/ltsp4, or
whatever you renamed your original ltsp directory!

restart xinetd, nfs nfslock and dhcpd

you should be able to boot back in to ltsp 4

## Troubleshooting

tftp fails 
	Did you restart xinetd?
	Is the correct tftp file in /etc/xinetd.d/ ?
	If using your previous dhcpd file, is the correct filename and path set
for your new 
	configuration (e.g. ilename      "/ltsp/i386/pxelinux.0"; )?

pxelinux boots with old/incorrect vmlinuz
	tftp points to wrong location. New location is /var/lib/tftpboot. Ver.
4.2 uses /tftpboot

boot hangs after starting redhat nash
	Does the directory holding the ltsp files match your settings
elsewhere? Check
	that option root-path points to correct ip and directory
	e.g. option root-path "192.168.0.254:/opt/ltsp/i386"; 

After reverting to previous ltsp, you get nfs errors
	Make sure you restart nfs and nfslock if you've edited /etc/exports
	Make sure that /etc/exports has the correct path 
	(e.g. /opt/ltsp4/i386
192.168.0.0/255.255.255.0(ro,no_root_squash,sync) )
	Make sure that your dhcpd file (e.g. dhcpd-k12ltsp.conf) points option
root-path to the correct location.




More information about the K12Linux-devel-list mailing list