Delete MBR on my Manjaro sda

Hello

I run Manjaro on a SSD 860 and Windows 10 on a SSD 840. Until today no problems, as they are totally independant

Before if need be, I using F11 to boot into windows for exemple, I could choose either (see photo) the word Manjaro or the the SSD 860, both would boot into Manjaro and if need be choose the SSD 840 to boot into Windows

Windows updated itself this morning (I had to use it for a friend) and seems to have installed MBR on BOTH my SSD including the 860 which I repeat is just Manjaro

If I F11 at start up and choose the word Manjaro it boots correctly into Manjaro

If I F11 at start up and choose SSD 860 it now boots into windows (before it would boot into Manjaro), So it sure the windows update its installed a mbr somewhere on the 860

I’m fairly new to Linux, so need some help
I ran this (saw it on the forums)
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
loop0 squashfs 4.0 0 100% /var/lib/snapd/snap/
loop1 squashfs 4.0 0 100% /var/lib/snapd/snap/
loop2 squashfs 4.0 0 100% /var/lib/snapd/snap/
loop3 squashfs 4.0 0 100% /var/lib/snapd/snap/
sda
├─sda1 vfat FAT32 9E9D-66AA 299,1M 0% /boot/efi
└─sda2 ext4 1.0 76a5f013-af96-446a-ae8b-9f85d2684de7 577,4G 28% /
sr0

My question is where has windows installed this MBR and how to get rid of it ?


Hope this is clear
Thanks

You’re not the first person here to report on the Windows update nuking the ability to boot GNU/Linux, but it’s not a matter of the MBR. Windows 10 requires booting in UEFI mode ─ which does not store its configuration in the MBR, but in the EFI system partition ─ and pressing the F11 key brings up the UEFI boot manager, from which Windows has removed GNU/Linux because it wants to claim the computer for itself.

There is however an additional check you must first go through, which is to bring up the UEFI settings and see whether the Windows update has changed anything there, such as for instance turning on Secure Boot. I’m saying this because it is a known fact that a Windows update can modify the information in the battery-backed CMOS memory of the firmware.

Now, here’s what you have to do… Boot up from the Manjaro install medium in live mode and open up a terminal. In that terminal, issue the command… :arrow_down:

sudo su -

You will be prompted for the password. Next, issue the command… :arrow_down:

manjaro-chroot -a

If Manjaro is the only GNU/Linux distribution on your computer, press 1. Next, issue the following commands… :arrow_down:

pacman-mirrors -f 5 && pacman -Syyu
grub-install --recheck --efi-directory="/boot/efi" --target="x86_64-efi" --modules="part_gpt part_msdos zstd"
update-grub
exit

Let the commands take the time they need ─ they include a full system upgrade if you haven’t done that already ─ and then you should be safe to reboot your computer. Hopefully, the UEFI boot loader will now show Manjaro again, and the GRUB menu should offer to boot either Manjaro or Windows.

Good luck! :crossed_fingers:

Hi

I checked the secire boot, it is OFF, so it’s not that

“Boot up from the Manjaro install medium in live mode” do you mean from a CD Rom ? or can I do all of the following while in Manjaro as I can boot into it if I choose Manjaro from the F11

and can I just paste all your lines directly into terminal or is one line at a time ?
pacman-mirrors -f 5 && pacman -Syyu
grub-install --recheck --efi-directory="/boot/efi" --target=“x86_64-efi” --modules=“part_gpt part_msdos zstd”
update-grub
exit

don’t forget I don’t need an MBR on this disc, it’s puerly Manjaro

If you installed Manjaro from the optical drive, then yes, I guess so. Most people seem to prefer flashing the .iso to a USB stick these days.

If you can boot into Manjaro, then you can skip the manjaro-chroot step.

One line at the time is best.

Thanks, Yes I can boot into Manjaro, so if I understand correctly

pacman-mirrors -f 5 && pacman -Syyu
grub-install --recheck --efi-directory="/boot/efi" --target=“x86_64-efi” --modules=“part_gpt part_msdos zstd”
update-grub
exit

all as root user
This will reinstall my grub and delete the MBR

1 Like

Ir won’t touch the MBR because your problem doesn’t have anything to do with an MBR. The MBR is only used for booting in legacy BIOS mode. UEFI systems that boot in native EFI mode use the information in the EFI system partition for booting. :wink:

Ok, so I won’t touch or update my Grub

Thanks

But there is a MBR on my Linux SSD 860 (that wasn’t on this SSD before today’s Windows update)

I’m presuming that the update wrote MBR to both my SSD rather than just the windows SSD (thats why I have windows on one SSD and Linux on another) this is a real pain, beacuse it now means mbr will be install anywhere…

If I unplug all my disks except the SSD 860 Manjaro and choose SSD 860 from the F11 rather than the word Manjaro I get the following error, which means that a mbr is installed on this SSD, that wasnt there before the update

So where is it ? and how do I get rid of it ?

Thanks for your help, all ideas would be appreciated

There always is an MBR, but in UEFI mode, it is not used for booting. Make sure that your UEFI firmware is set up to boot in UEFI mode only, not UEFI+CSM.

No, it means that the Windows update overwrote the Manjaro boot loader in the EFI system partition with its own boot loader, so the loader to boot from the drive now boots Windows instead of bringing up GRUB.

1 Like

There always is an MBR, but in UEFI mode, it is not used for booting. Make sure that your UEFI firmware is set up to boot in UEFI mode only, not UEFI+CSM .

