Wednesday, January 1, 2020

How can I boot two of the same Ubuntu distribution from the same internal hard drive? (Installation choices?)

I'm attempting to load Windows 10 and two different installations of 16.04 LTS (with potentially other distributions in the future). I've installed Win10, 16.04 v1 and 16.04 v2, but when I run sudo update-grub only the installation of 16.04 v2 is detected and added to the boot.cfg file. Why isn't 16.04 v1 detected, and what's the simplest way to install multiple distributions of Linux such that they will be detected [by GRUB2]?



I've tried the following:





  • Add /boot as partition 1

  • Install Windows (using defaults)

  • Install Ubuntu v1 (selecting partition 4 as / and bootloader on /dev/sda)

  • Install Ubuntu v2 (selecting partition 5 as / and bootloader on /dev/sda)



This failed because I could only update grub successfully from Ubuntu v2, (partition 5) and I wanted to use Ubuntu v1 as the default install.



Then I tried:





  • Add /boot as partition 1

  • Install Windows (using defaults)

  • Install Ubuntu v1 (selecting partition 4 as / and bootloader on /dev/sda)

  • Install Ubuntu v2 (selecting partition 5 as / and bootloader on /dev/sda5)



This failed because now I can only update grub from Ubuntu v2 (partition 5), and it doesn't successfully detect the installation on partition 4.




All that being said, how can I install subsequent distributions (after the first Ubuntu install) and not have them gobble up the grub install? Did I mess something up when choosing where to put the bootloader during installation? (See below for detailed installation steps)








Installation steps I used:




  1. Boot from Ubuntu Live USB (16.04.4 LTS).


  2. Using gparted, write new GPT to SSD and add boot partition (1GiB) to the start of the SSD. (Shutdown)

  3. Boot from Win10 Installation USB.

  4. Install Windows 10 (Pro 64bit, if it matters). (Shutdown)

  5. Boot into Ubuntu Live USB, selecting Try Ubuntu.

  6. Using gparted, adding partitions as follows:


    • (partition number, size, label)

    • 4, 50 GB, ubuntu1

    • 5, 20 GB, ubuntu2


    • 6, 33 GB, isos

    • ...(last), 9 GB, swap


  7. Install Ubuntu, selecting Something else and designating partition 4 for / of the first installation of Ubuntu.


    • The bootloader installs in the default spot on /dev/sda, over writing the windows bootloader. Remove installation media and shutdown.


  8. Boot Ubuntu v1 to make sure it works ... success. (Shutdown)

  9. Boot to Windows (selecting via GRUB at boot time) to make sure it works ... success. (Shutdown)





From here I've tried two different methods, both are failing...



Method 1




  1. Boot into Ubuntu Live USB, selecting Try Ubuntu.


  2. Click Install Ubuntu selecting Something else.


    • Designate partition 5 for / for this second installation of Ubuntu.


  3. Leave bootloader settings alone and install.



Result: Bootloader is associated with partition 5, not partition 4.




Method 2




  1. Boot into Ubuntu Live USB, selecting Try Ubuntu.

  2. Click Install Ubuntu selecting Something else.


    • Designate partition 5 for / for this second installation of Ubuntu.


  3. Tell bootloader to install to /dev/sda5 in hopes the MBR and current boot setup are left alone.




Result: Bootloader is associated with partition 5, not partition 4, and the ubuntu installation on partition 4 isn't detected during update-grub






Side note: Yes, I am using sudo update-grub when running update-grub. I've also tried sudo update-grub2 and gotten the same results.
This is a Dell XPS 13 9360 with UEFI, if it matters.

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 (...