0

I am using a post from Brandon Authier to preseed a Ubuntu 16.04 installation. My install is from a USB drive the laptop will always have a existing Ubuntu installation on the drive. (There is just one main drive.) Everything seems to work perfectly unit the system reboots after the install. Then just a blank screen appears.

I have narrowed the problem down to this line:

d-i partman-auto/method string regular

Commenting this line out means that the installation will ask me if I want to "Erase and install Ubuntu". (Which is what I want.) If I make this selection manually then the installation works perfectly.

I have tried removing the previous copies of the Ubuntu before the installation using the following commands:

d-i partman/early_command string pvremove -y -ff /dev/sda*
dd if=/dev/zero of=/dev/sda1 bs=512 count=2
dd if=/dev/zero of=/dev/sda2 bs=512 count=2
dd if=/dev/zero of=/dev/sda bs=512 count=2

No luck.

1 Answers1

0

Are you installing from a Legacy or UEFI/EFI USB entry? You need to make sure you select the one that matches the mode your BIOS is going to boot in.

I'm also using this to ensure the USB is unmounted properly before the installer tries to detect the device to install to.

d-i partman/early_command string \
USBDEV=$(list-devices usb-partition | sed "s/\(.*\)./\1/");\ 
BOOTDEV=$(list-devices disk | grep -v "$USBDEV" | head -1);\
debconf-set partman-auto/disk $BOOTDEV;\
debconf-set grub-installer/bootdev $BOOTDEV; \      
umount /media;

From the linked article you already have additional preseed answers to remove existing lvm or md devices.

d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true

You can also specify lvm instead of regular if you want resizable partitions without requiring a reinstall.

# Alternatively, you may specify a disk to partition. If the system has only
# one disk the installer will default to using that, but otherwise the device
# name must be given in traditional, non-devfs format (so e.g. /dev/sda
# and not e.g. /dev/discs/disc0/disc).
# For example, to use the first SCSI/SATA hard disk:
#d-i partman-auto/disk string /dev/sda
# In addition, you'll need to specify the method to use.
# The presently available methods are:
# - regular: use the usual partition types for your architecture
# - lvm:     use LVM to partition the disk
# - crypto:  use LVM within an encrypted partition
d-i partman-auto/method string lvm

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

dragon788
  • 1,556