0

Last week I got a brand new Dell M3800 for work with Ubuntu 14.04 preinstalled. However, since the company has a disk encryption policy I needed to reinstall Ubuntu with encryption enabled. However when trying to reinstall with encryption on the SSD (which contained the preinstalled OS) using the created Dell recovery image, the installation failed. I also tried with Ubuntu 14.04.3 Live-CD (on USB-stick) and ubiquity crashed. I have now reached the conclusion that it is due to my extra HDD (unformatted) located on /dev/sda.

After a lot of headache and trial-and-error I happened to see that ubiquity crashed when trying to run "grub-install /dev/sda" (despite the fact that I had told it to install FDE on /dev/sdb). I know that I can choose /boot to be wherever I want (such as on the EFI partition on /dev/sdb) if I choose the advanced install. But, can I also in ubiquity's advanced install create the encrypted partitions (/, swap) so that it gets the same structure as if I would only have had one disk plugged in (i.e. the default for ubuntu installs with FDE)? If prepping the partitions manually in advance to installing is the only option then of course such answers are also more than welcome!

Thanks!


As per @oldfreds suggestion before focusing on the ubiquity bug I also have a pastebin of my boot info of the failed encrypted install from the Dell recovery iso.

fnokke
  • 113

1 Answers1

1

If installing Ubuntu in UEFI boot mode to a second drive, either internal or external as full install, you need to have drive seen as sda gpt partitioned with an ESP - efi system partition, FAT32 formatted with boot flag, 100 to 500MB. You also want an ESP on the drive you install Ubuntu, but it may not be used, during install. Best to copy ESP boot files back to install drive if sda drive ever fails/is removed or other issues.

Grub seems to only want to install its UEFI boot files to an ESP on drive seen as sda. It may even say during install, installing to sdb, but will error out if no ESP on sda. Can be a bigger issue on a few systems where install flash drive is seen as sda.

Once you start using UEFI, best that all drives be gpt and every drive with an install has an ESP partition near beginning of drive. Since I also suggest an install on every drive, then every drive should have an ESP, even if just for future use.

Update for removeable drives:

Two drive or any second, external or other drive than sda. Note that full install to any drive other than sda in UEFI mode has some issues. Grub only installs to the ESP - efi system partition on sda. And you then have to copy files to your install.

And Ubuntu's UEFI grub only installs to the ESP on sda, or not the external drive and not to /EFI/Boot/bootx64.efi. For my PC UEFI full install to a flash drive I manually copied /EFI/ubuntu on sda's ESP to flash drive's ESP. Then copied it again to /EFI/Boot and renamed shimx64.efi to bootx64.efi. I then updated fstab to have correct UUID for ESP on external drive.

The version of grub in a full install is hard coded to find the rest of grub in /EFI/ubuntu so both copies are required. There are ways to directly install grub as bootx64.efi, but then you have to manually maintain grub.cfg.

And if you do not want UEFI entries on internal drive, after copying entries to external:

How do I remove "Ubuntu" in the bios boot menu? (UEFI)

oldfred
  • 12,583