Windows update nuked grub

Dual booting windows and manjaro gnome, had a windows update forced on me yesterday that’s nuked my grub and i can only boot into grub rescue.

1st time it’s ever happened to me and i know there’s a grub restore on the wiki , just after any advice/help before i do anything as i don’t want to make anything worse. Not the best with cli

Hi @sawdoctor,

Firstly, you don’t have to be the best to simply follow instructions.

Secondly, check this out:

(Although I think this is what you mentioned.)

Thirdly,

There’s only one way to improve with anything…

The Microsoft screw-up has been reported here. I believe there’s a link to instructions on how to sort it out (I don’t dual boot, so haven’t had to worry myself).

That particular screw up from Microsoft from last week should not have affected manjaro, since it does not support secure boot by default and it should be turned off. And it was a secure boot screw up in this case.

But what affects are quartely updates, upgrades…windows decides to check and repair itself and since it is the only existing os in the world… it sets itself as default. This could be avoided using a second ESP partition for manjaro. Now i have to reinstall grub only on bios updates.

This could also be avoided simply by having Manjaro and Windows on separate disks – a second $ESP, yes, but on a second disk.

When Windows has a disk all to itself (complete with the Microsoft bootloader) Windows Update has no reason to touch the $ESP of any other OS (on another disk). It’s isolated.

When multibooting on the same disk (a scenario that’s prone to error from the onset) installing rEFInd to the UEFI fallback location ($ESP/EFI/BOOT) – assuming the role of default bootloader for each OS – is another way to avoid such issues. Even then (on only one disk), one should still keep an eye on it.

It’s worth some research. Cheers.

3 Likes

That is my current setup. 1 disk, 2 ESP. One for winboze, one for everything else. Manjaro in its directory, efi shell in the default location. Has not failed me so far. If i update the uefi, the manjaro variable is deleted but i can boot to “disk” which drops me into shell, i run grubx64.efi from there boot manjaro and reinstall grub without the need of usb and chroot.

This way is a bit convoluted, but i want it like this. One can just reinstall manjaro grub in the default location on the second ESP with --removable (after --recheck). And that should be rock solid if manjaro is the only other os beside windows.

1 Like

If Windows nuked your grub it coulb be due to the use of an efi shim - to enable secure boot.

Perhaps → [ What the , is an SBAT and why does everyone suddenly care]

Please see → https://forum.manjaro.org/t/microsoft-always-finding-new-ways-of-ruining-the-fun-for-gnu-linux-users/167114

2 Likes

Even better, on separate PCs.

2 Likes

A second SSD is cheap and don’t waste much space… this rules don’t fit for a second PC. :wink:

It’s perfectly manageable on separate disks.

A problem (as I see it) is that most who wish to multiboot on one disk, do so on a system that was never designed to have more than one OS (a laptop). The BIOS of many of these (especially older) machines are just too basic or too troublesome to have much success with.

(My) rule of thumb: Never buy a laptop (that comes with Windows Installed) if one wants to install Linux on it. :vulcan_salute:

If it was easy you wouldn’t have as much fun!

I would still prefer a single $ESP if multibooting on one disk. The only possible concern (for me) might be the partition size – but if Windows is installed first, the Windows $ESP can be resized during Windows Setup, so, I guess that solves that.

Only have one ssd slot so no choice but definitely open to anything that stops windows touching grub but my partitioning skills and cli are extremely limited.

I was hoping i could just chroot into my system and reinstall grub without having to worry about partitions or anything

Not so on an old laptop.

1 Like

Well thats a true problem, when we talking about a Laptop instead a PC.

But just in case, the Laptop isn’t Mobile all the time and had enough USB Slot’s… i use a external USB 3.0 SDD from Samsung T5 (500GB) on my PC (where i have installed Manjaro) and it works even better as a Internal SSD.

I firstly just bought it to experiment with Linux (4 year’s) ago… and i had to plan to install Linux on a better internal SSD, but everything works so perfect with this external SSD, i have no plan’s to change it.

1 Like

It’s possible to install two disks to a laptop; sometimes at the expense of a dvd player, but still possible. There are many Youtube videos on the topic; enjoy:

1 Like

So I’m in live usb and using chroot, anyone that can confirm I’m doing this right I’d really appreciate it as I can’t afford to lose everything

[manjaro-gnome manjaro]# manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
==> Mounting (ManjaroLinux) [/dev/nvme0n1p4]
 --> mount: [/mnt]
 --> mount: [/mnt/boot/efi]
[manjaro-gnome /]# 

PATH           PTTYPE PARTTYPE                             FSTYPE PARTTYPENAME
/dev/loop0                                                 squash 
/dev/loop1                                                 squash 
/dev/loop2                                                 squash 
/dev/loop3                                                 squash 
/dev/sda       dos                                         iso966 
/dev/sda1      dos    0x0                                  iso966 Empty
/dev/sda2      dos    0xef                                 vfat   EFI (FAT-12/16/32)
/dev/nvme0n1   gpt                                                
/dev/nvme0n1p1 gpt    c12a7328-f81f-11d2-ba4b-00a0c93ec93b vfat   EFI System
/dev/nvme0n1p2 gpt    e3c9e316-0b5c-4db8-817d-f92df00215ae        Microsoft reserved
/dev/nvme0n1p3 gpt    ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 ntfs   Microsoft basic data
/dev/nvme0n1p4 gpt    0fc63daf-8483-4772-8e79-3d69d8477de4 ext4   Linux filesystem
/dev/nvme0n1p5 gpt    de94bba4-06d1-4d40-a16a-bfd50179d6ac ntfs   Windows recovery environment

is it just a case of

mount /dev/nvme0n1p1
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
grub-mkconfig -o /boot/grub/grub.cfg

or do i need to change anything

this you do not need, it is already mounted. Everything else is right.

2 Likes

Thanks, I’m back booted into manjaro but I boot straight into manjaro now so do edit the grub again and uncomment
GRUB_DISABLE_OS_PROBER=false
to see windows

Your Manjaro Installer appears to be booting as legacy – this will always cause unexpected complication.

Please note that the Manjaro Installer (whether it’s a DVD/ISO/USB) must boot in UEFI mode, both during installation and when booting to effect repairs.

I see you mention it’s a USB – that USB must be created in UEFI mode. With Ventoy, or even Rufus (and similar) it’s just a question of paying attention to the settings used during creation. For example, the partitioning scheme used absolutely must be GPT (GUID Partition Table), and not MSDOS.

Cheers.

Maybe you forgot to run

sudo grub-mkconfig -o /boot/grub/grub.cfg

to regenerate grub.cfg…

Afterwards reboot.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.