booting the c400

The Dell Latitude C400 has a number of boot menu options, but few that do not require a docking port. Without a docking port the boot options are limited to the hard drive and NICs. I have done network (PXE) boots before and they are pretty easy to set up. After having done a few, I actually prefer to do PXE installs since they typically go faster if the install does not need to read from a DVD/CD (I usually have a copy of the DVD/CD image on the hard drive). For two of the C400s I was able to setup PXE and boot from their on board NICs to install a Linux distro.

With the third C400 I was not so lucky. As it turns out the on board NIC on the third C400 does not work. At first I thought, no problem, I will just get a PCMCIA (wired) ethernet card and boot from it (since that is another option on the boot menu). I got a PCMCIA card from one of my friends, installed it, set the laptop to boot from it and tried to boot. No luck. I tried the card in another laptop that already had on OS installed and it appeared to not be working. I checked some eBay auctions and found that I could get another card for around $6 so I ordered one. When it arrived I tried to boot from it, again, no luck. I tried the card in another laptop that already had an OS installed and it worked fine. I did some searching on the web only to find out very few PCMCIA ethernet cards support PXE. In fact, I had a very difficult time finding information about any that support PXE. I tried a few more configurations, and in the end I was not able to get the laptop to network boot from the PCMCIA card.

At that point I thought about getting a docking port, so I checked some eBay auctions and found one for $13 and I decided to order it. The laptop has only one USB port and no PS/2 ports, so I figured if I every wanted to connect it to a KVM I would spend more than $13 for a hub and/or adapters anyway. The dock adds PS/2 connections as well as another wired NIC (which supports PXE booting) and two USB ports. During the time I spent deciding whether or not to buy the docking port and then waiting for it to arrive, I decided I could look into what it would take to boot a network install kernel from the hard drive using GRUB. It turns out to be pretty easy, so tried it out. Below are steps outlining how to setup a hard drive to boot a network install kernel using GRUB.

