LinuxQuestions.org
Visit Jeremy's Blog.
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 03-02-2024, 07:32 PM   #1
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Rep: Reputation: 20
Questions about best method to remove Mint from my dual boot setup


I've had Windows 10 and Linux Mint 18.x installed in a dual boot forever now. Probably since 2018. Anyways, I'd like to cleanly remove the old Linux Mint from my hard disk and free up some space. Then I will need to wipe out GRUB so only Windows 10 boots up. My plan is to essentially just delete this partition highlighted where I installed Mint.


NOTE: Image not showing up? Here's a link to my partition in Windows.

I'm not 100% sure which hard disk I installed GRUB to but I'm pretty sure it was my E: drive at the bottom. Any idea how to verify where GRUB is installed? I could boot up to the Linux mint and run sudo fdisk -l or something. I also believe this syntax might work but have not tried yet. But, I don't really need to know this but might be good just to be aware.
Code:
sudo fdisk -l 2>/dev/null | egrep "Disk /|/dev/" | sed "s#^/dev/#Part /dev/#" | awk '{print $2}' | sed 's/://' | xargs -n1 -IX sudo sh -c "hexdump -v -s 0x80 -n  2 -e '2/1 \"%x\" \"\\n\"' X | xargs -n1 -IY sh -c \"case  \"Y\" in '48b4') echo X: GRUB 2 v1.96 ;; 'aa75' | '5272') echo X: GRUB Legacy ;; '7c3c') echo X: GRUB 2 v1.97 oder v1.98 ;; '020') echo X: GRUB 2 v1.99 ;; *) echo X: Kein GRUB Y ;; esac\""
After deleting the highlighted Linux partition above I'm planning on doing one of the following to remove GRUB and only have Windows boot.

1) Use Windows recovery USB drive and choose the menu where you can fix problems booting or whatever and it should give you a place to reformat the MBR. More less, This videos method.
2) Run this sequence of commands. This has worked on one of my older laptops that was Dual boot with Windows to remove a linux load and only have windows boot so I suppose this should work as well. Boot with the same Windows recovery USB and then run this command sequence.

Boot with Recovery USB
bootrec /scanos
bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildbcd

Thanks for any ideas on which method is best. I'm pretty sure my good old rig is UEFI if that matters.

Last edited by NuxIT; 03-02-2024 at 07:33 PM.
 
Old 03-02-2024, 09:46 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Doesn't look like a UEFI install - try expanding the Status column in that Disk Manager display; it'll indicate if a EFI partition is present. If it was, rectification would be trivial.

I'd go with the option to use the boot USB to fix it. I seem to remember it took a couple of goes last I had to (Win 7 probably). Been well over a decade since I needed fixmbr and fixboot. Whatever you do, fix the bootloader before deleting any partition(s).
 
1 members found this post helpful.
Old 03-03-2024, 01:43 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
go into windows, make it bootable (probably some kind of recovery option?) and just remove/reuse/reformat the other partition(s).
 
Old 03-03-2024, 05:15 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
The boot flag was only relevant if the M$oft loader was installed in the MBR - here it seems grub is, and is unwanted. The loader code in the MBR needs to be overwritten.
 
Old 03-03-2024, 09:11 AM   #5
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by syg00 View Post
The boot flag was only relevant if the M$oft loader was installed in the MBR - here it seems grub is, and is unwanted. The loader code in the MBR needs to be overwritten.
Here's some output I just gathered with bcdedit. It actually looks like my boot manager is on my D: drive. Before I mess around I'll go ahead and try to fix the boot loader before wiping out that partition. I'll also probably boot into my Mint load just to gather some output before trying to wipe out GRUB.

Code:
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
 
Old 03-03-2024, 11:18 AM   #6
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Original Poster
Rep: Reputation: 20
FYI, I confirmed I'm definitely using legacy MBR on this dual boot setup.
This method shows multiple ways to check.

I'm going to go ahead and re-create my old Ghost version 15 backup points created now for a last ditch potential restore in case of issues.
I'll report back what method ended up working. I might try method 1 above to just try and have the Windows recovery USB restore the MBR / BCD settings to default windows boot.ini or whatever.
 
Old 03-06-2024, 02:20 PM   #7
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Original Poster
Rep: Reputation: 20
I booted into my Mint load and gathered some output. Any ideas what the best method to proceed is? I'm pretty sure GRUB is located on my D: Drive but not 100% sure. Thanks for any input.

Code:
Where is GRUB?
Pretty sure it's on D:
/boot/grub/grub.cfg

/boot/grub $ sudo fdisk -l |more
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xea4cb144

Device     Boot Start       End   Sectors  Size Id Type
/dev/sda1  *     2048 964685823 964683776  460G  7 HPFS/NTFS/exFAT


Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x56941196


Disk /dev/mapper/isw_eaajfaaaeg_Volume0: 460 GiB, 493921501184 bytes, 964690432 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 131072 bytes / 262144 bytes
Disklabel type: dos
Disk identifier: 0xea4cb144

