Course Home | Syllabus | Schedule | Readings | Downloads | Submissions | [print]

IT 3110: Systems Automation

Diskless booting


This assignment will have you create a boot a Linux system from the network. The physical Linux files will reside in an NFS partition.

Some relevant screenshots are here and here.


To create a diskless boot, you will follow the steps below:

  1. Begin by creating an initial ramdisk and kernel image that your tftp server can serve out.

    • Make sure you are using the correct DEVICE. You should look at the output of ip a on your vm to determine the correct adapter name.
    • after completing the above slides successfully, you will probably want to copy your backup initramfs.conf.0 back into the original location.
    • You will also need to copy the kernel image over. Something like cp /boot/vmlinuz-$(uname -r) /var/lib/tftpboot/diskless1/vmlinuz.
    • You must chmod the copied kernel to 644 or it won’t boot
  2. Edit the pxelinux.cfg/default to have an entry for your diskless boot.

  3. Create an nfs share which allows full permissions to your subnet. My options were rw,no_root_squash,async,no_subtree_check.

    • Export that new export
  4. Into the nfs share, you will copy the files needed to boot a new system, you can do so by using the debootstrap program as shown in the screenshots.

    • apt update
    • apt install debootstrap systemd-container
    • sudo debootstrap bionic /nfs/share/ (wait for it to download the files it needs).
  5. At this point, your diskless netboot client should work, but in order to customize the diskless boot, I would probably do the following:

    • Navigate to the nfs share that has your disk files on your nfs server. My share was at /nfs/disker. You could do a sudo chroot /nfs/disker. Then you can add any users or edit any hostnames like you would any other system. Exit out of the chroot environment when you are done to get back to the NFS server.
  6. Netboot and see if you can login.

  7. To finish the assignment, add another boot option for focal. Use the debootstrap program to download the requisite files. I created subdirectories in my nfs share, like bionic or focal. Don’t forget to modify your pxelinux.cfg file so that you can choose which one you want to boot.


This will be demoed to the instructor on or after the due date.


Last Updated 01/25/2021