0

I am currently trying to perform a unattended install of Ubuntu Server 16.04 on an Intel UP² board using preseed and kickstart files.

For the moment, I am not really focusing on the unattended side of installation. I would just like to install an OS using preseed and kickstart. I manage to get an ISO to work, but once Ubuntu Server is installed, I am not able to boot on it. I don't even see the GRUB screen, I get to a black screen and I am stock there. I tried to male Ctrl+Alt+F1 to F9 in order to open one of my tty, but it doesn't do anything.

To perform my ISO creation and USB burning, I took my inspiration on that post. Now I am going to show you exactly what I do, step by step.

Before that, let me tell you that new Intel UP² boards don't seem to handle MBR installation, so my USB key MUST be EFI bootable. (I am not sure if that how we say it, please correct me if I am wrong)

Assuming I have an Ubuntu Server ISO located at ~/Downloads :

# mount original ISO
sudo mount -o loop ~/Downloads/ubuntu-16.04.5-server-amd64.iso /mnt/iso

# copy data 
sudo cp -rT /mnt/iso /opt/ubuntuiso

So now I have a folder containing anything I need to make my ISO. I am using this preseed file (ks.preseed)

d-i partman-auto/method string lvm
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/confirm_write_new_label     boolean true
d-i partman/choose_partition            select  finish
d-i partman/confirm_nooverwrite         boolean true
d-i partman/confirm                     boolean true
d-i partman-auto/purge_lvm_from_device  boolean true
d-i partman-lvm/device_remove_lvm       boolean true
d-i partman-lvm/confirm                 boolean true
d-i partman-lvm/confirm_nooverwrite     boolean true
d-i partman-auto/init_automatically_partition       select      Guided - use entire disk and set up LVM
d-i partman/choose_partition                select      Finish partitioning and write changes to disk
d-i partman-auto-lvm/no_boot            boolean true
d-i partman-md/device_remove_md         boolean true
d-i partman-md/confirm                  boolean true
d-i partman-md/confirm_nooverwrite      boolean true

And this kickstart file (ks.cfg)

#Generated by Kickstart Configurator
#platform=x86

#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard fr
#System mouse
mouse
#System timezone
timezone Europe/Paris
#Root password
rootpw --disabled
#Initial user
user eb --fullname "Laia001" --iscrypted --password $1$uPBQ18Zj$ye8BIWTa7eOWVgdhtQQ8b0
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use CDROM installation media
cdrom
#System bootloader configuration
#bootloader --location=partition
#Clear the Master Boot Record
#zerombr yes
#Partition clearing information
#clearpart --all --initlabel
#System authorization infomation
auth  --useshadow  --enablemd5
#Network information
network --bootproto=dhcp --device=enp2s0
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
skipx
%packages
@ ubuntu-server
openssh-server

And this grub configuration file (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 timeout=10
set default=0

menuentry "Automatically Install Ubuntu Server with Custom Config" {
    set gfxpayload=keep
    linux   /install/vmlinuz  file=/cdrom/preseed/ubuntu-server.seed quiet ks=cdrom:/ks.cfg preseed/file=/cdrom/ks.preseed --
    initrd  /install/initrd.gz
}
menuentry "OEM install (for manufacturers)" {
    set gfxpayload=keep
    linux   /install/vmlinuz  file=/cdrom/preseed/ubuntu-server.seed quiet oem-config/enable=true --
    initrd  /install/initrd.gz
}
menuentry "Multiple server install with MAAS" {
    set gfxpayload=keep
    linux   /install/vmlinuz  modules=maas-enlist-udeb vga=788 initrd=/install/initrd.gz quiet --
    initrd  /install/initrd.gz
}
menuentry "Check disc for defects" {
    set gfxpayload=keep
    linux   /install/vmlinuz  MENU=/bin/cdrom-checker-menu quiet --
    initrd  /install/initrd.gz
}
menuentry "Rescue a broken system" {
    set gfxpayload=keep
    linux   /install/vmlinuz  rescue/enable=true --
    initrd  /install/initrd.gz
}

Assuming all the previous files are located in ~/newIsoFiles :

# copy data into ISO folder
sudo cp ~/newIsoFiles/ks.* /opt/ubuntuiso/ubuntu
sudo cp ~/newIsoFiles/grub.cfg /opt/ubuntuiso/boot/grub/

# create ISO
sudo xorriso -as mkisofs -V "Unattended Server" -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 -b isolinux/isolinux.bin -c isolinux/boot.cat -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -o /tmp/ubuntu16-server-unattended-install.iso /opt/ubuntuiso/

# treat ISO to make it bootable
sudo isohybrid --uefi /tmp/ubuntu16-server-unattended-install.iso

# Finally, burn it on USB
sudo dd if=/tmp/ubuntu16-server-unattended-install.iso of=/dev/sdb bs=4k

After that, I just put my USB stick in my UP² board and let everything get installed. Everything seems to work like a charm before the final reboot, after which I get a black screen without even seeing GRUB screen.

Can anybody see what am I doing wrong ?

  • FYI, I tried installing Ubuntu Server 16.04.5 on my machine as a secondary OS, and that too went to black screen. Try installing it manually to check whether it successfully boots. But I was able to get into recovery mode. See if you can get into it – Kenpachi Feb 14 at 18:54
  • No problem with manual installation. I feel like using kickstart file is messed up for some reasons, I will try to perform my auto install using preseed only and update. – erenaud Feb 15 at 9:59
  • Okay so no better results with preseed only... – erenaud Feb 15 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.