Device                                   Boot Start       End   Sectors  Size Id Type
/dev/mapper/isw_eaajfaaaeg_Volume0-part1 *     2048 964685823 964683776  460G  7 HPFS/NTFS/exFAT




Disk /dev/sdc: 596.2 GiB, 640135028736 bytes, 1250263728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x75fe521c

Device     Boot     Start        End    Sectors   Size Id Type
/dev/sdc1            2048  245762047  245760000 117.2G  7 HPFS/NTFS/exFAT
/dev/sdc2  *    245762048 1250263039 1004500992   479G  f W95 Ext'd (LBA)
/dev/sdc5       245764096  249956351    4192256     2G 82 Linux swap / Solaris
/dev/sdc6       249958400  333846527   83888128    40G 83 Linux
/dev/sdc7       333848576  711342079  377493504   180G 83 Linux
/dev/sdc8       711344128 1250263039  538918912   257G  7 HPFS/NTFS/exFAT


Disk /dev/sdd: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x894eb4e5

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdd1  *           64 233264220 233264157 111.2G  7 HPFS/NTFS/exFAT
/dev/sdd2       233265152 234436607   1171456   572M 27 Hidden NTFS WinRE


Disk /dev/mapper/isw_eaajfaaaeg_Volume1: 1.4 TiB, 1506478915584 bytes, 2942341632 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 131072 bytes / 262144 bytes
Disklabel type: dos
Disk identifier: 0xea4cb145

Device                                   Boot Start        End    Sectors  Size Id Type
/dev/mapper/isw_eaajfaaaeg_Volume1-part1       2048 2942337023 2942334976  1.4T  7 HPFS/NTFS/exFAT


Disk /dev/sde: 28.9 GiB, 31004295168 bytes, 60555264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
GRUB file> Attached.
Attached Files
File Type: txt grubcfg_PRE-output.txt (33.3 KB, 2 views)
 
Old 03-07-2024, 06:32 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,516

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
The image from Disk Management in your first post shows the first drive, Disk 0 which is 596GB also shows in the fdisk output in your last post as a 596GB drive and the Linux naming convention for it shows it as /dev/sdc. This is the only drive with any Linux filesystems on it so that would be where your Mint install is. So you have Grub installed on the / (root) partition. Since you are using a Legacy system, you would need a minimal Grub code in the MBR and we could 'guess' that it is /dev/sdc but that is not certain. To be certain, you would have had to notice the default when you installed Mint which I doubt you did. You could also run boot repair from the link below and select the 2nd option and then ONLY select to Create BootInfo Summary. This will output a file and at the very top of it you will be told which drive has Grub code in the MBR. There are other ways to get that information but and if you wanted, you could do an online search.

Your windows shows the "C" drive as the 111GB drive which would be /dev/sdd from Mint. Why don't you set that drive to first boot priority in the BIOS and see if it boots. If it boots Mint from Grub, then you know which drive has Grub in the MBR. If it boots windows, then you know it has windows boot code in the MBR and you are set. Simply format the partitions on which you have Mint installed.

I'm not sure why you think your bootloader is on the 'D' drive, the one labelled 'Games' as the winload.exe file is on the standard 'C' drive, /dev/sdd.

If you have the windows repair DVD/USB, why not just format the Linux partitions and install windows code to the MBR of the drive it is on? You don't need to 'remove' Mint, it is an operating system not an application so just format to a windows filesystem.

Last edited by yancek; 03-07-2024 at 06:35 AM.
 
1 members found this post helpful.
Old 03-07-2024, 06:36 PM   #9
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Original Poster
Rep: Reputation: 20
Thanks for this info yancek! I'm going to mess with this again soon. I also have the ultimate boot CD and Linux-Boot-Repair I could possibly use. I'm going to change the boot or or select individual drives upon starting my rig and seeing if it boots to Grub when selecting my 596GB Disk 0 drive to see if it boots GRUB on that. If so, I guess it's safe to say GRUB resides on that disk. I'll also try my /dev/sdd Windows SSD drive but I'm almost certain I did not install GRUB on that. I'm aware my Mint is installed on that drive. I'm also probably going to use an old tool called EasyBCD where you can backup your BCD, etc. I believe it's now known as EasyRE but I just noticed you have to pay for this so might skip messing with that. Also, where is the boot repair link you mentioned? This might be good to create the bootinfo summary you mentioned for further review.
 
Old 03-08-2024, 07:12 AM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,516

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
Quote:
Also, where is the boot repair link you mentioned?
Sorry, seem to do that a lot. Do NOT try to make any repairs, just post the link you get when it finishes here. Boot repair will also create a text file with the output, I think in /home/username directory.

https://help.ubuntu.com/community/Boot-Repair

You can backup the windows bcd boot manager files from windows without any third party software. The link below gives an explanation and you should be able to find any number of sites also explaining the process.

https://www.tenforums.com/tutorials/...e-windows.html
 
1 members found this post helpful.
Old 03-08-2024, 02:19 PM   #11
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by yancek View Post
Sorry, seem to do that a lot. Do NOT try to make any repairs, just post the link you get when it finishes here. Boot repair will also create a text file with the output, I think in /home/username directory.

