LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-22-2022, 03:39 PM   #1
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Rep: Reputation: 20
How to restore Windows 10 Default Boot Loader?


Hi, I installed Linux Mint 18.x quite a few years ago alongside my Windows 10 using a dual boot setup. I'm trying to restore my default Windows boot loader. I want to completely remove Linux Mint and try out the latest Fedora distribution in a dual boot setup instead. Prior to loading Fedora 36 I would like to get back to a default boot loader.

I already tried to reset PC to command prompt and ran >
bootrec /rebuildbcd

I was debating on trying this command next but the post I was reading mentioned it might hose things up?

bcdboot c:\windows /s c:

This didn't find Windows boot loader so Grub2 remained intact on boot up. I also have a Windows 10 recovery USB drive but it must be corrupt because it was unable to boot up. I was going to try and use that to recover my Windows boot loader. Here's some info on my setup and boot config.

Code:
DISKPART> list vol

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     H   CMORELDRIVE  UDF    DVD-ROM       18 GB  Healthy
  Volume 1     G   BACKUPS      NTFS   Partition    117 GB  Healthy
  Volume 2     I   BACKUP2      NTFS   Partition    256 GB  Healthy
  Volume 3     D   GAMES        NTFS   Partition    459 GB  Healthy    System
  Volume 4     E   RAIDAPPLICA  NTFS   Partition   1223 GB  Healthy    Pagefile
  Volume 5     C                NTFS   Partition    111 GB  Healthy    Boot
  Volume 6                      NTFS   Partition    572 MB  Healthy    Hidden

Might want to run bcdboot c:\window /s c: 
BUT, It says only do this if you are and expert as it could cause problems

Ok, this shows where my loader is!
C:\WINDOWS\system32>bcdedit

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=D:
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {f20a020d-23ab-11eb-b019-a50aedad7923}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \WINDOWS\system32\winload.exe
description             Windows 10
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {19dab80f-2369-11eb-97a5-c98c3edd0424}
displaymessageoverride  CommandPrompt
recoveryenabled         Yes
allowedinmemorysettings 0x15000075
osdevice                partition=C:
systemroot              \WINDOWS
resumeobject            {f20a020d-23ab-11eb-b019-a50aedad7923}
nx                      OptIn
bootmenupolicy          Standard
bootlog                 No
I attached a screen shot showing where my Linux Mint is currently installed where I want to repurpose that partition for Fedora 36.

Appreciate any assistance.

Last edited by NuxIT; 05-22-2022 at 04:08 PM. Reason: Add Image
 
Old 05-22-2022, 05:10 PM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,804
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
You're going the hard way. Boot the Fedora installation media, have it use the space currently devoted to Mint. That will replace Mint with Fedora, and include Windows in its Grub. Same goes for probably 97%+ of distros in existence. They all are able to reuse space devoted to an existing Linux installation if you simply make suitable menu selections.
 
Old 05-22-2022, 05:57 PM   #3
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by mrmazda View Post
You're going the hard way. Boot the Fedora installation media, have it use the space currently devoted to Mint. That will replace Mint with Fedora, and include Windows in its Grub. Same goes for probably 97%+ of distros in existence. They all are able to reuse space devoted to an existing Linux installation if you simply make suitable menu selections.
Hi mrmazda, appreciate this info. I think I'll give that a try before moving on to removing grub based on the research I did.
Do you think it will be pretty clean and remove the Linux Mint from the GRUB menu? If not, I suppose it's not a big deal as long as I can use a grub editor in the GUI to modify the default OS to select upon boot up ,etc.

This is what I "was" going to try but I think I'll just use your method to load Fedora 36 to my 180 GB partition in my attached image.

Remove 180 GB partition in Windows disk mgmt and make that space Unallocated but do not assign/expand it to Windows since I want it free for Linux

Then do the following>
bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildbcd

But, per your suggestion I think I'll just Boot Fedora and load it to where my Linux Mint currently resides. Hopefully that works out for me.
Appreciate any additional input before proceeding.
 
Old 05-22-2022, 06:13 PM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,804
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by NuxIT View Post
Do you think it will be pretty clean and remove the Linux Mint from the GRUB menu?
Fedora will be building a new Grub menu from scratch, long after the Mint filesystem(s) the old Grub menu came from are history. Fedora's installer will either reformat Mint's partitions, or delete them and create new ones, according to the menu selections you make.
 
1 members found this post helpful.
Old 05-22-2022, 08:01 PM   #5
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Original Poster
Rep: Reputation: 20
Great, Thanks for this info mrmazda! I'm probably going to try and get Fedora loaded shortly. I'm looking at some other post and information mentioning it's possible to retain your /home directory between distros! This sounds like a good option and I might give that a try. I booted up my mint just to confirm where my partitions are. I might try to retain my /home directory just as a test but I already backed up what I needed. I would likely need to change the file system from xfs to something else. Here's a screen shot of the 640GB Western Digital Drive I have my Linux mint currently installed on. I really want to try Fedora so I plan on giving this a try soon! I'll report back soon.

 
Old 05-22-2022, 09:18 PM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,804
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Distros have been removing XFS support. I don't know where F36 is on this, but very likely as a bleeding edge distro it's probably already been gone. There may be another reason for repartitioning. BTRFS / comes with snapshotting, which imposes a lot bigger space requirement than EXT4. I'm surprised your Mint installation chose the allocations it did. To fit an installation into 40 GB BTRFS is cutting it thin, requiring considerable ongoing care managing snapshots. OTOH, 40GB is more than plenty for most users of EXT4. To increase size for / on BTRFS would require either taking space from sdc7, IOW, removing it, thus losing whatever it contains; and/or eliminating swap, giving its space to /, and/or also eliminating or downsizing sda1. FWIW, all my Fedoras are on EXTx, and 8,000 MiB or smaller. IIRC, my first Fedoras were 4,000, some of which still alive but hibernating on disks in virtual mothballed PCs.

Note that by default, Fedora wants to use LVM. Before starting, investigate what that means, and whether you want it or not.

If Fedora is really just an experiment for you, you might want to just let it do whatever it wants, then exercising more control next time(s), if there are any.
 
1 members found this post helpful.
Old 05-23-2022, 11:20 AM   #7
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by mrmazda View Post
Distros have been removing XFS support. I don't know where F36 is on this, but very likely as a bleeding edge distro it's probably already been gone. There may be another reason for repartitioning. BTRFS / comes with snapshotting, which imposes a lot bigger space requirement than EXT4. I'm surprised your Mint installation chose the allocations it did. To fit an installation into 40 GB BTRFS is cutting it thin, requiring considerable ongoing care managing snapshots. OTOH, 40GB is more than plenty for most users of EXT4. To increase size for / on BTRFS would require either taking space from sdc7, IOW, removing it, thus losing whatever it contains; and/or eliminating swap, giving its space to /, and/or also eliminating or downsizing sda1. FWIW, all my Fedoras are on EXTx, and 8,000 MiB or smaller. IIRC, my first Fedoras were 4,000, some of which still alive but hibernating on disks in virtual mothballed PCs.

Note that by default, Fedora wants to use LVM. Before starting, investigate what that means, and whether you want it or not.

If Fedora is really just an experiment for you, you might want to just let it do whatever it wants, then exercising more control next time(s), if there are any.
Thanks for all this info! I haven't ran the installer yet since I've been busy. I'm thinking I will probably choose "Something Else" when doing the install if it's similar to the Ubuntu 22.04 dual boot install I recently did on my laptop. That gave me more control over how the install was configured. I've backed up what I need so I'm planning on removing all three of these partitions in Windows before starting the installer and making the space appear as unallocated. That should give me just over 220GB to use for my Fedora installation. I believe my Grub2 is on a different partition so this shouldn't affect Grub2 and hopefully Fedora can find the Grub and add it to the Boot menu? If I manually partition this out how much do you suggest for root with BTRFS? I thought 40GB was more than enough and I'm not sure I'm overly concerned about managing snapshot but would rather be safe than sorry. On most my previous Linux distros 20 GB was usually adequate for root (/).

 
Old 05-23-2022, 12:41 PM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,804
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by NuxIT View Post
I believe my Grub2 is on a different partition so this shouldn't affect Grub2 and hopefully Fedora can find the Grub and add it to the Boot menu?
Default Grub installations are done to MBRs, not partitions, so it's not likely Mint did differently. Fedora is going to write its own Grub, either on the MBR of the disk you're installing Fedora to, or if you direct, to one of the other disks' MBR. "Finding" the old Grub shouldn't be relevant, but removing it if it's on a different disk than where it will put its own would be something I would do in this situation. Having an extra Grub that isn't maintained could bite in a rescue situation.

Quote:
If I manually partition this out how much do you suggest for root with BTRFS?
I'm not one to ask about this. I've never used BTRFS, and don't plan to in the foreseeable future. I've seen 60GB recommended more than once. You should be able to get by with 40GB, but only with diligent snapshot management.
 
Old 05-26-2022, 11:48 AM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,657
Blog Entries: 4

Rep: Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938
I no longer use "dual booting." I run guests in virtual machines – often using Oracle's "VirtualBox" software, which is easy to use, full-featured, and absolutely free. Runs on everything.
 
Old 05-26-2022, 01:05 PM   #10
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382
Blog Entries: 1

Rep: Reputation: 71
Quote:
Hi, I installed Linux Mint 18.x quite a few years ago alongside my Windows 10 using a dual boot setup. I'm trying to restore my default Windows boot loader. I want to completely remove Linux Mint and try out the latest Fedora distribution in a dual boot setup instead. Prior to loading Fedora 36 I would like to get back to a default boot loader.
If I remember well, the repair function of the Windows installation disk will reinstall the default Windows bootloader. After that, when you install Fedora, it will install it's own grub bootloader. So why bother to do that when it's going to be erased eventually?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I have to run my own u-boot loader instead of default u-boot loader of BeagleBone Black Amolp Linux - Embedded & Single-board computer 2 06-23-2016 01:12 PM
Linux boot loader entry in Windows boot loader abhikohokade Linux - Newbie 6 02-22-2013 06:12 AM
I want to remove ubuntu boot loader and use windows boot loader RUshabh55 Linux - Newbie 9 11-29-2009 07:01 PM
How to change from grub boot loader to lilo boot loader linuxjamil Linux - Software 1 05-27-2008 01:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration