[Bug 1766945] Re: (EFI on top of legacy install) choosing "replace" or "resize" options in partitioning may lead to an install failure

Saul Aguiar 1766945 at bugs.launchpad.net
Tue Dec 17 01:07:46 UTC 2019


I have a multi-partition legacy (BIOS) system. About a year ago, when
prompted by software loader, I upgraded from 16 LTS to 18.04 LTS
Performed several updates after that (as prompted) but something went
wrong with a systemd file (but system still worked well for many
months).  Recently, I was prompted to do a partial update and it
completed happy but, next time I re-booted (selected version through
Grub as always have) and got a bunch of red exclamation points and
something about software frozen and system would not complete boot.   On
Dec 13, 2019 I downloaded image of 18.04 from main Ubuntu page and
created bootable USB.  This allowed me to create my user account and
password in order to back up my user data, but the "refreshed" 18.04.3
image still will not boot up via the original Grub (only runs with the
newly-created boot USB plugged in). Downloaded the 19.04 image on 12/15
from the primary Ubuntu page, over-wrote the bootable USB, and tried to
install it over top of 18.04.3 image and get complaints about EFI boot
will not work (of course, since my hardware is BIOS and not EFI).
Someone here suggested creating a 200 MB EFI partition anyway and that
will be my next step.  At the moment the installer shows first a
partition for /sda (I take this to be the location of the original boot
software), followed by an ext4 partition named /sda4 (where an old
mythbuntu resides), followed by an ext4 partition /sda6 (where the 18.04
or 19.04 image is loaded, followed by /sda5 partition designated swap.

So, this bug is DEFINITELY NOT fixed.

I am a software engineer and would like to learn more about booting
Ubuntu.   Can anyone suggest a good place in the Ubuntu document archive
to begin familiarization?

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1766945

Title:
  (EFI on top of legacy install) choosing "replace" or "resize" options
  in partitioning may lead to an install failure

Status in partman-auto package in Ubuntu:
  Fix Released
Status in partman-efi package in Ubuntu:
  Fix Released
Status in ubiquity package in Ubuntu:
  Fix Released
Status in partman-auto source package in Bionic:
  Fix Released
Status in partman-efi source package in Bionic:
  Fix Released
Status in ubiquity source package in Bionic:
  Fix Released

Bug description:
  [Impact]

  If I have existing data on disk built by a previous version of Ubuntu
  (in BIOS (legacy) mode, or a previous Windows install, and no EFI
  system partition on disk; the installer presents three choices:

  - Replace $existing and reinstall.  (if a previous Ubuntu install was found)
  - Resize and install
  - Erase disk and install.

  The first two options will attempt to complete the installation in EFI
  mode (as they should) but do not create an EFI system partition, which
  is required as a place to put shim and grub on disk for booting. The
  installer will then crash / fail as grub-install fails to find the ESP
  when copying the bootloader.

  The last option works correctly, it creates the ESP as it erases the
  entire disks and proceeds with new partitioning.

  The proposed changes fix ESP creation for the replace and resize
  cases, additionally disabling the reuse-partition option as it would
  lead to unbootable systems without an existing ESP.

  [Test Case]

  A few valid cases to try, both for desktop and server, each of these
  on a clean disk:

   * In legacy BIOS mode, install Ubuntu (whole disk).
   * Switch to UEFI mode
   * Start the Ubuntu installer.
   * In partitioning, make sure the 'reuse existing partition' option is not visible (reuse, 'replace' should still be present).
   * Select resize and install.
   * Check if installation succeeds and system boots.

   * In legacy BIOS mode, install Ubuntu (whole disk).
   * Switch to UEFI mode
   * Start the Ubuntu installer.
   * In guided partitioning select the replace existing and install option.
   * Check if installation succeeds and system boots.

   * In legacy BIOS mode, install Ubuntu (manual partitioning, create 3 primary partitions, leave enough free space for another install).
   * Switch to UEFI mode
   * Start the Ubuntu installer.
   * In guided partitioning select the use biggest free space option.
   * Check if installation succeeds and system boots.

   * In UEFI mode start the Ubuntu installer.
   * Select a clean whole-disk install.
   * Check if installation succeeds and system boots.

  Additional random partitioning scheme dogfooding tests are welcome.

  [Regression Potential]

  The main change affects the recipes for -amd64-efi cases, so theoretically in the worst-case scenario there might be some problems when installing systems in UEFI mode with guided partitioning, like: wrong partitioning scheme present or the ESP not correctly created. But those regressions should be easily noticeable during testing.
  Another small regression potential is in invalid ESP counting and the users not getting the 'reuse partition' option even if the ESP is present. But that also should be covered through the tests.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/partman-auto/+bug/1766945/+subscriptions



More information about the foundations-bugs mailing list