之前,我通过将Ubuntu LiveCD的ISO文件提取到NFS挂载点,并将vmlinuz.efi和initrd.gz从casper复制到tftpboot目录中,使用一些iPXE脚本魔法来设置PXE引导。这在16.04、16.10和17.10(Artful)上都运行得很完美。
但是在18.04中,我首先发现casper中不再存在vmlinuz.efi,而是有vmlinuz。所以,我尝试了一些更改名称的方法...
然而,现在它仍然无法完成引导。我进入了"emergency mode"(紧急模式)。根据紧急模式提示,我输入'journalctl -xb'并浏览后得到以下结果:
帮忙!
添加于2018年04月30日:
用于提取PXE挂载ISO的脚本代码(TARGET设置为镜像名称,如bionic):
但是在18.04中,我首先发现casper中不再存在vmlinuz.efi,而是有vmlinuz。所以,我尝试了一些更改名称的方法...
然而,现在它仍然无法完成引导。我进入了"emergency mode"(紧急模式)。根据紧急模式提示,我输入'journalctl -xb'并浏览后得到以下结果:
Unit sys-fs-fuse-connections has begun starting up.
ubuntu systemd[1]: Failed to set up mount unit: Device or resource busy
ubuntu systemd[1]: Failed to set up mount unit: Device or resource busy
sys-kernel-config.mount: Mount process finished, but there is no mount.
sys-kernel-config.mount: Failed with result 'protocol'.
Failed to mount Kernel Configuration File System.
帮忙!
添加于2018年04月30日:
用于提取PXE挂载ISO的脚本代码(TARGET设置为镜像名称,如bionic):
set -e
# Look for bionic.iso as the ISO I am going to extract.
TARGET=invalid.iso
[ -f bionic.iso ] && TARGET=bionic
echo TARGET=$TARGET
# Mount the ISO to the /tmp directory
sudo rm -rf /var/nfs/$TARGET/*
sudo rm -rf /tmp/$TARGET
mkdir /tmp/$TARGET
sudo mount -o loop ~/$TARGET.iso /tmp/$TARGET
# Clear up the NFS directory where things will be copied (and copy them)
sudo rm -rf /var/nfs/$TARGET
sudo mkdir /var/nfs/$TARGET
sudo rsync -avH /tmp/$TARGET/ /var/nfs/$TARGET
# I've not had luck with iPXE changing filesystems to find
# vmlinuz, vmlinuz.efi, or initrd.gz... so I copy those files
# specifically to the tftp directory structure so the boot loader
# can load them.
sudo rm -rf /var/lib/tftpboot/$TARGET
sudo mkdir /var/lib/tftpboot/$TARGET
sudo cp /tmp/$TARGET/casper/vmlinuz* /var/lib/tftpboot/$TARGET/.
sudo cp /tmp/$TARGET/casper/initrd.lz /var/lib/tftpboot/$TARGET/.
# Cleanup: unmount the ISO and remove the temp directory
sudo umount /tmp/$TARGET/
sudo rm -rf /tmp/$TARGET/
echo Done.