Why Diskless?
I first became interested in building a diskless Linux box when I was involved with a project to build a 64-node, 128 processor Beowulf cluster. The thought of 64 independent disk drives spinning away and consuming a few dozen watts apiece was bad enough, but I was going to be in charge of administering this beast, and it has always been my philosophy that the less there is, the less there is to go wrong. Getting rid of as much hardware as possible and keeping the node configurations as identical as possible was my goal.Diskless Linux
by Charles M. "Chip" ColdwellLast updated: Sep 17, 2002
NEW: RPM packages for RedHat Linux 7.3!
Overview
Why Diskless?
I first became interested in building a diskless Linux box when I was involved with a project to build a 64-node, 128 processor Beowulf cluster. The thought of 64 independent disk drives spinning away and consuming a few dozen watts apiece was bad enough, but I was going to be in charge of administering this beast, and it has always been my philosophy that the less there is, the less there is to go wrong. Getting rid of as much hardware as possible and keeping the node configurations as identical as possible was my goal.It seemed to me that the best way to run a diskless node was to put the root file system (which must be mounted read-write) in a RAM disk, and to use NFS to mount the remaining file systems read-only. Nonetheless, after extensive searching I was not able to find any single article that completely described this technique, although all the information in this article was gathered from various disparate sources on the Internet, in the Linux kernel documentation and in print publications. I have tried to provide pointers to the original sources where I could.
In fact, what my searches revealed to me is that there is a plethora of different ways to network boot, and once booted to run diskless. There are even compelling reasons for network booting if you do have local hard drives. The following table shows some of the possibilities.
| Function | this article describes | some alternatives |
|---|---|---|
| network boot ROM | PXE | Etherboot, Netboot |
| network boot loader | pxelinux | bpbatch |
| root file system | RAM disk | NFS root, local hard drive |
If you choose one option from each row of the table above, there are at least eighteen different combinations. Even though only a subset of these will actually work (nine of them, I think), that is still far more than I want to cover in this article, so I have settled on the options shown in the second column. I'll try to provide pointers to the others in the resources section below. An excellent article by Richard Ferri, "Remote Linux Explained" which appeared in the January, 2002 issue of the Linux Journal, covers some of the other possibilities, notably NFS roots and Etherboot ROMs.
Most of the discussion in this article is aimed at the Beowulf community (e.g. I refer to the network booting computers as "nodes" in what follows), although the technique is described in enough generality that I hope it will find wider applications. One of my personal favorites is to turn old PCs into X terminals, which can usually be done for the cost of a NIC with boot ROMs and some additional memory for a RAM disk to hold the root file system.
Network booting
If your box has no disk drive, then it is going to have to use some other device as the source of the boot loader (e.g. "LILO" or "GRUB") and bootable image (e.g. "vmlinuz"). In the Beowulf biz, folks have tried lots of alternatives. For example, Scyld's Beowulf product supports booting from floppy disk, CDROM, Linux BIOS, flash disk or PXE (see below) in addition to booting from the hard disk we are trying to eliminate. But properly speaking, diskless computers lack any kind of local persistent storage including hard disk drives, floppies and CD-ROMs. This leaves network booting as the only alternative.Back in the Good Old Days of low-numbered RFCs, companies like NCD worked out that the best way to boot a diskless machine (in the case of NCD, an X-Terminal) was to have it run BOOTP to obtain an IP address and the name of a boot image file from a BOOTP server, then use TFTP to download the boot image from a possibly different server and launch itself from there. Not a whole lot has changed since then except that BOOTP has been expanded and renamed DHCP, and the processes of getting a bootable image to the client is done in two steps on PCs: first a boot loader is downloaded and started, which will then download and start the operating system image.
In the case of a PC, the important thing is that the NIC must be able identify itself as a bootable device to the motherboard BIOS, and if chosen as the boot device, it must be able to download the boot loader and start it. This is
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



