I am following this HowTo on setting up a diskless ubuntu client.

  1. I am using 2 virtualbox VMs one server and one client.
  2. I am trying to boot the client using pxe but I get a kernel panic error like THIS
  3. I am using Ubuntu 16.04.3 LTS (Xenial Xerus) on both server and client.
  4. The server is a FULL install while client is minimal install.

The client connects to the server, gets an IP and the boot process starts but then i get a kernel panic error. Please tell me what I am doing wrong here. I have followed the tutorial word by word.

Here is my setup:

Ubuntu Server has dhcp server configured for pxe boot.

I ran the following commands on minimal ubuntu client:

  1. sudo cp /boot/vmlinuz-uname -r ~
  2. Changed the BOOT flag in /etc/initramfs-tools/initramfs.conf to BOOT=nfs
  3. Changed the MODULES flag in /etc/initramfs-tools/initramfs.conf to MODULES=netboot
  4. Put modules needed for network adapters into /etc/initramfs-tools/modules
  5. Ran mkinitramfs mkinitramfs -o ~/initrd.img-uname -r
  6. Copied OS files to Ubuntu server (
     mount -t nfs -onolock /mnt 
     cp -ax /. /mnt/.
     cp -ax /dev/. /mnt/dev/. (This command didn't work)
  7. Copied kernel and initrd to tftp root.
  8. /tftpboot/ now contains vmlinuz and initrd image made in step 5
  9. Configured fstab on /nfsroot/etc/fstab. It contains the information the client will use to mount file systems on boot.


proc /proc proc defaults 0 0
/dev/nfs / nfs defaults 1 1
none /tmp tmpfs defaults 0 0
none /var/run tmpfs defaults 0 0
none /var/lock tmpfs defaults 0 0
none /var/tmp tmpfs defaults 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0


LABEL linux
DEFAULT vmlinuz-4.10.0-28-generic
INITRD initrd.img-4.4.0-87-generic
APPEND root=/dev/nfs nfsroot= ip=dhcp rw




allow booting;
allow bootp;
subnet netmask {
  option broadcast-address;
  option routers;
  option domain-name-servers;
  filename "pxelinux.0";
# force the client to this ip for pxe.
# This is only necessary assuming you want to send different images to differen$
host pxe_client {
  hardware ethernet 00:00:00:00:12:34;



Your /tftpboot/pxelinux.cfg/default file is wrong. It must be something like this: (just example, but kernel and initrd versions must be the same and the initrd is those, that was generated with mkinitramfs)

LABEL linux KERNEL vmlinuz-2.6.15-23-686 APPEND root=/dev/nfs initrd=initrd.img-2.6.15-23-686 nfsroot= ip=dhcp rw

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.