PXE Booting Ubuntu from an iSCSI drive

The Plan

This will serve as a guide to booting Ubuntu (XBMCbuntu in my case) from an iSCSI drive.

The Result

The boot process for my XBMCbuntu machine follows these steps:

  1. The BIOS is configured to PXE boot.
  2. The PXE boot process launches iPXE (formerly gPXE).
  3. iPXE connects to the iSCSI drive and launches GRUB which is installed on the remote iSCSI disk.
  4. GRUB launches a custom initramfs that has been compiled with the iSCSI module.
  5. GRUB passes the iSCSI connection information to the kernel via command line options.
  6. The kernel informs initramfs to initiate a connection to the iSCSI disk.
  7. The kernel boots using the iSCSI disk as its root file system..

This is the resulting storage information screen in XBMCbuntu. For all intents and purposes, the OS thinks it has a local 20GB disk when in reality the disk is on a different machine and the system has been booted over the network.

XBMCbuntu storage information

The Definitions

  • PXE or Pre-boot eXecution Environment is a method of booting computers via a network interface without any local hard drive. In simpler terms, the network card gets the files it needs to boot from a file server on the network rather than from a hard drive inside the computer.
  • iPXE (formerly gPXE) is PXE on steroids; it allows booting from additional network protocols such as iSCSI.
  • iSCSI is a protocol for accessing disks (virtual or physical) over a network at the block level. This is very different from other protocols such as SAMBA or NAS which do not provide block level access to shared disks.
  • iSCSI initator is the diskless, client computer. It initiates the connection to the iSCSI target.
  • iSCSI target is the server which shares the iSCSI disk on the network.
  • Lastly, XBMCbuntu Eden is a flavor of ubuntu designed to be a media center, and incidentally will be the Ubuntu flavor that I will be installing on my client.

The Roadmap

It is assumed that you already have a machine running Ubuntu that will act as the iSCSI target aka the server.

4 thoughts on “PXE Booting Ubuntu from an iSCSI drive

  1. I have some outdated notes from the previous XBMC Live version you might find useful:


    Feel free to use whatever.

  2. Oh no, there’s no part 5! When do you anticipate adding it?

    I’ve been searching everywhere for instructions on how to do this and I’ve been following all the other steps – really well explained and easy to follow. But there is no part 5 🙁

  3. […] Boot with iPXE, press ctrl+b when prompted, type dhcp, then type sanboot iscsi:<IP_of_target>::::iqn. <path_to_target> and watch it boot the OS! You could automate the whole boot process by chainloading iPXE through PXE via dnsmasq like this […]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>