https://help.ubuntu.com/community/Boot-Repair

You can backup the windows bcd boot manager files from windows without any third party software. The link below gives an explanation and you should be able to find any number of sites also explaining the process.

https://www.tenforums.com/tutorials/...e-windows.html
Thanks again yancek! I backed up my BCD to my E: drive.
I also ran the boot-repair software. Here's that output. It's interesting that boot-repair see's 3 OS's. It sees my old Windows 7 that I upgraded from years ago when it went EOL.

================================ 3 OS detected =================================

OS#1: Windows 7 on sdd1
OS#2: Windows 10 (boot) on mapper/isw_eaajfaaaeg_Volume0p1
OS#3: Linux Mint 18.3 Sylvia (18.3) on sdc6

I attached the complete output and a screen shot I took of GRUB when my system boots up. Thanks for any other advise on how to move forward!

SCREEN SHOT LINK>
https://imgur.com/a/FkjWnZd
Attached Files
File Type: txt Boot-Info_20240308_1956.txt (48.3 KB, 6 views)
 
Old 03-09-2024, 07:31 AM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,516

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
Doesn't look like you used the 2nd option for boot repair explained at their site as it generally numbers each line which makes it easier to refer to specifics in the file. Also, there is a link given by boot repair which you simply could have posted here.

In any case, you have Grub installed in the MBR of sdc (the 596GB drive) and that is the drive on which you have Mint installed (sdc6) with a swap (sdc5) and another Linux filesystem on sdc7.

Windows 10 is on sdd which is the 111GB drive, whatever that might be called in windows. So use the windows boot/repair usb you have and install windows code to the 111GB drive. Reboot and select that drive in the BIOS to boot from to test boot it then simply format the Linux partitions on sdc (596gb drive). You also already have 2 large windows ntfs partitions on this drive, sdc1 and sdc8 which apparently was your old windows 7 install. You could simply expand the ntfs partitions on this drive but probably simpler to delete/format them. You don't seem to be using the windows 7 in any case?

If you intend to try/test different Linux systems, I would suggest you pay attention to the support period for it as Mint 18.3 has not been supported for nearly 3 years (April, 2021). You might test on a usb or in virtual software before installing.
 
1 members found this post helpful.
Old 03-12-2024, 05:29 PM   #13
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Original Poster
Rep: Reputation: 20
Thanks again yancek! I'm going to look into doing this in the next few days. Appreciate your valuable input!
 
Old 03-13-2024, 02:15 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,516

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
Good luck.
 
Old 03-20-2024, 04:39 PM   #15
NuxIT
Member
 
Registered: Jul 2003
Location: Westminser, CO
Distribution: xUbuntu
Posts: 137

Original Poster
Rep: Reputation: 20
Hi yancek, I just booted my PC using a Windows 10 recovery USB drive. When I went to the Advanced menu > Command Prompt it brings you to
X:\
I typed the following.
bootrec /ScanOs
It came back with
Successfully scanned Windows installations.
Total identified Windows installations: 0
The operations completed successfully

So, I'm not sure why this command does not discover any Windows OS that's on my SSD drive that is my 111GB /sdd you mentioned above. Also, I confirmed if I hit my F8 while booting and Select my Intel 0 (SSD) drive it starts a "Windows recovery" spinning circle thing. I hit ctrl-alt-del after seeing that so I didn't boot all the way into Windows using this drive to boot off of but imagine it would of recovered or booted?

I was debating on trying this method instead.
bootsect /nt60 c: /mbr
Quote:
Windows 10 you no longer need an install disk to do this. I have just done this operation without one; all you need to do is log out so you're on the log in screen, then you start holding down Shift, and press the power icon in the bottom right, then click Restart, now let go of Shift. This will open the same menu as the repair disk. You just have to go to Troubleshoot > Advanced options > Command Line and run bootsect /nt60 c: /mbr. Grub will be gone in an instant.
Any ideas if this might be a better option to remove GRUB from my Legacy BIOS/MBR setup? I keep seeing info on EFI dual boots to use diskpart which is what I had to do on an old dual boot laptop I had in the past to completely remove GRUB and just boot Windows 10 instead. But since this is Legacy setup it's not the same. Thanks for any other input or ideas.
 
  


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
[SOLVED] Mint 19.1 install as dual boot on Win10 Toshiba Satellite Pro/ Win10 cant update/ changed boot order to Win10 first lost boot menu lost Mint Gyroman Linux - Newbie 8 07-20-2022 08:49 PM
p7zip wants to remove mint-meta-core and another vital component of Linux Mint 17.3 when I try to remove it HannemanThrashKing Linux - Newbie 17 07-13-2018 09:06 AM
Method Not Allowed: The requested method POST is not allowed for the URL /writedhcp.p WiWa Linux - Networking 15 01-06-2011 01:20 PM
Best method for dual boot with dual hard drive? aidano Linux - Software 2 11-16-2006 12:04 PM
SlackWare :Method Not Allowed The requested method POST is not allowed for the URL slack31337 Linux - Software 0 04-08-2006 06:09 PM

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

All times are GMT -5. The time now is 04:45 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