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
    Best to see details. Probably the full drive LVM install option was what you chose? That erases entire drive. But if UEFI partition was on sda, then boot loader may be installed there? Grub defaults to sda for its install of boot loader. Best then to see details of where you are at: https://help.ubuntu.com/community/Boot-Info – oldfred Jan 13 '16 at 23:38
  • Hello!

    Are there any specific reason (for example long-term support) to use a basically older system?

    Instead of that please try with 15.10 if possible, after checksum verification.

    Preinstalled images may contain HW specific or also OEM related modifications of the current system, that's why i think you should use the newer because it has a fresh kernel possibly with the modifications you need.

    – Armand Bozsik Jan 14 '16 at 08:22
  • @ArmandBozsik: If all else fails I will try a later version, but since I know that 14.04 should work I would prefer this long term support version for harmonization with the rest of my workplace. Thanks. – fnokke Jan 14 '16 at 08:52
  • It is a new UEFI system with full drive LVM. To get Boot-Repair to work you have to mount & unencrypt the LVM volume, so Boot-Repair can see your install. If you press escape key (perhaps several times) during UEFI start, do you get grub menu? Perhaps video issue. Is this a NMVe SSD? And what video card/chip? Other Dell threads: http://ubuntuforums.org/showthread.php?t=2301071 and desktop but new: http://ubuntuforums.org/showthread.php?t=2303880 and if Xeon: http://www.phoronix.com/scan.php?page=news_item&px=WKS-GT2-No-Modeset – oldfred Jan 14 '16 at 13:49
  • @oldfred: Like I wrote in UPDATE2 above I found that Ubiquity crashed when trying to "Running grub-install /dev/sda" so perhaps Ubiquity crashed because it tried to write grub to an unformatted and unmounted drive? Anyhow I would like to try to do the installation solely on sdb but this does not seem to be possible with default option in Ubiquity. How do I get the same encrypted partitions (including swap) by choosing the partition myself option in Ubiquity? Perhaps better in a separate question... – fnokke Jan 14 '16 at 14:02
  • I do not know about encryption nor LVM. You should be able to manually do all of it. But is sda not the UEFI gpt partitioned drive also? That is where grub then has issues. You need an ESP- efi system partition on sda. And then if you want all of boot on sdb, copy all of the /efi/ubuntu folder to sdb. The only way I was able to directly install to sdb with UEFI was to disconnect sda, so it really was an install to sda. Every other time it was copy folders/files to sdb's ESP. – oldfred Jan 14 '16 at 16:16
  • @oldfred: /dev/sda is completely empty and unformatted. All efi folders are already on sdb (from the factory install also), however I do not know whether Dell solved this by not connecting the HDD until after installing ubuntu onto the SSD. At any rate thanks a lot. Your comments helped me get on the right track. I will add a separate question to see if I can get help in understanding if Ubiquity can truly handle full disk encryption solely on sdb or whether I have to do it manually. It seems at least I can choose /dev/sdb1 to be the boot partition in ubiquity by choosing the advanced install. – fnokke Jan 14 '16 at 21:00
  • That does not work. During install it will even say installing grub to sdb, but it installs to sda. Create a gpt partitioned drive on sda, and an ESP - efi system partition of 100 to 300MB, formatted fat32 with boot flag. Then you can copy /efi/ubuntu folder back to sdb. – oldfred Jan 15 '16 at 00:30
  • @oldfred The /dev/sda FAT32 partition trick worked perfectly. Thanks a lot. If you add this as an answer I will accept it. Out of curiosity, is there some reason that this is hard to correct in ubiquity or is it just a rare case? After install I already have a EFI partition on sdb as well, just that it is unmounted. – fnokke Jan 17 '16 at 11:56
  • Most have one drive. And most boot from one ESP on that one drive. So installer does not easily handle multiple drives. Similar to this: http://askubuntu.com/questions/591193/install-ubuntu-alongside-win-8-1-on-separate-physical-drives-and-dual-boot – oldfred Jan 17 '16 at 16:50

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,100