PXE Booting add-on post: custom server /etc/fstab configuration

Hi, this will just be a quick little post to add a bit more detail to the PXE boot tutorial from before.

PXE booting: custom server fstab configuration.

As I touched on in the main post, there are a few different ways of doing the part of the PXE booting where you host the filesystems over the network. You can copy the contents of the OSs filesystem to a folder on the server, for example. However, my approach was to use the same copy of the OS both for PXE and local boot. To make this easier, I configured /etc/fstab on the server VM to mount the filesystems automatically. If you have a similar setup, this could be useful for you too, so I decided to include the contents of my fstab here for your convenience :).

First off, I’ll just stick the contents of the file below, then I’ll explain them.

#Ubuntu VM HDDs.
/dev/sdb2 /nfsroot/u1404 ext4 nofail,defaults 0 0
/dev/sdc1 /nfsroot/u1604 ext4 nofail,defaults 0 0
#Fedora VM HDDs.
#NB: One connected at a time because the volume group names are the same.
/dev/mapper/fedora-root /nfsroot/fedora ext4 nofail,defaults 0 0

As you can see, this is relatively simple: just select the rootfs of each linux distro, and mount it in a preconfigured directory. Note this has to be the directory /etc/exports has allowed access to, and that the pxelinux config points the clients at.

That’s it, really, the fstab configuration is relatively simple. The only annoying thing is the fedora situation where I have to reboot the server to change HDDs in virtualbox, but it’s a small price to pay given how well it works.

See you next time,



Tagged , , , , . Bookmark the permalink.

About Hamish McIntyre-Bhatty

I'm currently studying for a Computing and IT degree with the Open University, and am a software developer as well. I enjoy coding in Python, C++ (still learning), and Java. Having written 4 open-source programs (hosted on launchpad.net), set up my own website, and started volunteering at Wimborne Model Town to work on their river control system, I still find the time to enjoy cycling, acting, photography, and playing bass guitar. I go climbing every now and then as well. More recently, I wrote my first commercial program, Disk Verifier, and created a PSID Unlocker GUI for Parted Magic. I also create tutorial and other informative videos for Parted Magic LLC.

Leave a Reply

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