Booting from the Ether

One of our finalists shows you how to enable the NIC to boot from the network.

EtherNET that is. I first read about the ThinkNIC New Internet Computer in Linux Journal, and I ordered one as soon as I finished the article! I had so many plans for the unit, none of which had anything to do with its original intention. If I could get my grandma to make room for one in her house, she could use it the way the manufacturer intended, but that's another story.

After booting the unit from a CD, I copied the CD to my development Linux box and started playing around. I made some changes then made a new CD. Of course I also made a typo, so I had to throw that CD away and make another one. This one brought up a shell window in addition to the Netscape window when the system started. That was fun, but a slow and expensive way to develop. I needed a way to make changes without having to burn a new CD each time.

The ThinkNIC computer comes with a 10/100 Base-T Ethernet adaptor based on the SiS 90010 chip. It even includes a boot ROM that allows you to boot the unit from the network. This article will describe the steps necessary to do this.

Booting a PC 101

Before we start talking about booting from the network, let's go over some basics on how a computer boots. A lot of things happen when you turn on a PC.

After all the hardware tests successfully, the system will check for other BIOS ROMs in the system. If a hardware manufacturer created a PC card that needs to be initialized when the system turns on, they could put a ROM on the card that the system BIOS could call to initialize the piece of hardware. If you have an Adaptec SCSI card in your system, you've probably seen the list of SCSI devices when your system boots. This list is printed by the SCSI card's BIOS ROM.

It is now time for the BIOS to look for a device that has an operating system. When you configure the BIOS, you usually can specify where to look for an operating system. By default, the system looks on the diskette in the first floppy drive, then on the first IDE hard drive. Usually, you can configure your system to look on the CD-ROM drive as well as on an SCSI drive. On the ThinkNIC computer, you can tell it to attempt to boot from the network.

The system BIOS loads one sector worth of information from the boot device and runs the program contained in that sector. The program code in that sector needs to load the rest of the operating system.

Booting from the Network

The boot ROM in the SiS 90010 chip implements the PXE boot protocol. PXE stands for preboot execution environment. It supports networking standards such as TCP/IP, TFTP and DHCP, so it should be simple to use with a Linux server. There will be a lot of acronyms in this section, so see the glossary for definitions.

The PXE boot ROM first sends a DHCP request to get an IP address. The DHCP server can send more information, such as the location of the boot-loader software. If the DHCP server doesn't send the location of the boot-loader software, the PXE ROM will send out a request for a PXE server.

Assuming the DHCP server sends the location of the boot-loader software, the PXE ROM will use TFTP to retrieve this software. The software will retrieve a Linux kernel that will run on the ThinkNIC computer. This kernel should be configured to use NFS to mount its root filesystem across the network.

Setting up the ThinkNIC

You will need to tell your ThinkNIC BIOS to boot from the network. When you turn on your computer and see the message ``Please wait, your NIC is starting'', press the Delete key on your keyboard. This should bring up the BIOS CMOS setup utility. Select the BIOS FEATURES SETUP option with the arrow keys and press Enter. Use the down arrow key to highlight the Boot From ROM Loader option. Use the Page Down key to set this to Enabled. Press the Escape key to leave this screen, then press F10 to save your changes and exit. If you have a CD-ROM in your ThinkNIC computer, remove it now.

When the ThinkNIC boots, you will see a message that says:

Intel UNDI, PXE-2.0 (build 068)
Copyright (C) 1997,1998,1999  Intel Corporation
DHCP MAC ADDR: XX XX XX XX XX XX
DHCP..

Write down the numbers next to MAC ADDR; these numbers represent the Ethernet hardware address of your network board. Sometimes this is called the MAC address of the card. Every Ethernet card in the world should have a unique Ethernet MAC address. We need to tell the DHCP server to give out a specific Ethernet address when it sees a request from this hardware address.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

pxelinux/gpxelinux

Doug Scoular's picture

Hi Jay,
Good article... but I was surprised that you didn't cover
pxelinux/gpxelinux which offers an amazing amount of functionality
in a PXE bootloader... with many plugin (com32) modules. There's
a complete menuing system too.

With gpxelinux you can even load your kernel/initramfs via HTTP.
There's also the option to boot via iSCSI.

Anyway, I just thought I'd mention that pxelinux and friends are
great tools for diskless booting:

http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project

Cheers,

Doug

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix