Thursday, December 26, 2019

system installation - Ubiquity mounts wrong ESP during install



I'm installing Ubuntu 16.04 onto an external HDD (sdb). My computer also has an internal Windows 10 HDD (sda).




When at the partitioning stage, I chose for the boot loader to be installed onto the external HDD (sdb).



When Uniquity is installing the system, it mounts Windows 10's ESP (sda2) and copies the Ubuntu/grub boot loaders over, when it should have mounted the ESP created on the external HDD (sdb1). /dev/sda2 is the Win10 ESP and it's mounted to /target/boot/efi. /dev/sdb1 is the correct ESP but is not touched.



Here's lsblk:
lsblk



Because the boot information is not on the external HDD, the Windows 10 disk must be present to boot Ubuntu because the boot information pointing to Ubuntu is located on the Windows ESP - not exactly optimal.




The question is can I force Ubiquity to use sdb1 as the ESP. It makes sense to by default because it's where I chose to install grub but apparently not.



Ubiquity is version 2.21.63.
I'm revisiting this issue because I need Ubuntu on this computer. I filed a bug report originally but it is still undecided/unassigned.



Well I didn't find a solution, but I found a workaround.




  1. After booting the live cd, run dmesg | grep ata to find the id for the internal drive. In my case it was ata1.00

  2. Reboot the live cd but hit e to edit the grub configuration


  3. Add libata.force=1.00:disable to the end of linux. 1.00 comes from ata1.00

  4. Hit f10 and the machine should boot and Linux should not see the drive - check with lsblk

  5. Continue installation, Ubuntu sees the external as /dev/sda



I would also recommend adding this to the installed system's grub configuration so it doesn't even see the internal drive. Don't want anything happening to it.



Thanks to https://askubuntu.com/a/387261/440238 for the libata.force=1.00:disable part.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...