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

eldad 1766945 at bugs.launchpad.net
Mon Jan 20 08:25:19 UTC 2020


Hello,

Here's my experience this issue and the solution which worked for me
(though, it would be great if someone would resolve it in a more
straight-forward matter):


Needed to convert a Windows 7 Ultimate machine to a dual-boot with ubuntu 18.04.3.
The machine was set based on legacy bios, Windows 7 Ultimate installed on an MBR disk, while there was a second (physical) HD for data, formatted as GPT. 
Booting ubuntu bootable USB, it did so as UEFI.

1.
Used ubuntu to create a bootable USB (using the default "Startup Disc Creator").
Made some space on the OS HD for /root, and some more on the DATA HD for /home.
Then encountered the "No EFI system partition was found, the system will likely not be able to boot successfully and the installation may fail", which indeed reported failure.

2.
Upon reboot, Windows started with no grub menu.
Then using the same bootable USB, installed [Boot-Repair](https://help.ubuntu.com/community/Boot-Repair) and followed the instructions. Some of the commands resulted in errors, yet GRUB was installed successfully. Boot-Repair generated the following report: http://paste.ubuntu.com/p/c3f9zHjzfq/

3. 
Then GRUB did not show up and ubuntu started.
Following ["Dual boot pc boots directly to ubuntu instead of showing grub menu"] (https://askubuntu.com/a/750123/44517)

verified grub was installed using:
`grub-install --version`

edit grub to comment out (add "#") to the line including: "hidden"
`sudo -H gedit /etc/default/grub`

resulting in it now reading:
# GRUB_TIMEOUT_STYLE=hidden

And updating grub:
`sudo update-grub`

Now the system is up and running, starting with a GRUB menu allowing to
choose between ubuntu and Win7 .

Found on the web another solution, which I did not try:
It was suggested that deleting the "efi" folder from the bootable USB would allow an ubuntu installation alongside the windows one, in legacy bios mode, without issues.

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