Questions about best method to remove Mint from my dual boot setup
Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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).
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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!
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.