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

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState