4. Preparing boot filesNow that the server is set up, you need to prepare the files to make the client boot. Two files are necessary: the kernel and the init ramdisk (initrd) which will be mounted by the kernel as the root file system. This document assumes that the procedures outlined in this section and the next are made in the client machine. Normally, when saving and restoring disk images, there is no need to have Linux installed on a local hard disk. To deploy disk images to a number of machines, start by installing a Linux distribution on one machine for each model. Use DHCP and have TFTP client to test the setup made in the previous section. Unless otherwise noted, commands are issued in the bash shell by the user root in a working directory. 4.1. KernelIdentify the compressed kernel file:
The version may vary, according to your system. Upload this file to the TFTP server, renaming it to vmlinuz:
You may want to keep the file name, or have different names for different hardware models or kernel versions. We use the same names for the kernel and initrd so we don't have to make another boot floppy disk after changing the kernel or the initrd images. 4.2. Files on initrdNext, make the root file system image for the client. The full listing of the files is in Appendix A. These files have been taken from a working system as a minimum configuration for having powerful shell (bash), client network utilities (dhcpcd and tftp), and copying and compressing utilities (dd, gzip). Administrative commands (mknod, mount, fdisk and insmod) are also present. In the working directory create a file named initrd.lst and put these file names on it. To check the existence of these files in your system, run the following command:
You should get an error output like this:
The first error is a script to be created in the working directory. The second error is the program tftp found in the directory /usr/bin instead of /bin. The third is the network interface card module (probably not yours) found in the directory /lib/modules/$(uname -r)/kernel/drivers/net. These three files will be discussed in upcoming sections separately soon. If there are other missing files, check for lack of installation or differences in version, distribution or hardware. Adjust the list to match your system. 4.3. Packing initrdThe next step is to make the image. A size of 4 Mbytes was enough to hold the files in our setup. You may increase this size if necessary.
Now the three files excluded by the egrep command. Copy the tftp program from /usr/bin to the image directory:
Identify the proper module for your network interface card. Use the output of the commands lspci and lsmod to identify the file, which resides in the directory /lib/modules/$(uname -r)/kernel/drivers/net.
Edit the clone script found in Appendix B, changing the variables as explained in Section 6. Make it executable and copy it to the image directory:
Unmount, compress, and send the initrd image.
Linux HOWTO full list |
|
This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |