[SOLVED] After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
David Borrink
Level 1
Level 1
Posts: 28
Joined: Wed Nov 17, 2021 4:03 pm

[SOLVED] After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by David Borrink »

I’ll try and be right to the point, but I know details are needed.

I successfully created a dual-boot situation a couple months ago on a small HP laptop to test switching to Linux from Windows in order to do it “for real” on my wife’s HP Envy. I used GParted before to remove the Windows partitions and all went well on the test laptop. Today was the “for real” day on the Envy. And I had a problem that I’ve been able to temporarily fix, and am stepping back to get a bigger picture and to get advice. What happened…

After confirming all files were now on the Linux side, and doing successful Timeshift and LuckyBackup sessions to an external drive, I rebooted on the Linux USB to use GParted to remove Windows. I deleted the Windows ntfs partition, plus I saw the Windows Recovery partition which I deleted as well since we’re leaving Windows, plus one more “unassigned” (I think) partition as well. When done, all that was left was the EFI partition at 200MiB, the partition with Linux now at 931GB, and a “unassigned” partition at 3.71Mb (going by memory on that number). The video I used to successfully do this on the test laptop before had a similar final result of those three partitions, and no “Windows Recovery” partition, so I thought all was set.

Rebooting to see the results, a blue screen came up with “Your device needs repairs” in Microsoft-looking messages. The error code of 0xc0000225 indicated that the Boot Configuration Data was the problem. Oh dear. The video I used for GParted said, “never ever delete the EFI partition or you won’t be able to boot up”, so I thought since I had followed instruction, plus did this before that I’d be all set. No.

So, following this link: https://www.drivereasy.com/knowledge/0x ... -fixed/#m4, and other advice on the LinuxMint forums, I determined I had to create a Windows Boot USB. Thankfully my daughter is still on Windows or, yeah (I’m on a Mac, yet). Once I got the Windows 10 USB created, I loaded it in the Envy and rebooted.

F9, and chose the USB drive from the boot manager that did show up now. I ran steps from the above mentioned site and ran the four terminal actions regarding rebuilding the boot configuration problem:

bootrec/ scanos - seemed okay
bootrec /fixmbr - said it was done successfully though I don’t know what that meant
bootrec /fixboot - said Access denied. Hmm…
bootrec /rebuildbcd - had no message after being done.

I decided to shut down from the options and went to reboot from the USB again with F9.

I noted that this Boot Manager screen I had used did not look like the boot manager I saw on the Linux USB, so I’m assuming this is a local boot manager on the USB.

I noticed (did I miss it before? I don’t know) but there was the Ubuntu option! I chose it and Linux came up and ran like normal. It showed me that the Linux partition was fine and I launched apps and all that with no problem. So my wife has been able to get on her computer for the moment and do normal stuff, but the problem is temporary. That USB slot is for the backup hard drive for the backups, and the other slot is for the mouse/keyboard wireless signals.

So the question is: is there a way to get the Boot Configuration Data back on the hard drive again? I had gone into GParted on the USB Linux boot and changed the Linux partition down to 650GB-ish, and created a new 250GB-ish ntfs partition (leaving an 100GB-ish open area on the drive for another partition) thinking that I might have to re-install Windows to “fix this” but I’m not sure.

That’s where my question comes in now that I have explained the situation. The Envy seemed to need a Windows thing in order to operate at all based on the error I first got when I rebooted. Having Windows 10 on a USB drive made it possible to see something again. What are my options to get this fixed? That’s where I’m at. We wanted to be 100% free of Windows, but at the moment, we still aren’t.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DJ55
Level 3
Level 3
Posts: 144
Joined: Sat Dec 04, 2021 4:05 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by DJ55 »

You shouldn't need the Windows BCD info on your hard drive and having it there won't work anyway since you no longer have Windows on the drive. Remove the Windows USB drive you made and see if you can restart your PC while holding down the Shift key; hopefully, that will force your Grub to load and you can select to boot into LM. Once you're booted into LM, go to /boot/EFI and delete the Microsoft folder. Then open a terminal and run:

Code: Select all

sudo update-grub
-Dave
LM 21.1 Cinnamon on Dell XPS-15 9570
David Borrink
Level 1
Level 1
Posts: 28
Joined: Wed Nov 17, 2021 4:03 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by David Borrink »

Interesting. I will give that a try. Is that /boot/EFI in the root level of LM? Still getting my bearings in LM.
DJ55
Level 3
Level 3
Posts: 144
Joined: Sat Dec 04, 2021 4:05 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by DJ55 »

Yes. Actually, the correct directory is /boot/efi (Linux is case-sensitive). Just open Nemo file manager and type that directory path into the address bar. It won't actually open the efi directory until you input your authentication password (perhaps twice, as I recall).
-Dave
LM 21.1 Cinnamon on Dell XPS-15 9570
David Borrink
Level 1
Level 1
Posts: 28
Joined: Wed Nov 17, 2021 4:03 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by David Borrink »

Okay, I shut down, removed the USB and booted up with the shift button held. The blue background error message screen came up. I shut down a rebooted again with F9 held and the boot manager did come up and I could pick the Ubuntu option to get LM to launch. So there IS a boot manager on the computer.

So I'm wondering if I will have to hold down F9 to get my computer to launch Linux, or do the next steps fix that?

I want to verify this next step with you. I went into the file manager and entered /boot/efi and found the boot folder. After double-clicking on the efi folder, it gave me the authentication window and I entered twice and it got me in. I see the Boot, HP, Microsoft, and ubuntu folders in there.

So removing the Microsoft folder will take out all the info in the Grub or in the Boot manager? I see a Grub folder also in the Boot folder so I just want to be sure what I'm doing here. This is like the very last step, if successful will be the completion of my wife's migration from Windows to Linux.
DJ55
Level 3
Level 3
Posts: 144
Joined: Sat Dec 04, 2021 4:05 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by DJ55 »

The objective is to normally boot into LM without using F9 or any other special keys. Since you're, understandably, nervous about the next steps, I suggest you do a Timeshift backup before deleting the Microsoft directory. Leave the grub one alone. Then be sure to do the grub update command in a terminal.
-Dave
LM 21.1 Cinnamon on Dell XPS-15 9570
David Borrink
Level 1
Level 1
Posts: 28
Joined: Wed Nov 17, 2021 4:03 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by David Borrink »

This begs the question of why there's a Microsoft folder in there in the first place since this is a Linux installation.

Something's bugging me about this. I'll be honest. Isn't the boot-up outside of the Linux partition in order to choose partitions? Why would removing the Windows folder inside of Linux at /boot/efi be the cause of why the computer isn't booting directly to the grub menu to begin with? Unless because Linux is the only OS on the computer so it's looking for ANY boot folder?

I just like to understand why, it's just my nature to be certain.
DJ55
Level 3
Level 3
Posts: 144
Joined: Sat Dec 04, 2021 4:05 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by DJ55 »

/boot/efi is where your EFI partition is mounted (view your /etc/fstab file for the mounting details, but be careful not to make any changes to the file). You're accessing files on that partition and now it's time to clean up the Windows part left on there.The most important part of what you need to do next is to update your grub, but do the Windows clean-up step first (after getting a quick Timeshift snapshot). Then your Linux bootloader should be the proper default.
-Dave
LM 21.1 Cinnamon on Dell XPS-15 9570
bendipa
Level 5
Level 5
Posts: 586
Joined: Sat Jan 04, 2020 8:02 pm
Location: NW London. UK

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by bendipa »

Need to know what partitions you actually have since it's all a bit confusing as to what you do have. Boot to live mint and run sudo parted -l. Also need to know what folders/files exist in the ESP on your hard drive, but can't determine that without the 'parted' command
Computer: Dell Vostro 470
Systems: Linux Mint 21.3 Xfce (Una), Manjaro 23.1 Xfce (Vulcan), Windows 10 (22H2) Pro.
User avatar
AndyMH
Level 21
Level 21
Posts: 13748
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by AndyMH »

Rebooting to see the results, a blue screen came up with “Your device needs repairs” in Microsoft-looking messages.
I think your original problem was that, having deleted your win partitions, you didn't mount your EFI partition and delete the windows folder in there. So you still had the win boot files pointing at non-existent partitions. Also you probably, somehow, had 'windows bootloader' at the top of your BIOS boot list.

With the windows boot files in the EFI partition gone, if you still get a grub menu giving you the choice of mint or win, then a sudo update-grub should fix it.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
David Borrink
Level 1
Level 1
Posts: 28
Joined: Wed Nov 17, 2021 4:03 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by David Borrink »

AndyMH wrote: Wed Jan 19, 2022 7:40 am
Rebooting to see the results, a blue screen came up with “Your device needs repairs” in Microsoft-looking messages.
I think your original problem was that, having deleted your win partitions, you didn't mount your EFI partition and delete the windows folder in there. So you still had the win boot files pointing at non-existent partitions. Also you probably, somehow, had 'windows bootloader' at the top of your BIOS boot list.

With the windows boot files in the EFI partition gone, if you still get a grub menu giving you the choice of mint or win, then a sudo update-grub should fix it.
Yes, when I booted up my wife's laptop this morning, the BIOS boot list has Windows first, then Ubuntu, then an EFI item. So what you're saying is that if I get Windows moved below the Ubuntu item on the Bios list, or remove it, then no more "windows blue screen message"?
David Borrink
Level 1
Level 1
Posts: 28
Joined: Wed Nov 17, 2021 4:03 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by David Borrink »

bendipa wrote: Wed Jan 19, 2022 5:16 am Need to know what partitions you actually have since it's all a bit confusing as to what you do have. Boot to live mint and run sudo parted -l. Also need to know what folders/files exist in the ESP on your hard drive, but can't determine that without the 'parted' command
Thanks for the tips. If I do the above command, will that give you the ESP info on files and folders that you need above or do I need to do something else?
Last edited by David Borrink on Wed Jan 19, 2022 10:32 am, edited 1 time in total.
User avatar
AndyMH
Level 21
Level 21
Posts: 13748
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by AndyMH »

So what you're saying is that if I get Windows moved below the Ubuntu item on the Bios list, or remove it, then no more "windows blue screen message"?
Yes.

If you mount your EFI partition - the easiest way is use disks. Click on your EFI partition then click the mount button (highlighted) it will tell you where it mounts. You can then click on that to open your file manager, or navigate to the mount point in your file manager.
disks.png
The content should look like this (this is the pcmanfm file manager - not in mint). A dual boot win10 + LM19.2:
Screenshot from 2022-01-19 14-12-03.png
You can delete the Microsoft folder. This should cause 'windows boot manager' to disappear from your BIOS boot list next time you boot, if not just move it below ubuntu.

Note, no need to post images of terminal output, and not the best way of doing it:
viewtopic.php?f=42&t=364929&p=2119362&h ... l#p2119362

I would also change your hostname if you are going to use terminal a lot (and could cause networking problems in the past due to the netbios limit of 15 characters):
viewtopic.php?p=1808033#p1808033
Mine:
Screenshot from 2022-01-19 14-27-37.png
Screenshot from 2022-01-19 14-27-37.png (9.32 KiB) Viewed 2241 times
Why T432 as the hostname, got 4 x T430 thinkpads, this is number 3, the others are T430, T431, so T432 and so on.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
DJ55
Level 3
Level 3
Posts: 144
Joined: Sat Dec 04, 2021 4:05 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by DJ55 »

AndyMH wrote: Wed Jan 19, 2022 10:29 am
So what you're saying is that if I get Windows moved below the Ubuntu item on the Bios list, or remove it, then no more "windows blue screen message"?
Yes.

If you mount your EFI partition - the easiest way is use disks. Click on your EFI partition then click the mount button (highlighted) it will tell you where it mounts. You can then click on that to open your file manager, or navigate to the mount point in your file manager.
disks.png
The content should look like this (this is the pcmanfm file manager - not in mint). A dual boot win10 + LM19.2:
Screenshot from 2022-01-19 14-12-03.png
You can delete the Microsoft folder. This should cause 'windows boot manager' to disappear from your BIOS boot list next time you boot, if not just move it below ubuntu.

