Windows 10 rewrites MBR when opened

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Windows 10 rewrites MBR when opened

Postby kritifile » Jun 1st, '23, 16:12

Some years ago I used Mageia but stopped when that PC became too weak to run anything bigger than a slow OpenBox WM. Now I'm trying to install Mageia 8 on a Win 10 64 bit machine.
The BIOS says it uses EFI to boot HDD but there is no EFI partition. I managed to install Mageia with no EFI using Grub2 and it worked once.
Then I booted into Windows using Grub and it reverted to the Windows 10 bootloader. No reinstall or updates, just booted into Windows and no Grub bootloader which was installed on my sda SSD. The only way I can keep Mageia is by never booting into Windows and I have programs on that which I need.
I have a 110 GB SSD for my Windows OS and sdb is now split into Windows and Mageia partitions. I tried putting Grub2 on sdb but I've not changed thenhdd boot order in BIOS so only Windows boots. I think my BIOS may be buggy as it has been impossible to boot from USB.
I can only find answers fors bootloader problems for UEFI so I'm posting this here.
kritifile
 
Posts: 11
Joined: Jun 1st, '23, 15:36

Re: Windows 10 rewrites MBR when opened

Postby Germ » Jun 1st, '23, 16:26

Have you updated the BIOS?
Starting in 1999: Mandrake > Mandriva > Mageia
Linux User #274693
User avatar
Germ
 
Posts: 723
Joined: Mar 30th, '11, 13:16
Location: Chelsea, Oklahoma USA

Re: Windows 10 rewrites MBR when opened

Postby kritifile » Jun 1st, '23, 16:30

No I haven't. The box was built for me by somebody who I can no longer find and all I know is that it is an Award bios. The box is AMD64.
Having bricked a router once when I knew exactly what BIOS update I needed I'm wary oftrying with so little information.
kritifile
 
Posts: 11
Joined: Jun 1st, '23, 15:36

Re: Windows 10 rewrites MBR when opened

Postby kritifile » Jun 1st, '23, 17:01

No I haven't and I have little information on it. It is a Gigabyte mobo but the revision number is on that so I'd need to remove a fair number of components, maybe, to discover it.
kritifile
 
Posts: 11
Joined: Jun 1st, '23, 15:36

Re: Windows 10 rewrites MBR when opened

Postby doktor5000 » Jun 1st, '23, 17:48

Well, if you didn't boot in EFI mode when installing Mageia, then the bootloader installed in the MBR is not in effect and is ignored as your system normally boots in UEFI mode for Win10.
You could probably make it work by installing another bootloader like refind but you would essentially run a mix of legacy and UEFI installation on an UEFI system, which should be avoided.

Some more information would be appreciated. What did the bootloader before the installer look like? Compare to https://wiki.mageia.org/en/Installing_o ... boot_media
Also, what boot media did you use, how did you write it to CD/DVD/(USB?) and how did you boot it?
And please add the gigabyte model/name (revision is not that important), under Mageia you could query that using dmidecode or something like inxi without opening your box.

The easiest and probably most hassle-free way longterm would to redo the installation in UEFI mode.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Windows 10 rewrites MBR when opened

Postby kritifile » Jun 1st, '23, 20:26

I used a net-install CD and I had text output until I chose a graphical installation. No window saying ifmy box was UEFI or Legacy, the installer started with language etc. The first time I installed with EFI boot and it wouldn't boot. After deleting all the Linux partitions I installed again in legacy mode. The systum came up to the grub menu, I selected Mageia and it started. But when I booted into Windows 10 the first time I got the MS auto-repair then I was booted into Windows. i've installed twice since then and only the MS bootloader operates.
Neither of my disks has ever had a GPT or efi partition.
My Mobo is a Gigabyte GA-78lMT-USB3 and it uses an Nvidea graphics card circa 2010.
I've just run dxdiag in windows and have some info from that. The BIOS is an Award modular BIOS version 6.0PG but that may be the GPU bios.

this comuter is old enough to have a cd drive but when I've tried to make a bootable Live Mageia Rufus only allows me to format using FAT
kritifile
 
