Network Boot and Exotic Root HOWTO
Total Page:16
File Type:pdf, Size:1020Kb
Network Boot and Exotic Root HOWTO Brieuc Jeunhomme frtest [email protected] Logilab S.A. Revision History Revision 0.3 2002−04−28 Revised by: bej Many feedback inclusions, added links to several projects Revision 0.2.2 2001−12−08 Revised by: dcm Licensed GFDL Revision 0.2.1 2001−05−21 Revised by: logilab Fixed bibliography and artheader Revision 0.2 2001−05−19 Revised by: bej Many improvements and included Ken Yap's feedback. Revision 0.1.1 2001−04−09 Revised by: logilab First public draft. Revision 0.1 2000−12−09 Revised by: bej Initial draft. This document explains how to quickly setup a linux server to provide what diskless linux clients require to get up and running, using an IP network. It includes data and partly rewritten text from the Diskless−HOWTO, the Diskless−root−NFS−HOWTO, the linux kernel documentation, the etherboot project's documentation, the linux terminal server project's homepage, and the author's personal experience, acquired when working for Logilab. Eventually this document may end up deprecating the Diskless−HOWTO and Diskless−root−NFS−HOWTO. Please note that you'll also find useful information in the From−PowerUp−to−bash−prompt−HOWTO and the Thin−Client−HOWTO, and the Claus−Justus Heine's page about NFS swapping. Network Boot and Exotic Root HOWTO Table of Contents 1. Introduction.....................................................................................................................................................1 1.1. What is this all about?.......................................................................................................................1 1.2. Thanks...............................................................................................................................................1 1.3. Diskless booting advocacy................................................................................................................1 1.3.1. Buying is cheaper than building.......................................................................................1 1.3.2. Advantages of diskless computers....................................................................................1 1.4. Requirements....................................................................................................................................2 1.4.1. Hardware requirements.....................................................................................................2 1.4.2. Software requirements......................................................................................................3 1.5. Acknowledgements and related documentation...............................................................................3 1.6. Feedback...........................................................................................................................................3 1.7. Copyright Information......................................................................................................................3 2. Diskless booting operation overview.............................................................................................................4 2.1. Obtaining IP parameters...................................................................................................................4 2.2. Loading the kernel............................................................................................................................4 2.3. Mounting the root filesystem............................................................................................................4 2.4. Terminating the boot process............................................................................................................4 3. Building the kernel..........................................................................................................................................6 3.1. When the root filesystem is on a ramdisk.........................................................................................6 4. Daemons setup.................................................................................................................................................8 4.1. NFS daemon.....................................................................................................................................8 4.2. BOOTP daemon................................................................................................................................8 4.3. TFTP.................................................................................................................................................9 5. Clients setup, creation of the root filesystem..............................................................................................10 5.1. Creating the first files and directories.............................................................................................10 5.2. The /var and /etc directories............................................................................................................11 5.3. Last details......................................................................................................................................12 5.4. Trial.................................................................................................................................................13 5.5. And Error!.......................................................................................................................................13 6. Several ways of obtaining the kernel...........................................................................................................14 6.1. BOOTP or DHCP capable NICs.....................................................................................................14 6.2. Kernel on a local floppy or hard drive............................................................................................14 6.3. Bootloader without kernel on a local floppy or hard drive.............................................................14 6.4. Creating ROMs for the clients........................................................................................................14 6.4.1. LanWorks BootWare PROMs........................................................................................15 6.5. Local CDROM................................................................................................................................15 6.5.1. Creating a test setup........................................................................................................16 6.5.2. Creating the CD..............................................................................................................17 6.5.3. Boot the cd and test it.....................................................................................................18 7. How to create diskless MS−Windows stations?.........................................................................................19 8. Troubleshooting, tips, tricks, and useful links...........................................................................................20 i Network Boot and Exotic Root HOWTO Table of Contents 8.1. Transparently handling workstations'specific files.........................................................................20 8.2. Reducing diskless workstations'memory usage..............................................................................20 8.3. Swapping over NFS........................................................................................................................20 8.4. Swapping over network block devices...........................................................................................21 8.5. Getting rid of error messages about /etc/mtab or unmounted directories on shutdown.................21 8.6. Installing new packages on workstations........................................................................................22 A. Non−Volatile Memory chips.......................................................................................................................23 B. Determining the size and speed of EPROMs to plug in a NIC................................................................25 C. Companies selling diskless computers........................................................................................................27 References..........................................................................................................................................................28 ii 1. Introduction 1.1. What is this all about? Recent linux kernels offer the possibility to boot a linux box entirely from network, by loading its kernel and root filesystem from a server. In that case, the client may use several ways to get the first instructions it has to execute when booting: home made eproms, special network cards implementing the RARP, BOOTP or DHCP protocols, cdroms, or bootloaders loaded from a boot floppy or a local hard drive. 1.2. Thanks Logilab sponsored this HOWTO. Check their website for new versions of this document. I also thank the etherboot, netboot, plume and linux terminal server project developers and webmasters, who made it really possible to boot a Linux worstation over a network. Very special thanks go to Ken Yap, member of the etherboot project, whose comments greatly helped to improve the quality of this document. I also thank Jerome Warnier, main developer of the plume project, Pierre Mondié, Kyle Bateman, Peter T.