Note, no need to post images of terminal output, and not the best way of doing it:
viewtopic.php?f=42&t=364929&p=2119362&h ... l#p2119362

I would also change your hostname if you are going to use terminal a lot (and could cause networking problems in the past due to the netbios limit of 15 characters):
viewtopic.php?p=1808033#p1808033
Mine:

Screenshot from 2022-01-19 14-27-37.png
@AndyMH, isn't the EFI partition normally already mounted at /boot/efi? It is on my system, by default. I've been telling the OP the same things you are: delete that Microsoft folder and then update Grub.
-Dave
LM 21.1 Cinnamon on Dell XPS-15 9570
User avatar
AndyMH
Level 21
Level 21
Posts: 13748
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by AndyMH »

Duh! I should have thought of that. My excuse - normally boot legacy and this was a test install on another drive and I hadn't booted from it. It will probably be mounted as root so will need to right click on it in your file manager and 'open as root' to make changes.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
DJ55
Level 3
Level 3
Posts: 144
Joined: Sat Dec 04, 2021 4:05 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by DJ55 »

AndyMH wrote: Wed Jan 19, 2022 10:46 am It will probably be mounted as root so will need to right click on it in your file manager and 'open as root' to make changes.
Alternatively, on my system I can just double-click on the efi folder and the system will ask me for my authentication password and then let me view and interact with it and the subfolders. The OP already did this -- he's viewed the Microsoft folder, but he's apparently been reluctant to delete it.
-Dave
LM 21.1 Cinnamon on Dell XPS-15 9570
David Borrink
Level 1
Level 1
Posts: 28
Joined: Wed Nov 17, 2021 4:03 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by David Borrink »

Andy, is that "Disks" in the system already? If so, great. The example you showed where the button was highlighted... THAT is the button to go to the file manager? Just wanted to be sure as a square is usually "stop" on some controls, like a video player, you know?

The other example someone gave was to go to the File manager and go to /boot/efi/EFI and find the Windows folder and remove it from there. Is that the same procedure? It required to authorizations window sessions to be given permission to get in the EFI folder but I got in.
User avatar
AndyMH
Level 21
Level 21
Posts: 13748
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by AndyMH »

David Borrink wrote: Wed Jan 19, 2022 11:02 am Andy, is that "Disks" in the system already? If so, great. The example you showed where the button was highlighted... THAT is the button to go to the file manager? Just wanted to be sure as a square is usually "stop" on some controls, like a video player, you know?
Yes, installed by default. In the screenshot the partition was already mounted so showing a square button (so clicking will unmount it). If it is not mounted it will show an arrow. But... as in the previous posts, it should already be mounted so no need to use disks.
The other example someone gave was to go to the File manager and go to /boot/efi/EFI and find the Windows folder and remove it from there. Is that the same procedure? It required to authorizations window sessions to be given permission to get in the EFI folder but I got in.
Yes it is and a less cumbersome way of doing it.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
David Borrink
Level 1
Level 1
Posts: 28
Joined: Wed Nov 17, 2021 4:03 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by David Borrink »

Great then you just verified a simple procedure given earlier by DJ55.
Last edited by David Borrink on Wed Jan 19, 2022 1:32 pm, edited 1 time in total.
David Borrink
Level 1
Level 1
Posts: 28
Joined: Wed Nov 17, 2021 4:03 pm

Re: After deleting Windows partition in a dual-boot, an unexpected boot configuration problem

Post by David Borrink »

Thanks, guys for confirming the method and for giving me enough to go by to finish this. I'll try this out later today. I was reluctant to do this unless I could perceive what this was to accomplish.

I like to learn why things work and not take for granted what happens. Especially since the removal of the Windows partition created a situation that I thought was worse than it was and I spent several hours trying to figure it out. I spent a lot of time trying to create a Windows 10 boot USB when apparently it was unnecessary, so that's why I've been a little reluctant to implement something without knowing why.
Locked

Return to “Installation & Boot”