Posts: 11
Joined: Jun 1st, '23, 15:36

Re: Windows 10 rewrites MBR when opened

Postby benmc » Jun 1st, '23, 21:17

is there a reason that you cannot run Win10 in a virtual box machine.

you are only using it for the one program.

Running it in a virtual box, then there is no risk of bootloader issues.

Windows is well known to not *play nice* with other operating systems.
benmc
 
Posts: 1213
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: Windows 10 rewrites MBR when opened

Postby morgano » Jun 1st, '23, 22:09

benmc wrote:is there a reason that you cannot run Win10 in a virtual box machine.

For me
1) License
2) to be prepared to use programs needing that OS

Windows is well known to not *play nice* with other operating systems.

No kidding.
I plugged in a compactflash with an old WindowsCE system, and Win10 automagically wiped it "repaired it" in the background.
As i knew the risk i had first made an image backup using Mageia (valuable machine control system, that some idiot based on CE, filesystem broke at power break...)
I learned earlier, because it have also auto-destroyed Live USB:s.
To top it off, a couple years ago a Windows10 update wrecked the Window7 bootloader (i had triple boot before...)
Interesting Microsoft makes system that kills their elder systems automatically.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1490
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Windows 10 rewrites MBR when opened

Postby kritifile » Jun 2nd, '23, 00:16

I installed a Mageia VM under Windows using VMWare. It is so slow its unusable (minutes to open a menu or type anything) so as Windows is so resource-hungry I doubt it would run in a VM. I only have 16 GB RAM and 20 GB free on the SSD Windows is installed on.
I used Mandrake, Mandriva and the early versions of Mageia but I was never able to install VirtualBox. Now I've forgotten most Linux commands which So it seems that the alternatives would make it harder to use the few Windows programs I need or recover passwords for web sites.
I could install Mageia again and rarely boot into Windows. Grub worked until I booted to Windows. If I did that I'd have to run an update-install after booting into Windows. Or I could install on a fast external SSD to use with my new laptop but if I put the bootloader on the internal disk and tried to dual-boot I expect Windows would remove all but M$ from it.
I don't like M$ but I have several expensive programs on it that I no longer have installation media or some licences for.
kritifile
 
Posts: 11
Joined: Jun 1st, '23, 15:36

Re: Windows 10 rewrites MBR when opened

Postby benmc » Jun 2nd, '23, 03:39

kritifile wrote:I don't like M$ but I have several expensive programs on it that I no longer have installation media or some licences for.


I hear you.

I also have an old expensive DOS programme that runs well on Win95. Win98 less so, XP --ha! I have no hardware that will run Win95.
Default Win95 will not run in a Virtual box, but there is an updated iso that installs and runs.
Downside for me, is, the changes to the updated iso prevents the DOS programme from running correctly .

There is a DOS emulator - DOSbox but it wont run the programme correctly.
My workaround was to install original Win95 into DOSbox, and then copy the programme folder from an old WIN95. The programme operates as expected, so there are workarounds, if you are *determined*

addendum:
Actually, the programme runs better. It originally was installed into a P100 Pentium, so 100MHz. The DOSbox set up allows to run at near full CPU speed, so +1GHz, which I find useful.
benmc
 
Posts: 1213
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: Windows 10 rewrites MBR when opened

Postby morgano » Jun 2nd, '23, 08:46

Throwing in a tip on many ways to install programs on Mageia:
https://wiki.mageia.org/en/Ways_to_install_programs


VirtualBox is pretty easy https://wiki.mageia.org/en/VirtualBox
I use it to run a MSW7 instance for a cpouple programs, and to chkdsk windows file systems via USB to IDE/SATA adapters
Windows 7 do not have such evil habits as W10, which sometimes instead destroys the target in such usage.
Was tricky and time consuming to install though as a bug in an W7 update that destroys the updater, but there are tricks to get around it proactively.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1490
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Windows 10 rewrites MBR when opened

Postby benmc » Jun 2nd, '23, 10:35

morgano wrote:I use it to run a MSW7 instance for a couple programs

same here.
My various hardware is 10-15YO dual core i5 with 8GB of ram, so not extravagant, and the virtual machines run, for me, at close to native speeds.

I would suggest to kritifile that you explore both Virtual Box and Clonezilla.

If your Win10 programmes require to access your GPU directly, there are some specific steps to be taken. Youtube can help here.
benmc
 
Posts: 1213
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: Windows 10 rewrites MBR when opened

Postby morgano » Jun 2nd, '23, 11:51

kritifile wrote:I installed a Mageia VM under Windows using VMWare. It is so slow its unusable (minutes to open a menu or type anything) so as Windows is so resource-hungry I doubt it would run in a VM. I only have 16 GB RAM and 20 GB free on the SSD Windows is installed on.
That does sound wrong. Enough RAM and CPU cores for the guest?
Virtualbox correctly configured, correct video driver and settings, and guest addons installed in guest?
That said i have never run virtualbox myself on windows.

Sidenote, i have forgotten how I installed my present dual boot Mageia/W10 machine. I *think* i took disk image backup, shrunk windows partitions by booting a Live system, test booted, installed Mageia. Windows became an entry in Grub.


I don't like M$ but I have several expensive programs on it that I no longer have installation media or some licences for.

The programs are the big problem.

Whatever you do, it seems it will be time consuming.
In either case do take a disk image of your valuable install.

I found a cheap used T510 laptop, Mageia runs well on it :)
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1490
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Windows 10 rewrites MBR when opened

Postby doktor5000 » Jun 2nd, '23, 16:58

kritifile wrote:I used a net-install CD and I had text output until I chose a graphical installation. No window saying ifmy box was UEFI or Legacy, the installer started with language etc. The first time I installed with EFI boot and it wouldn't boot. After deleting all the Linux partitions I installed again in legacy mode.

Then you booted/installed in legacy mode: https://wiki.mageia.org/en/Mageia_Netinstall_Iso_(Boot.iso)#Installing_-_Stage_1
This also depends how you created the installation media.

kritifile wrote:this comuter is old enough to have a cd drive but when I've tried to make a bootable Live Mageia Rufus only allows me to format using FAT

There's no need to format anything if you write in "dd" mode - for older rufus versions see https://wiki.mageia.org/en/Dump_Mageia_ ... tive_tools
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Windows 10 rewrites MBR when opened

Postby kritifile » Jun 2nd, '23, 19:33

My first attempt at installing was in EFI mode but it failed to write Grub to the boot partition. Next time I used legacy mode and installed.
Now I have a working Mageia OS but if I ever boot into Windows I'll lose it.
So I need to familiarise myself again and learn more, hoping to eventually be able to create a working VirtualBox Windows to run my irreplaceable Windows programs from there.

In order to be able to image my Windows disks I need something that will do so and allow me to boot from an unbootable system. I have been using an external SSD and Acronis, which can boot from the BIOS if it has a Windows bootloader, although the backups are Linux and the filesystem is GPT.
Mageia is fast and I don't have a disk spinning almost non-stop. But I can't print, scan, or use the Windows programs. I can print from a new laptop running Windows 11 but I can't move the programs.

When I've tried to use RUFUS it only allows formatting as FAT when I enter the Mageia image. Hopefully it will work using dd and I'll be able to lose the useless FAT partition on the flash drives.

It seems that the box I've installed Mageia on has UEFI but no security and Windows was installed in legacy mode.
kritifile
 
Posts: 11
Joined: Jun 1st, '23, 15:36

Re: Windows 10 rewrites MBR when opened

Postby doktor5000 » Jun 2nd, '23, 20:49

Would be helpful if you could post the output as root of
Code: Select all
efibootmgr -v
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Windows 10 rewrites MBR when opened

Postby kritifile » Jun 2nd, '23, 22:36

I tried but got 'command not found' for CODE and code.
I have a lot of man pages to read and I still have packages to install.
kritifile
 
Posts: 11
Joined: Jun 1st, '23, 15:36

Re: Windows 10 rewrites MBR when opened

Postby morgano » Jun 3rd, '23, 00:12

Enter

efibootmgr -v

In a terminal...
If still not found you need to install package efibootmgr
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1490
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Windows 10 rewrites MBR when opened

Postby kritifile » Jun 3rd, '23, 13:13

I do not have efibootmgr. Command not found, running find I'm told that there is no such file or directory.
The first install attempt was a uefi one. Then /boot/efi was on sdb and I don't have enough space to put it on my tiny sda with the Windows OS. It didn't work, only the Windows booted, Mageia had been removed.
Maybe if I changed the hdd order in the BIOS it would have worked. But surely if I could get booting with EFI I'd still have the problem of using Windows wiping the Linux bootloader?
I'm installing efibootmgr now but as I've not yet backed everything up I'm wary of using it because when I tried to automagically install on my first attempt the /boot/efi partition was in the middle of sdb and grub couldn't be written to disk.
kritifile
 
Posts: 11
Joined: Jun 1st, '23, 15:36

Re: Windows 10 rewrites MBR when opened

Postby kritifile » Jun 3rd, '23, 19:54

Result of efibootmgr command:
EFI variables are not supported on this system.
kritifile
 
Posts: 11
Joined: Jun 1st, '23, 15:36

Re: Windows 10 rewrites MBR when opened

Postby doktor5000 » Jun 3rd, '23, 21:28

That means your Mageia system is booted in legacy mode and has hence also been installed in legacy mode. So as I tried to explain earlier, seems you have a mixed UEFI/legacy dualboot now, which is never a good idea.
Would be interesting to get the output of
bcdedit /v
from your windows system. Start a cmd as administrator via right-click, then run this command and post the output here.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Windows 10 rewrites MBR when opened

Postby kritifile » Jun 4th, '23, 00:00

At some time I'll have to boot into Windows and I'm expecting it will overwrite the Grub bootloader. I'm trying to find a backup program that will work with a USB external disk and boot from it if possible. Installing a basic system from the net-install disk will only take a couple of hours but I've been working on getting Mageia as I want for the last two days.
suppose a fresh Mageia install (assuming I can't change to EFI by adding a /boot/efi partition to sdb then using draktools) would give me something to do. ;)
kritifile
 
Posts: 11
Joined: Jun 1st, '23, 15:36

Re: Windows 10 rewrites MBR when opened

Postby benmc » Jun 4th, '23, 23:30

kritifile wrote:I'm trying to find a backup program that will work with a USB external disk and boot from it if possible.


do have a look at Clonezilla.
it allows taking an copy or image of a single or multiple disks / partitions.
Copy is disk to disk or partition to partition. copy / image can be saved to internal or external device.
If thing *go south* after booting to windows, it is relatively straight forward procedure to restore from the copy / image to the original partition.
It would normally take about the same time to restore as it originally took to create the copy / image, so much faster than a re-install and re-tweak.
benmc
 
Posts: 1213
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: Windows 10 rewrites MBR when opened

Postby Germ » Jun 4th, '23, 23:51

Rescuezilla is a GUI frontend to Clonezilla. Works great.

https://rescuezilla.com/
Starting in 1999: Mandrake > Mandriva > Mageia
Linux User #274693
User avatar
Germ
 
Posts: 723
Joined: Mar 30th, '11, 13:16
Location: Chelsea, Oklahoma USA

Re: Windows 10 rewrites MBR when opened

Postby kritifile » Jun 5th, '23, 00:22

Thanks for the pointers. So far I've only found cloning/backup programs that only tackle the Linux side of things and I have three good sized USB SSD drives. I was reading a bit about Clonezilla today and considering it. I make a complete backup (as my Windows clone/backup program only runs in MS and boots from MS if the box won't boot and the bootloader for it is in the Windows one).
Rescuezilla is a GUI frontend to Clonezilla. Works great

Thanks, I'[[ try that as there shouldn't be as much to learn as I've forgotten almost all I knew about the commandline.
kritifile
 
Posts: 11
Joined: Jun 1st, '23, 15:36

Next

Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest