grub upgrade 18.04->20.04 loses dual-boot to W10

Bug #1898022 reported by udippel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

(Summary says it:)

Upgraded by dual-boot kubuntu 18.04 to kubuntu 20.04. After the restart, dual-boot was gone, and it boots directly into kubuntu.
I guess it is a problem with grub, because the boot menu doesn't show. However, the 'lenovo' shows trice, while it used to show once with 18.04; followed by the grub boot menu.

I guess that the MBR was written into haywire?

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: grub-efi-amd64-bin 2.04-1ubuntu26.4
ProcVersionSignature: Ubuntu 5.4.0-48.52-generic 5.4.60
Uname: Linux 5.4.0-48-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.9
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Thu Oct 1 11:34:39 2020
InstallationDate: Installed on 2019-03-14 (566 days ago)
InstallationMedia: Kubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: grub2
UpgradeStatus: Upgraded to focal on 2020-09-29 (1 days ago)

Revision history for this message
udippel (udippel) wrote :
Revision history for this message
udippel (udippel) wrote :

I was looking around and found this:

$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3,8G 0 3,8G 0% /dev
tmpfs 786M 3,5M 783M 1% /run
/dev/sda8 28G 18G 9,0G 66% /
tmpfs 3,9G 277M 3,6G 8% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup
/dev/loop1 56M 56M 0 100% /snap/core18/1885
/dev/loop0 240M 240M 0 100% /snap/chromium/1328
/dev/loop3 31M 31M 0 100% /snap/snapd/9279
/dev/loop2 63M 63M 0 100% /snap/gtk-common-themes/1506
/dev/sda6 453M 173M 253M 41% /boot
/dev/sda9 93G 73G 16G 83% /home
/dev/sda2 993M 33M 960M 4% /boot/efi
tmpfs 786M 20K 786M 1% /run/user/1000

Maybe; but I wouldn't be too sure that it was like that before, with the /boot/efi.

It was strange though, that after having added *buntu to W10 some two years ago, though without a hitch, I had found two W10 boot partitions in grub, I think sda2 and sda3. Both had booted properly, whichever I selected. Never understood that; and never really bothered.
Maybe, only maybe, this helps explaining the misbehaviour encountered at upgrade?
Btw. sda3 is now fat32, with the label SYSTEM_DRV.

Revision history for this message
udippel (udippel) wrote :

I made some progress:

$ grub-probe -t device /boot/grub
/dev/sda6

$ mount
[...]
/dev/sda6 on /boot type ext4 (rw,relatime)
/dev/sda2 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

$ sudo ls /boot/efi/EFI/Ubuntu
BOOTX64.CSV grub.cfg grubx64.efi mmx64.efi shimx64.efi

$ dd if=/dev/sda bs=512 count=1 2> /dev/null | grep -q GRUB && echo "GRUB found"
$

If I read these correctly, I do have files, but since the update no more MBR in /dev/sda. Is this observed correctly?

Revision history for this message
udippel (udippel) wrote :

Writing my bug report earlier, I was under the impression, the matter would have to make with an abnormal upgrade to 20.04; earlier two W10 boot partitions, and what not.

I own two identical lenovo Helix 2; and just upgraded the second one. NOW it IS a bug: because this time, despite of a very normal and standard upgrade from 18.04, gone through smoothly, after the reboot also here the grub boot menu is gone, and the device boots by default into Linux. The only chance to boot to W10 is by interrupting the boot, and select the W10 partition through the BIOS.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Please attach /boot/grub/grub.cfg and output of update-grub.

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Julian Andres Klode (juliank) wrote :

Also It seems those are UEFI systems not BIOS systems, so not having an MBR is not particularly bad?

Revision history for this message
udippel (udippel) wrote :
Revision history for this message
udippel (udippel) wrote :

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-54-generic
Found initrd image: /boot/initrd.img-5.4.0-54-generic
Found linux image: /boot/vmlinuz-4.15.0-124-generic
Found initrd image: /boot/initrd.img-4.15.0-124-generic
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
done

My excuses for using former language. I used to be very active some 10 to 15 years ago.

And thanks for looking into this,

Uwe

Revision history for this message
udippel (udippel) wrote :

Now it is too late to check; but I am somewhat sure that before there was one more entry in the BIOS selection menu: W10, Linux, and one more. Was ist 'grub' or what? Sorry, can't remember. As of now, I think there's one less.

Changed in grub2 (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
udippel (udippel) wrote :

Okay, picked up on this. Have two identical machines, lenovo Helix 2, and both behave the same after the upgrade 18_04 to 20_04.

What I did, was
$ sudo apt-get --reinstall install grub-common grub-pc os-prober
to no avail.

Then, with a somewhat heavy heart
$ sudo grub-install /dev/sda
Installing for x86_64-efi platform.
Installation finished. No error reported.

Still no grub menu, however, and

                Boot Info Script 0.78 [09 October 2019]
============================= Boot Info Summary: ===============================
 => Windows 7/8/2012 is installed in the MBR of /dev/sda.
 => No boot loader is installed in the MBR of /dev/sdb.
 => No boot loader is installed in the MBR of /dev/sdc.

Installed to ... where?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.