Diskless Remote Boot in Linux (DRBL)
[Copyright] [Authors] [Preamble] [Change Logs] [Requirements] [Install] [Download] [Acknowledgement] [Misc] [Donate!] [Wiki] [Reference]
1. Copyright
This copyright is preserved for the author and publisher. Anyone is permitted to copy and distribute verbatim copies of this document under the terms of the GNU FDL Free Documentation License. If you do make any distribution and modification on the documents, please add your name in the author list. We recommend this document principally for works whose purpose is instruction or reference. The author and publisher will not take any responsibility if
there is any damage caused by this document.
2. Authors
Steven Shiau (steven _at_ nchc org
tw)
Blake, Kuo-Lien Huang (klhaung _at_ gmail com)
H. T. Wang (c00wht00 _at_ nchc org tw)
Ceasar Sun (ceasar _at_ nchc org tw)
Jazz Wang (jazz _at_ nchc org tw)
Thomas Tsai (thomas _at_ nchc org tw)
3. Preamble
This document describes the steps to setup the "DRBL" environment in Debian Woody(3.0)/Sarge(3.1)/Etch, B2D, Ubuntu Breezy(5.10), Dapper(6.06), RedHat Linux 8.0, 9, Fedora Core 1, 2, 3, 4, 5, Mandrake 9.2, 10.0, 10.1, Mandriva LE2005 (10.2), 2006, CentOS 4 (4.3), SuSE 9.3 and OpenSuSE 10.0. Sorry but it will not work in other distributions or versions.
4. Change Logs
- 2003/07/28 Begin to write this manual "DRBL for RedHat 9"
- 2003/08/01 Add the notes for bug of RH9 glibc
- 2004/03/27 Support RedHat 8.0, 9, FC1 and Mandrake linux 9.2,10
- 2004/07/22 Add doc for FC2.
- 2005/01/28 Add url of unstable version.
- 2005/02/07 Add FC3 note.
- 2005/03/11 Add screenshot and donation.
- 2005/05/01 Use etherboot 5.4.0 as an example in step 4.
- 2005/06/23 Update some messages.
- 2005/10/26 Update with the one-for-all version.
- 2005/11/19 Update with SuSE 10.0/OpenSuSE 10.0.
- 2005/11/19 Use etherboot 5.4.1 as an example in step 4, and add grub netboot.
- 2006/05/15 add (1) description for full DRBL, full Clonezilla, DRBL SSI, and Clonezilla box modes. (2) WinGRUB.
5. Basic requirements
- Check here
for more details.
6. Setup the Diskless
Remote boot in Linux (DRBL) Environment
-
Install the GNU/Linux distribution. We will use RedHat 9 as an example. There are lots of information related to the installation process in http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/install-guide/.
First, set up all Ethernet IPs. We will us the eth0 for WAN and others for the LAN. In the following example, we use "eth0" to connect the Internet, while eth1, eth2, eth3 are for DRBL environment(set the network card's IP addresses to be private IPs (i.e. 192.168.x.x, the following example, we set eth1:192.168.101.254, eth2:192.168.102.254, eth3:192.168.103.254...); Please remember this principle, private IP (e.g. 192.168.x.x) is used for DRBL environment.
Your firewall rules will be overwritten when setting up the DRBL server. After completing the DRBL setup and successfully testing it, you can config your firewall using your own rules. Remember, in the DRBL environment, NFS, NIS, tftp, and dhcp services are required, so dot NOT block them in your firwall rules.
-
After Linux is installed on the server, make sure the hard disk drive DMA mode is on. It will accelerate the access speed of the server's hard disk drive. Use "hdparm /dev/hdx" to check to see if the DMA mode is on or off. If it is off, run "hdparm -d1 -c3 -k1 /dev/hdx" to turn it on. Replace the /dev/hdx to the /dev/hda if your IDE HD for this Linux system is in "Primary IDE."
-
Make sure the WAN is operating properly because it will be used to connect with the NCHC DRBL repository to get the installation files for the following process.
-
Note:Regarding Selinux in Fedora Core 3 or later version - Unless you are an administrator who thoroughly understands SELinux, we recommend you turn SELinux off, otherwise you will probably encounter some unusual problems such as "Permission denied." To disable SELinux, set SELINUX=disabled in /etc/sysconfig/selinux or /etc/selinux/config and then reboot your machine.
- If you have only one NIC, you may set two IP addresses, i.e. one in eth0 and another alias IP address in eth0:1. eth0 will be used for the DRBL server to connect to the public Internet while eth0:1 will be used for the DRBL environment. Here's how to setup eth0:1 in RedHat-like Linux. NOTE! This alias IP address will cause some problems if you do not provide static IP address to DRBL client via its MAC address. In this example, the DRBL server will lease IP address to any machine connected to eth0 if no MAC address is set in the DHCP service. Hence you'd better not to use alias IP if you do not know exactly what you are doing! Two or more NICs are recommended!
II.
Setup the clients
Note: This process is done in the server but its purpose is for use by the clients. NOTE! You have to finish the step 1 before doing the step 2 here.
- Before downloading or installing, read the "Change log" for different branches: stable, testing, unstable.
Also refer to "Known issues" for different branches. This is especially important when your client machine has an annoying SIS network interface card:stable, testing, unstable.
- <Step 2a> According different distribution, we have different method to get and install program "drbl"
- RedHat/Fedora Core/Mandriva (Mandrake)/CentOS
- Download DRBL RPM file:
Stable branch: SourceForge site or NCHC site
Testing branch: NCHC site
Unstable branch: NCHC site
- If you do not login as a system administrator (root), execute the command "su - root", then enter root password to sign in at the root
- Execute "rpm -Uvh drbl-XXX.i386.rpm" to install package DRBL, the "drbl-XXX.i386.rpm" is the program name you just downloaded. If you just download the drbl rpm in the stable branch, then execute "rpm -Uvh drbl-current.i386.rpm".
- Note: A perl module is necessary for drbl rpm. Most of the distribution will install package "perl-Digest-SHA1" by default, if rpm complains perl-Digest-SHA1 is necessary, install it manually. As an example, in Fedora Core 1, you can install it by "rpm -Uvh http://free.nchc.org.tw/fedora/linux/core/1/i386/os/Fedora/RPMS/perl-Digest-SHA1-2.01-15.i386.rpm" or by "yum install perl-Digest-SHA1" if you have already configured your yum config.
- Debian or Ubuntu
- Edit /etc/apt/sources.list per the following:
- If your distribution is based on Sarge (3.1) (i.e. genuine Debian Sarge or other derived version like B2D pureKDE20051011 or others):
----------
deb http://free.nchc.org.tw/debian sarge main
deb http://free.nchc.org.tw/drbl-core drbl stable
----------
If your distribution is Woody (3.0):
----------
deb http://free.nchc.org.tw/debian/ woody main
deb http://free.nchc.org.tw/drbl-core drbl stable
deb http://www.backports.org/debian/ woody grep
----------
If it's Ubuntu Breezy (5.10):
----------
deb http://free.nchc.org.tw/ubuntu breezy main restricted universe multiverse
deb http://free.nchc.org.tw/drbl-core drbl stable
----------
If it's Ubuntu Dapper (6.06):
----------
deb http://free.nchc.org.tw/ubuntu dapper main restricted universe multiverse
deb http://free.nchc.org.tw/drbl-core drbl stable
----------
---------- - Regarding the 1st line in the above, you can use other apt repository for Sarge, Woody or Ubuntu Breezy. The 2nd line, however, is for DRBL-related programs. Do not change this.
If you want to use the DRBL's testing branch, the 2nd line is:
----------
deb http://free.nchc.org.tw/drbl-core drbl stable testing
----------
If you want to use the unstable branch of DRBL, set the 2nd line as:
----------
deb http://free.nchc.org.tw/drbl-core drbl stable testing unstable
----------
- Execute "apt-get update"
- Execute "apt-get install drbl" to install drbl program.
- PS. There are two DRBL-core mirror sites: (1) http://diskless.nchc.org.tw/drbl-core and (2) http://drbl.sourceforge.net/drbl-core
- SuSE
- If you do not login as a system administrator (root), execute the command "su - root", then enter root password to sign in at the root.
- For SuSE 9.3 (Since there is not built-in apt/yum in SuSE 9.3, you have to install it first.)
- Download this program first: "http://linux01.gwdg.de/~scorot/install-apt4suse"
- Execute "sh install-apt4suse" to install apt for SuSE
- Edit /etc/apt/sources.list, the content should contain these lines at least:
-----------------------------------
rpm ftp://mirrors.mathematik.uni-bielefeld.de/pub/linux/suse/apt SuSE/9.3-i386 base
rpm http://free.nchc.org.tw/drbl-core i386 drbl-stable
-----------------------------------
- You can assign other SuSE apt repository in the fist line above, but keep the 2nd line as.
If you want to use the testing branch of DRBL, the 2nd line will be:
----------
rpm http://free.nchc.org.tw/drbl-core i386 drbl-stable drbl-testing
----------
If you want to use the unstable branch of DRBL, set the 2nd line as:
----------
rpm http://free.nchc.org.tw/drbl-core i386 drbl-stable drbl-testing drbl-unstable
----------
- Execute "apt-get update"
- Execute "apt --no-checksig install drbl" to install the DRBL program.
- PS. There are two DRBL-core mirror sites: (1) http://diskless.nchc.org.tw/drbl-core (2) http://drbl.sourceforge.net/drbl-core
- For OpenSuSE 10.0, 10.1/SuSE 10.0, 10.1
- Download the DRBL RPM file:
Stable branch: sourceforge site or NCHC site
Testing branch: NCHC site
Unstable branch: NCHC site
- Execute "rpm -Uvh drbl-XXX.i386.rpm" to install package DRBL, the "drbl-XXX.i386.rpm" is the program name you just downloaded, such as "drbl-1.5.5-12.i386.rpm".
- <Step 2b> Execute "/opt/drbl/sbin/drblsrv -i". Note: There is a space before the "-i". This is the example execution. If you are uncertain, just press Enter to accept the deault value.
For the impatient: If you are impatient, run "/opt/drbl/sbin/drbl4imp" to finish step "2c" and "3a". "drbl4imp" uses the default vaules to setup the DRBL server. THIS IS VERY IMPORTANT! The default value might not fit your environment! It uses the "range" option in dhcp server so your DRBL client will not always get the same IP address. It also assumes each of the server's network card (except eth0) provides DRBL services to 12 clients. If you want the setup to fit your environment, please run steps "2c" and "3a" step-by-step.
-
Taking NCHC's computer class room C as an example: There are 40 computers. In order to get DRBL to work more efficiently, we separated them to 4 subnets: 192.168.100.0, 192.168.101.0, 192.168.102.0 and 192.168.103.0. There are four Ethernet cards in DRBL server. One is for WAN and the others are for LAN. The IPs of DRBL environment (LAN) are 192.168.100.254, 192.168.101.254, 192.168.102.254 and 192.168.3.254. The services DHCP, TFTP, NFS, etc will run on eth0:1, eth1, eth2, and eth3.
NIC NIC IP Clients
+-----------------------------+
| DRBL SERVER |
| |
|+-- [eth0] public IP +- to WAN
| (ex. 61.216.116.23) |
| |
|+-- [eth0:1] 192.168.100.254 +- to clients group 1 [ 10 clients, their IP
| | from 192.168.100.1 - 192.168.100.10]
|+-- [eth1] 192.168.101.254 +- to clients group 1 [ 10 clients, their IP
| | from 192.168.101.1 - 192.168.101.10]
|+-- [eth2] 192.168.102.254 +- to clients group 2 [ 10 clients, their IP
| | from 192.168.102.1 - 192.168.102.10]
|+-- [eth3] 192.168.103.254 +- to clients group 3 [ 10 clients, their IP
| | from 192.168.103.1 - 192.168.103.10]
+-----------------------------+
- There are four modes available from DRBL version 1.6.3 or later: Full DRBL, Full Clonezilla, DRBL SSI (Single System Image) and Clonezilla Box. The network bandwidth and disk space requirement are higher in the former two modes, but all the system settinig will be saved to server's disk, and every client can have its own individual setting. On the other hand, the DRBL SSI uses single system image for all clients, and the necessary individual settings of clients are created run-time when they boot. This will reduce the required disk space in the server since only one image is necessary. However, the disadvantage is every client can NOT have its own individual system setting (Users' setting will be saved to server). In DRBL SSI mode, once there are extra client nodes want to join DRBL environment, all you have to do is modify the dhcpd config file (dhcpd.conf), then use "/opt/drbl/sbin/dcs -> others -> gen_3N_conf" to create or run "/opt/drbl/sbin/drbl-3n-conf generate", the necessary files will be created. In this mode, theoretically one network card in the server can provide 253 clients. The fourth mode, Clonezilla box mode, is based on DRBL SSI mode, especially for clone system. If you want to use DRBL SSI mode, make sure your client has large memory (say > 512 MB), and all the hardware (especially the graphic card) in the clients are the same. Check this comparison table for these four modes.
- Notes for network switch and NICs when using multiple NICs:
When you use multiple NICs to expand the bandwidth, we recommend you set the MAC addresses so that every node will get the same IP address all the time. (i.e. in the fillowing step 3a, when you run "/opt/drbl/sbin/drblpush -i", it prompts "Do you want to fix the IP address of client connected to eth1 by giving MAC address ? [y/N]", choose "Y"). If you do NOT set MAC address (we will call it "range" from now), and you have only one 48-port network switch (or many switches but connected to be one), and you use four NICs (or more than two...) in DRBL server to expand the network bandwidth, a problem will occur (i.e. some clients will not lease IP from DHCP server) so it will not be able to
boot.
On the other hand, if your DRBL server uses four NICs to expand the network bandwidth (meaning that four NICs with four private subnets such as 192.168.100.x, 192.168,101,x, 192.168.102.x, 192.168.103.x), and you have exactly four switches that are seperated and not connected to each other, then you can use range (i.e. you do not have to set the MAC address of clients).
Remember, if you use N NICs to expand network bandwidth in the DRBL server, if using the "range" method, then you must have N switches and they can NOT be connected to each other.
- <Step 3a> run "/opt/drbl/sbin/drblpush -i". The software will auto-detect the system to figure out the argument. If the argument is not set up in the system, the system will request you to do that. Examples: see here
IV. Setting up clients to use the DRBL environment
- There are four different scenarios where you can make clients boot from network: 1) the client has PXE network interface card, 2) the client has a floppy drive, 3) the client has a CDROM, 4) the client has a local hard drive. We use etherboot 5.4.2 as an example for cases 2-4. NOTE! With DRBL version 1.3.9 or later, if you want to use Etherboot, Etherboot bersion 5.4.0 or newer is required.
- Case 1: The client has a PXE network interface card
- Set the client's BIOS to boot from "LAN" or "network". That's it. Let client boot and enjoy DRBL!!!
- Case 2: The client has a floppy drive.
- <Step 4a> Get the image file first.
- Use the "universal" image /tftpboot/etherboot-5.4.2/etherboot-net.zdsk in the DRBL server. It supports most modern network cards. (Ref: here. If this universal image fails, try using specific image for client's network card, the image file is located in /tftpboot/etherboot-5.4.2/. As an example, if you have a Realtek 8139 network card, use the image /tftpboot/etherboot-5.4.2/rtl8139.zdsk.
- <Step 4b> Insert the floppy to floppy drive in DRBL server
- Run "cat /tftpboot/etherboot-5.4.2/etherboot-net.zdsk > /dev/fd0" in the DRBL server.
- If you want to create the image floppy in M$ windows, download rawrite.exe or "RawWrite for windows" (http://uranus.it.swin.edu.au/~jn/linux/) to write the ROM image to floppy.
- <Step 4c> Put this floppy to client's floppy drive, make sure the floppy is the first boot device in the client's BIOS. If everything was done correctly, after a few minutes, the clients will be waiting for you to login, All the accounts are same as the ones in server.
- Case 3: Client has a CDROM (Reference):
- 1) The "universal" image is located in /tftpboot/etherboot-5.4.2/etherboot-net.iso
2) Burn the ISO to a CD:
cdrecord -v speed=12 fs=16m dev=0,0,0 -data etherboot-net.iso
(If necessary, modify "dev=0,0,0", run "cdrecord -scanbus" to get your CD burner.)
3) Ensure the PC is set to boot from CDROM, place the burned CD in the drive, and reboot. Done!
- Case 4: client has a local hard drive
- If the client has a local hard drive which is installed with the bootloader grub in GNU/Linux:
1. Copy the file "/tftpboot/etherboot-5.4.2/etherboot-net.zlilo" to client's directory "/boot/" in its harddisk
2. Append one block in the client's /boot/grub/menu.lst or /boot/grub/grub.conf (depends on your distribution) like this:
---------------
title Etherboot-PXE
kernel /boot/etherboot-net.zlilo
---------------
3. Change the default boot to the corresponding one above, like "default 1", in menu.lst or grub.conf in client.
- If the client is running M$ Windows XP/2K on its hard disk:
You can install WINGRUB. Put the file etherboot-net.zlilo in C:\, and the files: C:\boot.ini and C:\GRUB\MENU.LST look like: (This method is only suitable for installing wingrub in BOOT.INI (Tool -> Install grub -> Boot from BOOT.INI). If necessary, you can use other modes provides by WinGRUB):
boot.ini:
---------------
[boot loader]
timeout=30
default=C:\GRLDR
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
C:\GRLDR="Etherboot"
---------------
MENU.LST:
---------------
timeout 7
title etherboot
root (hd0,0)
kernel /etherboot-net.zlilo
title Windows at (hd0,0)
root (hd0,0)
chainloader +1
---------------
- If the client has local hard drive which is installed with M$ Windows 9x:
1. Copy the file "/tftpboot/etherboot-5.4.2/etherboot-net.com" to client's hard disk
2. Rename it so that it is shorter in client, for example, "eb-net.com".
3. Write a multi-boot config file in the client (e.g. add one paragraph to run "eb-net.com").
V. Additional usage for the DRBL environment
- Some useful scripts are located in the directories /opt/drbl/sbin and /opt/drbl/bin in the server, Take a look at them. Usage will appear by running them without parameters.
- The most useful command is /opt/drbl/sbin/drbl-client-switch or /opt/drbl/sbin/dcs which sets the client's default boot mode. Here's a screenshot of what it looks like:

- If you want to upgrade DRBL packages when new version is available, refer to this FAQ.
Acknowledgements
- The authors would like to thank NCHC's Director Joe Juang for his support in the growth of Free and Open Source Software. Special thanks also to Dr. San Ko. The authors also would like to thank Prof. Mao, Mr. Yu and the Ministry of Education, Taiwan for its support of multi-disciplinary education.
Misc.
- If you think DRBL is the greatest thing since sliced bread, email us and let us know how you use it. If you find any bug, please let us know.
Donate!
Wiki
References