[Bug 1840697] [NEW] Ubuntu installer mishandling of previously existing EFI partitions
Jean-Francois Gratton
1840697 at bugs.launchpad.net
Mon Aug 19 17:39:57 UTC 2019
Public bug reported:
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
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 /dev/sdb2 for his.
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
/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
** Affects: ubiquity (Ubuntu)
Importance: Undecided
Status: New
** Tags: partman uefi
--
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 wks installed before Windows
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 /dev/sdb2 for his.
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
/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