Hard Drive Setup
Here are the steps I used to set up the laptop hard drive for booting a network install kernel via GRUB:

  1. Pull the laptop hard drive out of the laptop
  2. Connect the laptop hard drive to another Linux system (for me, this was my desktop system which is running Fedora 8)
  3. Create a partition on the hard drive large enough to fit the GRUB files as well as any kernels you want to boot
  4. Format the partition (this can be formatted as ext2/3, vfat or any other file system that GRUB supports, I used ext2)
  5. Mount the partition
  6. Create directories to store the GRUB and kernel files (I created a boot directory in the partition's root directory and then a grub and kernel directory in the boot directory, boot/, boot/grub/ and boot/kernel/)
  7. Copy the GRUB stage1, stage 1.5 and stage2 files to mounted partition (I put them in the boot/grub directory, the stage1.5 file should be for the file system you used to format the partition, in my case it was e2fs_stage1_5)
  8. Copy the network install kernel (and initrd if necessary) to the mounted partition (I put them in the boot/kernel directory)
  9. Create a menu.lst (or grub.conf if using Fedora) GRUB configuration file in the same location where you put the GRUB files (in my case, boot/grub/, creating this file is not necessary, but it makes booting from GRUB easier)
  10. Unmount the partition
  11. Install GRUB on the master boot record (MBR) of the hard drive
  12. Disconnect the laptop hard drive from the Linux system
  13. Install the laptop hard drive back in the laptop
  14. Set the laptop BIOS to boot the from the hard drive
  15. Boot up the system and start a network install as if you were booting from any other bootable device

Adding Kernels
Here are some notes on how to include network install kernels for Arch Linux and Fedora.

  1. Obtain the network install kernel and initrd files - for Arch Linux the recommend kernel and initrd files are on the archboot installation iso (I have not tried the a kernel from the official install images) and located in the isolinux directory, for Fedora use the kernel and initrd files also in the isolinux directory of the installation media
  2. Copy the kernel (usually the file named vmlinuz) and the initrd file (usually named initrd.img) somewhere located on the same partition that contains the GRUB files (in my case, boot/kernel and since I put both the Arch Linux and Fedora files in the same directory, I renamed them vmlinuz-arch, initrd-arch.img, vmlinuz-fedora and initrd-fedora.img)
A note on the Arch Linux network install kernel. After getting everything setup I booted the Arch Linux network install kernel and ended up getting a kernel panic when the PCMCIA ethernet card was installed. It has a Realtek 8139 chipset in it. Since I was not sure if it was the PCMCIA hardware, the ethernet card or the kernel, I booted the Fedora network install kernel to see if it also went into a kernel panic. It booted without any issues. I decided to try the other ethernet card (3Com) even though it appeared to not be working. I pulled the RealTek card and inserted the 3Com card and booted the Arch Linux network install kernel. There was no kernel panic during the reboot. Once I got the command prompt I tried bringing up the network interface and it worked (so it either started working, or my other testing was not conclusive). I proceeded to run the Arch Linux network install with the 3Com card.

Example grub.conf/menu.lst File
Here is an example grub.conf/menu.lst GRUB configuration file (with comments). If you use Fedora to install GRUB, GRUB will look for grub.conf, if you use any other distro GRUB will probably look for menu.lst. Using this configuration file, when GRUB boots, I have five seconds to choose from four options: an Arch Linux install, a Fedora install, testing RAM and booting into FreeDOS, if five seconds expires, GRUB boots the Arch Linux install. The kernel, and initrd lines specify the location of the kernel and initrd files copied over from the distros network install media.

timeout 5 # sets the timeout to 5 seconds
default 0 # sets 0th menu item (arch-install) as the default boot option

# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below

# (0) Arch Linux Install
title arch-install # this is what will be displayed in the GRUB menu on boot up
kernel /boot/kernel/vmlinuz-arch # copied from the Arch Linux archboot iso
initrd /boot/kernel/initrd-arch.img # copied from the Arch Linux archboot iso

# (1) Fedora Install
title fedora-install
kernel /boot/kernel/vmlinuz-fedora # copied from the Fedora install iso
initrd /boot/kernel/initrd-fedora.img # copied from the Fedora install iso

# (2) memtest # added so RAM can be tested
title memtest
kernel /boot/utils/memtest # copied from the Fedora install iso

# (3) FreeDOS # added so the laptop BIOS could be updated
title FreeDOS
kernel /boot/utils/memdisk floppy # memdisk was copied from the syslinux package
initrd /boot/utils/balder.img # blader.img is a FreeDOS floppy image

Install GRUB on MBR
Here are some notes on how to install GRUB on the MBR:

  1. As the root user on the Linux system the laptop hard drive has been connected to, run grub
  2. Wait for grub to start (it make take a while to probe your hardware and you should eventually get the grub> prompt)
  3. Determine how GRUB identifies the drive you want to install it on - GRUB labels partitions with the format (hdX,Y), where X is the drive and Y is the partition, you can use the find command from within GRUB to determine the partition label, run:
    grub> find <filename>
    where <filename> is the full path and file name of a file that is on your grub partition, in my case I ran:
    grub> find /boot/grub/stage1
    This returned (hd1,0), so the partition where my my GRUB files are located is (hd1,0), note that if you have another partition anywhere on the system with the same path and file name, GRUB will return more than one partition, I have more than one stage1 file on my desktop system, but the partition on the laptop hard drive is the only one whose path matches what I entered with the find command, so GRUB only returned one label
  4. Set the GRUB root device, run:
    grub> root (hdX,Y)
    where (hdX,Y) is the label for the partition you identified in the previous step
  5. Install GRUB on the MBR, run:
    grub> setup (hdX)
    where (hdX) is the label for the drive you identified in the above step, GRUB will check that all the necessary files exist and will return successfully if everything has been correctly setup
  6. Exit GRUB, run:
    grub> quit

Arch Linux website:
Fedora Project website:
FreeDOS website:
GRUB website:
syslinux website: