Running a diskless ubuntu on macOS

Running a diskless ubuntu on macOS

Ubuntu 18.04.3 live server + macos 10.14 (Mojave)

This is the guide: https://help.ubuntu.com/community/DisklessUbuntuHowto
I’ve referred this to setup tftp on Mac: http://ruby-journal.com/install-ubuntu-with-pxe-via-osx/
And this for tftp directory layout: https://github.com/mikeln/pxe-coreos
– I obtained pxelinux.0 from referrence client
– I referred this for pxelinux.cfg/default: https://ubuntuforums.org/showthread.php?t=1838201 and https://www.linuxquestions.org/questions/linux-general-1/unable-to-boot-%93no-filesystem-could-mount-root%94-error-4175580557/ (I start with this but it was not sufficient: https://serverfault.com/questions/237924/pxe-boot-fails-with-message-no-default-or-ui-configuration-directive-found)

I faced “nfs over tcp not available from” error so I explicitly specified nfs server IP/mount && ethernet device (e.g., eth0) everywhere. After repeating “nfs over tcp not available from” error for several minutes, I could open a shell on (initrfs) and at there I could find the correct ethernet device name with “ifconfig”

/etc/initramfs-tools/initramfs.conf — ens32 is to the primary network interface towards private network.

[/crayon]

I used NFS Manager for mounting nfs.
Be very careful at user mapping. client’s root must be host’s root.

I found that when I exec ‘cp -ax /dev/. /mnt/dev/.’ at guest vmware vm the host macos crashes. It should not, but I do not know why. so i copied only directories and symlinks with ‘find -type’

VMWare already have dhcp server. See https://communities.vmware.com/thread/495093
/Library/Preferences/VMware Fusion/vmnet1/dhcpd.conf

[/crayon]

For tftp server, I used http://ww2.unime.it/flr/tftpserver/


As you see, the vm does not have disk but two network interfaces. the primary (left) interface is for private (only between the host and other vms, no internet) and the secondary (right) interface is for the internet.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.