Running SmartOS on with Custom iPXE

Packet recently made available their custom iPXE feature, allowing users to PXE boot an OS of their choice, and I found this incredibly intriguing, so I decided to try something out; running SmartOS on Packet’s bare-metal platform.

I didn’t need much to get started:

  1. A SmartOS ISO (or the platform release archive):
  2. I elected to setup a simple webserver on an Ubuntu host, and mounted my SmartOS ISO, copied the files to my webroot:
apt-get update; apt-get install apache2 -y; mkdir /var/www/html/smartos
mount -o loop /mnt/
cp -fr /mnt/* /var/www/html/smartos/

3. Added smartos.txt to my webroot:

set base-url http://YOUR_HOST_IP_ADDRESS
kernel ${base-url}/smartos/platform/i86pc/kernel/amd64/unix
initrd ${base-url}/smartos/platform/i86pc/amd64/boot_archive

Note: if you do this on an existing Apache host, make sure to update the relative path to your base-url to your smartos directory.

This does:

i. calls out the network DHCP server for an address
ii. sets the base URL for your ipxe configuration to the Apache host you specified above, and sets the kernel and initrd path relative to that Apache webroot.
iii. boots according to this specification.

4. Login to your account, and deploy a new server. In your Operating System selection, select “Custom iPXE” and provide the URL for your setup script (i.e. )

5. Once deployed, on your Packet node page, you can access the newly deployed node’s console:

and you’ll see the iPXE prompt pull down the configuration, required files, and boot according to this specification.

As with any SmartOS build, you’ll find the default root password in platform/root.password and you can login via the above console and begin configuring your SmartOS node:

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.