I am following this HowTo on setting up a diskless ubuntu client.
- I am using 2 virtualbox VMs one server and one client.
- I am trying to boot the client using pxe but I get a kernel panic error like THIS
- I am using Ubuntu 16.04.3 LTS (Xenial Xerus) on both server and client.
- 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:
- sudo cp /boot/vmlinuz-
uname -r
~ - Changed the BOOT flag in /etc/initramfs-tools/initramfs.conf to BOOT=nfs
- Changed the MODULES flag in /etc/initramfs-tools/initramfs.conf to MODULES=netboot
- Put modules needed for network adapters into /etc/initramfs-tools/modules
- Ran mkinitramfs mkinitramfs -o ~/initrd.img-
uname -r
- Copied OS files to Ubuntu server (192.168.2.3/nfsroot/):
mount -t nfs -onolock 192.168.2.3:/nfsroot /mnt cp -ax /. /mnt/. cp -ax /dev/. /mnt/dev/. (This command didn't work)
- Copied kernel and initrd to tftp root.
- /tftpboot/ now contains vmlinuz and initrd image made in step 5
- Configured fstab on /nfsroot/etc/fstab. It contains the information the client will use to mount file systems on boot.
/nfsroot/etc/fstab
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
/tftpboot/pxelinux.cfg/default
LABEL linux
DEFAULT vmlinuz-4.10.0-28-generic
INITRD initrd.img-4.4.0-87-generic
APPEND root=/dev/nfs nfsroot=192.168.2.3:/nfsroot ip=dhcp rw
/etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure"
/etc/default/dhcp/dhcpd.conf
allow booting;
allow bootp;
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.5 192.168.2.250;
option broadcast-address 192.168.2.255;
option routers 192.168.2.10;
option domain-name-servers 192.168.2.11;
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;
fixed-address 192.168.2.7;
}
PLEASE HELP!!!