For understanding what's going on you need to understand how Linux PXE boots.
- The kernel
vmlinuz
is transferred - The initrd
initrd.gz
is transferred - The kernel mounts initrd and starts its
init
script
initrd is an ultra-minimal Linux system containing the minimal functionality for connecting to (NFS) or retrieving (HTTP/CIFS) the "real" OS (in your case contained within ubuntu_os.squashfs
), mounting it and finally "chrooting" into it.
A PXE ready init
script is in charge of parsing the kernel variables, starting the net services, handling NFS, HTTP, CIFS, etc. In most of the cases a particular initrd.gz
is not able to deal with all the protocols mentioned above then you need to "customize" your initrd.gz
or to create a "complementary" initrd providing the missing features when needed.
In your case your init
script still think it has to mount an NFS directory and not a file; then if you want to use NFS you should mount the directory where your ubuntu_os.squashfs
is located and next mounting the ubuntu_os.squashfs
file. THis of course means patching init
(and/or its associated components)
If you do not mind offering ubuntu_os.squashfs
on a CIFS share you can see what Serva does for PXE booting Ubuntu live distros; you will see there all the parameters for CIFS booting (I'm related to Serva development)
i.e. Ubuntu LTS 14.04 Desktop Live
[PXESERVA_MENU_ENTRY] asset = Ubuntu LTS 14.04 Desktop Live platform = amd64 kernel = /NWA_PXE/$HEAD_DIR$/casper/vmlinuz append = showmounts toram root=/dev/cifs initrd=/NWA_PXE/$HEAD_DIR$/casper/initrd.lz,/NWA_PXE/$HEAD_DIR$/casper/INITRD_N11.GZ boot=casper netboot=cifs nfsroot=//$IP_BSRV$/NWA_PXE_SHARE/$HEAD_DIR$ NFSOPTS=-ouser=serva,pass=avres,ro ip=dhcp ro