Technical:Booting:Laptop
From K12LTSP Wiki
The information contained here was copied from a message on the LTSP mailing list. It's really ugly. Someone should clean it up. The info, however, is invaluable. It describes how to install just a few pieces onto a laptop's hard drive and use those to act like a thin client.
A laptop-as-thin-client will boot much faster, does not need to spin its hard disk (after booting) and will thus consume less energy (running longer on battery) and produce less noise.
In the meantime I found out how to use ltsp. Since this has been asked many times before, here the solution:
The problem is, that although ltsp 4.2 has all the necassary modules, they are not in the initrd image. So we have to add them. I did all the following on the server as root, but I am not sure if this is necassary for all the steps (for the first step it defenitely is):
1. become root and unpack the initrd supplied by ltsp 4.2. If you want to use another kernel, you have to change the version number:
- su
- mkdir initrd
- cd initrd
- cat /tftpboot/lts/2.6.17.8-ltsp-1/initramfs.gz | gunzip | cpio -id
2. Add the missing PCMCIA modules (dont know, if they are all needed) cp -r /opt/ltsp/i386/lib/modules/2.6.17.8-ltsp-1/kernel/drivers/pcmcia lib/modules/2.6.17.8-ltsp-1/kernel/drivers/
3. Add the modules to modules.dep: Edit 'lib/modules/2.6.17.8-ltsp-1/modules.dep' (in the initrd directory you created before) and add all the lines begining with '/lib/modules/2.6.17.8-ltsp-1/kernel/drivers/pcmcia' from '/opt/ltsp/i386/lib/modules/2.6.17.8-ltsp-1/modules.dep'.
4. Add the following three lines near to the beginning of 'init' (in the initrd directory you created before):
...
[ "${SLEEP}" -gt 0 ] && sleep ${SLEEP}
echo "modprobing yenta_socket ..." # Add this line
modprobe yenta_socket # Add this line
sleep 3 # Add this line
if [ -z "${NIC}" ]; then
...
5. Now we can pack our own initrd:
- find ./ | cpio -H newc -o | gzip > ../myinitrd.gz
6. Next step is to put the created Initial ram disk (myinitrd.gz) and the kernel (/tftpboot/lts/2.6.17.8-ltsp-1/initramfs.gz) on the laptops harddisk and boot them. There are several ways to do so (lilo, loadlin, syslinux, ...). Since I have only a floppy connected to my laptop, I installed DOS, copied the kernel, initrd and loadlin.exe (be sure to use the latest version, I think its 1.6c) to a directory named c:\ltsp and put a batchfile there named ltsp.bat with
loadlin bzimage initrd=myinitrd.gz root=/dev/ram0 rw vga=791
I then added the following to the end of autoexec.bat:
cd ltsp call ltsp
Thats it. After rebooting your laptop you should see the display manager of your server comming up (of course after setting up your server with ltsp as described in the manuals).
I only tested this with my wired PCMCIA network card. However, I think it should also be applicable to wireless PCMCIA cards. Maybe with some tweaking.
