[Bug 1840697] Re: Ubuntu installer mishandling of previously existing EFI partitions

Jean-Francois Gratton 1840697 at bugs.launchpad.net
Mon Aug 19 21:16:43 UTC 2019


** Description changed:

  Issue seen on Ubuntu 19.04 (workstation); might present in previous
  versions ?
  
  Previous situation ("pre-bug") :
  
  /dev/sda = WDC disk 2TB
  /dev/sdb = SSD disk, 256GB
  boot loader in /dev/sda
  
- Ubuntu 19.04 wks installed before Windows
+ Ubuntu 19.04 was installed before Windows as I wanted it on the SSD
+ drive for most of it; slow I-Os went on the WDC disk.
  
  disk layout:
-   /dev/sda1 = Windows Recovery partition, 500MB
-   /dev/sda2 = Windows EFI partition, 100MB
-   /dev/sda3 = Windows NTFS OS + Data partition, 400G
-   /dev/sda4 = Linux LVM2. remainder of disk
+   /dev/sda1 = Windows Recovery partition, 500MB
+   /dev/sda2 = Windows EFI partition, 100MB
+   /dev/sda3 = Windows NTFS OS + Data partition, 400G
+   /dev/sda4 = Linux LVM2. remainder of disk
  
-   /dev/sdb1 = ubuntu /boot partition, xfs, 512MB
-   /dev/sdb2 = ubuntu /boot/efi, 350MB
-   /dev/sdb3 = Linux LVM2, remainder of disk
+   /dev/sdb1 = ubuntu /boot partition, xfs, 512MB
+   /dev/sdb2 = ubuntu /boot/efi, 350MB
+   /dev/sdb3 = Linux LVM2, remainder of disk
  
  1. Ubuntu and Windows both boot just fine, Windows using /dev/sda2 as
- its EFI partition, Ubuntu /dev/sdb2 for his.
+ its EFI partition, Ubuntu using /dev/sdb2 for its EFI partition.
  
  2. For some reason I needed to re-install Ubuntu exactly where it was. I
- slapped my DVD in the reader, boot the installer, and start. At the
- partman section, I leave off everything Windows-related on /dev/sda,
- making sure that /dev/sda2 is left at "Do not use partition". As
- /dev/sd[ab]2 are already tagged as "EFI partition", and that I've left
- /dev/sda2 at "Do not use", I'm assuming the installer would use
+ slapped my DVD in the reader, booted the installer, and started. At the
+ partman section, I've left off everything Windows-related on /dev/sda,
+ making sure that /dev/sda2 was left at "Do not use partition". As
+ /dev/sd[ab]2 was already tagged as "EFI partition", and that I've left
+ /dev/sda2 at "Do not use", I was assuming the installer would use
  /dev/sdb2 as /boot/efi.
  
  Expected result is as above. Actual result follows.
  
  3. End result: the installer leaves off /dev/sdb2 and overwrites
  /dev/sda2 even with a "Do not use partition flag". Subsequent boots
  would not see the Windows OS installed as its EFI partition had been
  overwritten by the installer.
  
- 4. To fix: 
-   a=> mount -t vfat /dev/sdb2 /mnt && cd /boot/efi && tar cf - . | (cd /mnt ; tar xf -)
-   b=> cd / && umount /mnt
-   c=> find a win10 boot cd, go in repair mode, reinstall EFI code+files in /dev/sda2
-   d=> reboot in Ubuntu, os-prober && update-grub
+ 4. To fix:
+   a=> mount -t vfat /dev/sdb2 /mnt && cd /boot/efi && tar cf - . | (cd /mnt ; tar xf -)
+   b=> cd / && umount /mnt
+   c=> find a win10 boot cd, go in repair mode, reinstall EFI code+files in /dev/sda2
+   d=> reboot in Ubuntu, os-prober && update-grub
  
  Further observations:
-   Other installers (Fedora's anaconda to name one) would let you specify the mountpoint of an EFI partition (yes, it should always be /boot/efi). This is not foolproof, I agree, but at least it'd leave no place to doubt on setups similar as mine as which EFI partition Ubuntu is directed to use.
+   Other installers (Fedora's anaconda to name one) would let you specify the mountpoint of an EFI partition (yes, it should always be /boot/efi). This is not foolproof, I agree, but at least it'd leave no place to doubt on setups similar as mine as which EFI partition Ubuntu is directed to use.
  
  --Jeff

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

Title:
  Ubuntu installer mishandling of previously existing EFI partitions

Status in ubiquity package in Ubuntu:
  New

Bug description:
  Issue seen on Ubuntu 19.04 (workstation); might present in previous
  versions ?

  Previous situation ("pre-bug") :

  /dev/sda = WDC disk 2TB
  /dev/sdb = SSD disk, 256GB
  boot loader in /dev/sda

  Ubuntu 19.04 was installed before Windows as I wanted it on the SSD
  drive for most of it; slow I-Os went on the WDC disk.

  disk layout:
    /dev/sda1 = Windows Recovery partition, 500MB
    /dev/sda2 = Windows EFI partition, 100MB
    /dev/sda3 = Windows NTFS OS + Data partition, 400G
    /dev/sda4 = Linux LVM2. remainder of disk

    /dev/sdb1 = ubuntu /boot partition, xfs, 512MB
    /dev/sdb2 = ubuntu /boot/efi, 350MB
    /dev/sdb3 = Linux LVM2, remainder of disk

  1. Ubuntu and Windows both boot just fine, Windows using /dev/sda2 as
  its EFI partition, Ubuntu using /dev/sdb2 for its EFI partition.

  2. For some reason I needed to re-install Ubuntu exactly where it was.
  I slapped my DVD in the reader, booted the installer, and started. At
  the partman section, I've left off everything Windows-related on
  /dev/sda, making sure that /dev/sda2 was left at "Do not use
  partition". As /dev/sd[ab]2 was already tagged as "EFI partition", and
  that I've left /dev/sda2 at "Do not use", I was assuming the installer
  would use /dev/sdb2 as /boot/efi.

  Expected result is as above. Actual result follows.

  3. End result: the installer leaves off /dev/sdb2 and overwrites
  /dev/sda2 even with a "Do not use partition flag". Subsequent boots
  would not see the Windows OS installed as its EFI partition had been
  overwritten by the installer.

  4. To fix:
    a=> mount -t vfat /dev/sdb2 /mnt && cd /boot/efi && tar cf - . | (cd /mnt ; tar xf -)
    b=> cd / && umount /mnt
    c=> find a win10 boot cd, go in repair mode, reinstall EFI code+files in /dev/sda2
    d=> reboot in Ubuntu, os-prober && update-grub

  Further observations:
    Other installers (Fedora's anaconda to name one) would let you specify the mountpoint of an EFI partition (yes, it should always be /boot/efi). This is not foolproof, I agree, but at least it'd leave no place to doubt on setups similar as mine as which EFI partition Ubuntu is directed to use.

  --Jeff

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1840697/+subscriptions



More information about the foundations-bugs mailing list