HomePage » Linux » LinuxLTSP


READ custom essays


LTSP5 on Debian

READ http://wiki.debian.org/LTSP/Howto

aptitude install atftpd
aptitude install dhcp3-server
aptitude install ltsp-utils ltsp-server-standalone

# Build client
> ltsp-build-client
NOTE: adding default dist and components to security mirror:
http://security.debian.org/ etch/updates main
I: Retrieving Release
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional base dependencies: libgcrypt11 libgpg-error0 liblzo1 libopencdk8 tasksel 
I: Checking component main on http://http.us.debian.org/debian...
I: Retrieving adduser
I: Validating adduser
I: Retrieving apt
I: Validating apt
...
info: LTSP client installation completed successfully

# build client for i386
> ltsp-build-client --arch i386


config ltsp
run ltspcfg
Change atftpd to serve /var/lib/tftpboot (in /etc/inetd.conf)
add boot info to /etc/dhcp3/dhcpd.conf (ltspcfg generated a sample in /etc/ltsp/dhcp/)

Build ati driver package
OK, first download the AMD driver, build the debian packages
aptitude gcc debhelper linux-header-2.6.26-1
sh ati-whatever.sh --buildpkg Debian/lenny


That gives you the packages. Install then in the chroot env.
chroot /opt/ltsp/i386
dpkg -i fglrx-driver_8.476-1_i386.deb 
dpkg -i fglrx-driver-dev_8.476-1_i386.deb 
dpkg -i fglrx-kernel-src_8.476-1_i386.deb 
dpkg -i fglrx-amdcccle_8.476-1_i386.deb 
# then fix up a xorg.conf-ati, driver name = fglrx


Then go to /usr/src/fglrx/build_mod and invoke "make.sh". You will need the corresponding linux-header package and a bunch of other dependencies. Once that's done, go back up 1 level and run "make_install.sh". That should give you the fglrx.ko module. In your lts.conf, add MODULE_01 = fglrx so this module is loaded automatically.

Then you need a working xorg.conf. This is tricky. I got mine by plugging a usb drive to the thin client and install Linux on that...

Turn on Xinerama for better dual screen support
Section "ServerFlags"
	Option "Xinerama" "true"
EndSection


Build nvidia driver
Download the nvidia driver. Go to a thin client's shell, run apt-get install linux-headers, linux-source, gcc, etc. This is necessary because the installer won't build the drivers unless there it's able to detect an nvidia card - which is absent on the LSTP server. So the installer needs to be ran on the thin client.

Run the installer with the options
--no-runlevel-check --no-x-check --keep -a --kernel-source-path=/usr/src/linux-source-2.6.x

If successful, you will find the binaries inside the temp directory created by the installer. Next, go into the temp directory and copy all those files to the corresponding directories in /opt/ltsp/i386 on LTSP server. The followings are the most critical ones, but I also copied all others created by the installer
TMP_DIR/usr/src/nv/nvidia.ko --> /opt/ltsp/i386/lib/modules/2.6.x/kernel/driver/video/
TMP_DIR/usr/X11R6/lib/modules/drivers/nvidia_drv.so --> /opt/ltsp/i386/usr/lib/xorg/modules/drivers/

Build xorg.conf-xxx
Inside lts.conf, you can specify a full xorg.conf for each thin client. For ati, one can come up with a xorg.conf with aticonfig. Pay attention to keyboard model and layout. If you have a 105-key keyboard and you put in pc104, you will loose your keyboard once X starts.
[Default]
		SERVER             = 192.168.18.13
		XSERVER            = fglrx
		XF86CONFIG_FILE = /etc/xorg.conf-aticonfig
		X_MOUSE_PROTOCOL   = "PS/2"
		XkbModel           = "pc105"
		XkbLayout          = "us"
		XkbSymbols         = "us(pc105)"
		XkbGeometry        = "us(pc105)"
		#X_COLOR_DEPTH      = 24

		USE_XFS            = N
		SCREEN_01          = shell
		SCREEN_07          = startx
		SYSLOG_HOST        = 192.168.18.13


For nvidia, I believe the essentials are
Section "ServerLayout"
		Identifier "XFree86 Configured"
		Screen      0   "Screen0" 0 0
		InputDevice     "Keyboard0" "CoreKeyboard"
		InputDevice     "Mouse0" "CorePointer"
EndSection
Section "Device"
		Identifier "My Video Card"
		Driver     "nvidia"
		Option "TwinView"
		Option "SecondMonitorHorizSync" "30-70"
		Option "SecondMonitorVertRefresh" "50-85"
		Option "MetaModes" "1280x1024,1280x1024"
		Option "TwinViewOrientation" "LeftOf"
		Option  "NvAGP" "1"
		BusID   "PCI:0:11:0"
EndSection


Enable xdmcp and gdm
Run gdmsetup, click the xdmcp button. then restart gdm. Make sure you have gdm configured to start automatically. I believe gdmsetup adds this to /etc/gdm/gdm.conf. Not 100% sure.
[xdmcp]
Enable=true


LTSP-4.2

