I have written a path to a preseed file for an unattended installation of linux. As you can see in the grub parameters, I have specified file=/preseed.cfg
and the content includes some d-i
commands. Next, an ISO file is created.
u@n:u2$ cat ./boot/grub/grub.cfg
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
set timeout=5
set default=0
menuentry "Install Ubuntu Server" {
set gfxpayload=keep
linux /install/vmlinuz --- auto=true file=/preseed.cfg quiet
initrd /install/initrd.gz
}
u@n:u2$ cat ./isolinux/txt.cfg
default install
label install
menu label ^Install Ubuntu Server
kernel /install/vmlinuz
append file=/preseed.cfg vga=788 initrd=/install/initrd.gz quiet ---
u@n:u2$ head ./preseed.cfg
#### Contents of the preconfiguration file (for Ubuntu 17.10)
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
#d-i debian-installer/language string en
#d-i debian-installer/country string BE
#d-i debian-installer/locale string en_GB.UTF-8
# Optionally specify additional locales to be generated.
u@n:u2$ ls
boot dists doc EFI install isolinux md5sum.txt pics pool preseed preseed.cfg README.diskdefines ubuntu
u@n:u2$ sudo xorriso -as mkisofs -isohybrid-mbr isolinux/isohdpfx.bin -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -o ../ubuntu-18.04.4-server-amd64-unattended.iso .
xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.
Drive current: -outdev 'stdio:../ubuntu-18.04.4-server-amd64-unattended.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 170g free
Added to ISO image: directory '/'='/home/u/Downloads/u2'
xorriso : UPDATE : 3230 files added in 1 seconds
xorriso : UPDATE : 3230 files added in 1 seconds
xorriso : NOTE : Copying to System Area: 512 bytes from file '/home/u/Downloads/u2/isolinux/isohdpfx.bin'
libisofs: NOTE : Aligned image size to cylinder size by 488 blocks
xorriso : UPDATE : 11.48% done
ISO image produced: 479232 sectors
Written to medium : 479232 sectors at LBA 0
Writing to 'stdio:../ubuntu-18.04.4-server-amd64-unattended.iso' completed successfully.
However, when I boot the ISO with virtualbox, it stuck at the keyboard selection page.
I guess the grub has not detected the preseed.cfg file. Isn't that? How can I fix it?