Score:1

Preseed file for unattended Ubuntu installtion not read by the installer

cn flag

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.

enter image description here

I guess the grub has not detected the preseed.cfg file. Isn't that? How can I fix it?

Score:1
jp flag

Try the kernel argument file=/cdrom/preseed.cfg. When installing from CD the files on the CD are accessible under the /cdrom directory.

From https://help.ubuntu.com/lts/installation-guide/amd64/apbs02.html

- if you're booting a remastered CD or image:
  preseed/file=/cdrom/preseed.cfg
...
- if you're installing from USB media (put the preconfiguration file in the
  toplevel directory of the USB stick):
  preseed/file=/hd-media/preseed.cfg
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.