LTSP-5 is much simpler. Unfortunately, I'm stuck with a gentoo LTSP server, which runs LTSP4. Here are the stuff I came across when trying to load a GBe network driver.. I ended up having to upgrade to LTSP-4.2.

Read
http://www.ltsp.org/twiki/bin/view/Ltsp/Build-LTSP-42
http://www.ltsp.org/twiki/bin/view/Ltsp/DownLoads
http://ltsp.mirrors.tds.net/pub/ltsp/docs/ltsp-4.1-en.html#AEN754

LTSP boot process

Inevitably, you will learn about this process if you tried to add a module without going thru the official LTSP doc.. and I think it's a good thing to know.
  1. Thin client boots from network, obtaining pxelinux.0 from tftpboot
  2. Thin client downloads initramfs.gz and the kernel image from tftp, which contains a minimal OS environment. This file is extracted to /dev/ram0 on the thin client, and mounted as root. It will then execute the init script or the linuxrc script in older version.
  3. The init script loads the network driver, starts up dhcpcd, mounts the NFS share on LTSP server, and "newroot" to that
  4. System continues to load modules specified in LTSP_NFS_SHARE:/etc/lts.conf, and startup X and another stuff specified in the SCREEN_0x directive in lts.conf

DHCPd
option option-128 code 128 = string;
option option-129 code 129 = text;
subnet 192.168.18.0 netmask 255.255.255.0 {
...
}
group {
		host ws12 {
				hardware ethernet 00:1e:0b:79:f4:07;
				fixed-address 192.168.18.112;
				filename "/2.6.20.9-ltsp-1/pxelinux.0";
				#option option-128      e4:45:74:68:00:00;
				#option option-129      "NIC=tg3";
				option root-path        "192.168.18.11:/opt/ltsp42/i386";
		 }
}


Tftpd
/usr/sbin/in.tftpd -l -s /tftpboot


pxelinux.cfg
Boot options can be specified in /tftpboot/2.6.20.9-ltsp-1/pxelinux.cfg/default. When the thin client boots, you will see that it tries to load the pxelinux.cfg with several names. If one is found, then it will use that file. If none is found, it will use the default file. It's the place to customize each LTSP client's config.

prompt 0
label linux
  kernel bzImage-2.6.17.8-ltsp-1
  append rw root=/dev/ram0 initrd=initramfs-niclist.gz vga=791 NIC=tg3 panic=180  debug


nfs exports
/opt/ltsp42/i386 192.168.18.0/255.255.255.0(ro,no_root_squash,async)


lts.conf
Lots of stuff to cover. Just make sure there is a lts.conf in $NFS_ROOT/etc/


Installing LBE

LBE comes to play when the pre-make ltsp kernels do not satisfy you. My directory structure:

Getting LBE
cvs -d :pserver:anonymous@cvs.ltsp.org:/usr/local/cvsroot checkout lbe


Fetch source and build LBE
If any of the source does not download, go to http://ltsp.mirrors.tds.net/pub/ltsp/tarballs and download it to the tarballs directory. Then re-run build_all --fetch. It tries to download and install a whole bunch of tools which already on the host machine. To me, it doesn't make sense to waste that much time but who knows...

cd lbe
./build_all --fetch
./build_all
cd ltsp-src
./build --makepkg
cd ../packages
cat *.ltsp >packages.list


Building the kernel
Download the correct kernel from www.kernel.org. What's the correct kernel? Check LTSP_nts_share/lib/modules/2.6.x
cd /usr/src
tar jxf linux-2.6.20.9.tar.bz2
cd linux-2.6.20.9
# find config file from the LBE directory and use it as old config
# edit make file and append -ltsp-3 or whatever that extra version is to the EXTRAVERSION variable
make oldconfig
make menuconfig
# for me, I enabled PCIe
make -j3
make modules_install


Add extra modules if necessary
For me, I want to load the latest tg3 driver
# refer to tg3's install doc
make KVER=2.6.20.9-ltsp-1
make KVER=2.6.20.9-ltsp-1 install


Build initramfs
If you need to modify the init script ran by your thin client, edit the init file inside $LBE_HOME/ltsp_kernel_kit/initramfs. There the skeleton of the thin client OS environment is stored.

cd /usr/local/lbe/ltsp_kernel_kit
./build_initramfs
# you will be asked about the kernel version, etc.


Comments [Hide comments/form]
Hey, kiellr job on that one you guys!
-- hosted.by.xsserver.e (2011-12-31 20:54:58)
OmQK1u <a href="http://hzktktkxoayp.com/&
-- p4217-ipbf710hodogay (2012-01-01 03:47:22)
RZ6MPq , [url=http://cweqzileglgf.com/]cweqzileglg
-- ns.espace.spb.ru (2012-01-02 05:46:35)
1qPVUO <a href="http://axezlmqryfga.com/&
-- 223.27.81.195 (2012-01-02 12:38:11)
rgWC3A , [url=http://hafrpzqirbnm.com/]hafrpzqirbn
-- 69.163.35.77 (2012-01-03 07:59:17)
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki