Technical:Booting:Client:LiLo
From K12LTSP Wiki
The majority of this document was written by Ken Barber some procedures have been modified to extend the capability of this operation.%%% This document was reproduced with the written permission of the orginal author. The original document can be found here: http://www.peak.org/~mountainman/misc/LTSP-boot.html
Another very similar technique is documented at http://www.wizzy.org.za/article/articlestatic/14/1/2/ - it is a one-step process that requires a modified Toms Root/Boot disk (available from that site), and is generic, in that it works with all Network Cards.
Another technique, using FreeDos and other DOS tools, can be found at http://etherboot.anadex.de/ .
Booting LTSP workstations from a hard drive
Items Needed:
- One formatted floppy with at least 64k of free space
- One Tom's Root Boot disk. For instructions on getting and making a Tom's Root Boot disk, see the footnotes at the end of this page.
- Internet connection
- Knowledge of how to use the linux fdisk program. If you're not already familiar with it, you might want to have a printed man page handy.
Step one: download the correct boot image for your network card
You will need to know the make and model of your NIC's chipset. You probably already know this, since discovering this information is part of every LTSP install.
- Go to www.rom-o-matic.net and choose the latest production release. At this writing, that is 5.0.11.
- Find your NIC in the "Choose NIC/ROM Type" listbox.
- In the "Choose ROM output format" listbox, choose "LILO Bootable ROM (.lzlilo Image)"
- Then press the "get ROM" button.
- After it is downloaded, copy it to a floppy and take the floppy to the workstation in question.
Step two: fdisk the workstation's hard drive
- Boot the workstation with a Tom's Root Boot floppy. When it tells you to remove the floppy, leave it in. You will need it later. Log in as root, just like it tells you to do on the screen.
- Run fdisk...
fdisk /dev/hda - ...and use it to clear all partitions from the hard drive and put one linux partition in their place. It doesn't matter how big or small this partition is; you'll only be using a tiny amount (less than one cylinder) of it anyway.
Fdisk tips:
- Type "m" to see a menu
- "p" will show you all of the partitions that are currently on the drive
- Then you can use "d" to get rid of them. Get rid of the last partitions first, working your way up to the first one.
- Use "p" again to make sure all partitions are gone.
- Then use "n" to create a new partition. Make it the first partition and accept the defaults for anything you don't understand.
- There are two ways to quit fdisk. One of them leaves the partition table unchanged. Make sure you use the option that SAVES and exits==== ====
Step three: put a filesystem on the hard drive and mount it
- Make a filesystem on the new partition:
mke2fs /dev/hda1 - Make a /boot directory in your RAMdisk:
mkdir /boot - Mount the hard drive into it:
mount /dev/hda1 /boot - Mount the Tom's Root Boot floppy into /mnt:
mount /dev/fd0 /mnt
Step four: Copy the needed LILO files to the hard drive
- Copy LILO's "boot.b" file to the hard drive:
cp /mnt/boot.b /boot - Unmount the Tom's Root Boot floppy:
umount /dev/fd0 - Take out Tom's Root Boot and put in the floppy with the boot image on it
- Mount the floppy to /mnt:
mount /dev/fd0 /mnt - List the files in /mnt:
ls /mnt - Copy the boot image file to the hard drive (you will have to supply the actual text for what is represented in italics):
cp /mnt/NAMEOFIMAGE_FILE /boot
Step five: Create the hard drive's boot sector %%%
This is a lengthy command and you must be sure you type all of it in without making any mistakes. Pay close attention to the placement of the spaces and dashes; every one of them is important. You will have to supply the actual text for what is represented in italics:
echo image<code>/boot/NAMEOFIMAGE_FILE labelLTSP || /usr/bin/lilo -C - -b /dev/hda -i /boot/boot.b -c -m /boot/map</code>
You should get a short message from LILO. At this point you can reboot and the workstation should "just work."
If it doesn't boot, you might try zero-filling the first megabyte or so of the hard disk. Boot with Tom's Root Boot and type in the following command:
dd if<code>/dev/zero of/dev/hda count=1000000</code>
and then go back to step two and do everything over. Footnote
To download Tom's Root Boot, go to his web site http://www.toms.net and pick a mirror. You'll be dropped into an ftp session on the mirror. Some mirrors put the Tom's Root Boot files in a directory with a bunch of other utilities and it can be daunting to figure out which one you want.
You want the one that starts with 'tomsrtbt' and ends with '.tar.gz'. Download it, untar it, and cd into the directory it creates. Then insert a known-good floppy (doesn't have to be formatted, but you might want to format it first just to make sure it's good) and run the shell script
./install.s
and it will create the floppy.
