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,

Hamish

 

Tagged , , , , . Bookmark the permalink.

About Hamish McIntyre-Bhatty

I'm a self-employed software developer working on Free Software projects, as well as studying for my degree with the Open University. Being pedantic when it comes to detail is fortunately useful for both of these things! A strong believer in free software, I have a few pay-for programs available under the GPLv3 and enjoy reporting bugs and helping to improve various open source projects, including volunteering at Wimborne Model Town to work on their river control system.

Leave a Reply

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