1

I have a UEFI laptop with two disks, /dev/sda and /dev/sdb. Ubuntu 16.04 is installed on /dev/sdb. There is already an ext4 partition of /dev/sda, but I want anything there to be overwritten. I wish to install Ubuntu 20.04 on /dev/sda, such that: 1) During a transition period, I can boot from either Ubuntu 16.04 or Ubuntu 20.04 2) After a transition period, I will delete Ubuntu 16.04 from /dev/sdb 3) I don't have to physically disconnect /dev/sdb before doing the installation

I boot the computer from a USB with the Ubuntu 20.04 image on it. When I get to the screen asking for the installation type:

Q1) I presume I should choose "Something else", because installing Ubuntu 20.04 alongside 16.04 will install it on /dev/sdb, which I do not want. Is this correct?

Q2) After selecting "Something else", do I choose /dev/sda or do I choose /dev/sda1 (which already has the ext4 filesystem on it)?

Q3) On the same screen, where I am asked for the device for the boot loader installation, the options are: /dev/sda /dev/sda1 /dev/sdb /dev/sdb1 /dev/sdb2 Ubuntu 16.04 LTS Given my goals as described above, which option should I choose?

Kulfy
  • 18,154

2 Answers2

2
  • I suggest that you start by unplugging /dev/sdb. That way there is no risk that you will touch it during the installation.

  • After that it is straightforward to install Ubuntu 20.04 LTS into /dev/sda. Reboot and check that it works.

  • Next shutdown and connect /dev/sdb.

  • Boot into /dev/sda and from there run

    sudo update-grub
    

    It should identify the operating system in /dev/sdb and add a grub menuentry for it.

  • When you no longer want the old operating system you can remove it (by erasing it or unplugging the drive). Then run

    sudo update-grub
    

    and the menuentry for it will be removed.

sudodus
  • 47,684
0

First of all make a backup of your important files on /dev/sda. Installing an OS is usually harmless but risky thing. So if you care for your files, make a backup somewhere else.

Since you intend to install 20.04 on this disk, you should choose the Something else option and then you may choose to:

  1. resize the current /dev/sda1 partition to create space for the new 20.04 partition or
  2. Install 20.04 in /dev/sda1 without formatting it. (This option may not be viable if it contains conflicting files like another OS for example.)

In both cases, since you intend to eventually keep Ubuntu 20.04 and delete 16.04, install Grub in /dev/sda. When the time comes to delete 16.04, make sure to update-grub after deleting it before rebooting to avoid facing a grub rescue screen.

A word of caution: Referring to disks as sda and sdb is risky. These are assigned by the OS and may change. So be sure that sda is really the disk you want to use for your 20.04 installation by using other information, like disk size or UUID.

To Do
  • 15,833