Only UEFI as far as I can see (doubled checked my Bios)

No, it means that the Windows update overwrote the Manjaro boot loader in the EFI system partition with its own boot loader, so the loader to boot from the drive now boots Windows instead of bringing up GRUB.

Except I can still boot into Manjaro, it seems as if there is a MBR & a Grub in my EFI system, if that is possibe

How to get rid of this mbr?

Again, many thanks for your help,

As I have just told you, a UEFI boot does not use an MBR, so how could an MBR cause you to boot either Windows or Manjaro?

Anyway, I gave you the instructions to fix your boot higher up.

Thanks

I’ll try your suggestion later, and rewrite the grub

Thanks for your patience and help

am getting this error when doing
grub-install --recheck --efi-directory="/boot/efi" --target=“x86_64-efi” --modules=“part_gpt part_msdos zstd”

grub-install: error: More than one install device?.

For info
lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME

PATH PTTYPE PARTTYPE FSTYPE PARTTYPENAME
/dev/loop0 squashfs
/dev/loop1 squashfs
/dev/loop2 squashfs
/dev/loop3 squashfs
/dev/sda gpt
/dev/sda1 gpt c12a7328-f81f-11d2-ba4b-00a0c93ec93b vfat EFI System
/dev/sda2 gpt 0fc63daf-8483-4772-8e79-3d69d8477de4 ext4 Linux filesystem
/dev/sr0

What is the output of… :arrow_down:

mount | grep efi 

…?

mount | grep efi

efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

Okay, then try this… :arrow_down:

sudo grub-install --recheck --efi-directory="/boot/efi" --target=“x86_64-efi” --modules=“part_gpt part_msdos zstd” /dev/sda1
sudo update-grub

Sorry, same error
grub-install: error: More than one install device?.

Sorry, this is above my pay grade. I’ve never come across that error before. :man_shrugging:

I’m wasting your time…

Though this message is pretty weird
grub-install: error: More than one install device?

I did a test,
I unplugged all of my disks, so none installed what so ever and booted the PC

Am still getting the

so that’s crazy

I’m going to reflash my Bios after dinner or tomorrow even though there is no legacy showing

Again many thanks, It’s people like you that make this Linux a great one
Trevor

1 Like

boot on USB iso manjaro
( if you see UEFI < USB vendor name > < partition 1 > is for UEFI install )

check if all good EFI before installing
open a terminal and reports

inxi  -Mxxa ( check for UEFI or bios , not UEFI[legacy] )
test -d /sys/firmware/efi && echo efi || echo bios
sudo efibootmgr -v
sudo parted -l

Hi

Thanks

Did all that
inxi -Mxxa
Machine: Type: Desktop Mobo: ASRock model: H87 Performance serial: <superuser/root required>
UEFI: American Megatrends v: P2.60 date: 01/14/2016

test -d /sys/firmware/efi && echo efi || echo bios
efi

sudo efibootmgr -v
[sudo] password for trevor:
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0001,0002
Boot0000* Manjaro HD(1,GPT,7855aa74-787c-475a-9da2-b507f636dd59,0x1000,0x96000)/File(\EFI\Manjaro\grubx64.efi)
Boot0001* Hard Drive BBS(HD,0x0)…GO…NO…o.S.a.m.s.u.n.g. .S.S.D. .8.6.0. .E.V.O. .1.T.B…A…>…Gd-.;.A…MQ…L.4.S.D.B.F.N.M.0.1.A.5.1.1.6. .W. . . . …BO…NO…o.S.a.m.s.u.n.g. .S.S.D. .8.4.0. .P.R.O. .S.e.r.i.e.s…A…>…Gd-.;.A…MQ…L.1.S.R.2.E.N.D.A.1.2.3.5.4.6. .L. . . . …BO
Boot0002* CD/DVD Drive BBS(CDROM,0x0)…GO…NO…o.P.L.D.S. .D.V.D.+./.-.R.W. .D.H.-.1.6.A.6.S…A…>…Gd-.;.A…MQ…L. . . . . . . . . . . . . . . . . . . . …BO

sudo parted -l
Model: ATA Samsung SSD 860 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 2097kB 317MB 315MB fat32 boot, esp
2 317MB 948GB 948GB ext4

Model: ATA Samsung SSD 840 (scsi)
Disk /dev/sdb: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 246GB 246GB primary ntfs boot
2 246GB 246GB 560MB primary ntfs msftres

Again, if I just boot normaly; I boot into Manjaro, no problems,

If I do a F11 and choose from the SSD 860 from the list (the SSD 860 only contains Manjaro), it boots into my Windows setup, before today clicking on the SS 860 booted me into Manjaro, now it boots into Windows thats installed only on the SSD 840,

it’s that what I do not understand

SSD 860 Manjaro only setup
SSD 840 Windows only setup

PS : This bit seems strange (why is showing the 860 and the 840 together)
Boot0001* Hard Drive BBS(HD,0x0)…GO…NO…o.S.a.m.s.u.n.g. .S.S.D. .8.6.0. .E.V.O. .1.T.B…A…>…Gd-.;.A…MQ…L.4.S.D.B.F.N.M.0.1.A.5.1.1.6. .W. . . . …BO…NO…o.S.a.m.s.u.n.g. .S.S.D. .8.4.0. .P.R.O. .S.e.r.i.e.s…A…>…Gd-.;.A…MQ…L.1.S.R.2.E.N.D.A.1.2.3.5.4.6. .L. . . . …BO