After deleting Windows partition in a dual-boot, needing to fix my boot-up to Mint

Edited: Some of below isn’t true anymore, as explained in my second post.

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: 0xc0000225 Error Code on Windows 10 [Fixed] - Driver Easy, 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.

Follow-up here a few hours later. From advice on another forum, I found that I didn’t need to have the Windows USB in there. Removing it and holding F9 at boot gives me a Boot Manager so that Boot Manager is not on the USB, but on the computer. So that gets me in Linux, and I can hook up the backup drive. BUT… that’s not a complete solution. By not using the F9 for the boot-up, I get that Microsoft-like error page, but I can power down and get back to Linux with a reboot-F9-boot manager choice.

Someone else is recommending that I go into the /boot/efi folder in the file manager and delete the Microsoft folder, then do a sudo update-grub in terminal.

I’m hesitant to run this because I’ve gotten to the point of getting Linux running again and don’t want a failure again. I’d like to get a second opinion of the above advice, just to be sure it sounds sound.

But this begs the question of what is a Microsoft folder doing in the /boot/efi folder in the first place since this is a Linux installation? When I boot up the computer, shouldn’t something outside of Linux be determining the boot, not a boot/efi folder inside the Linux partition?

I’m like, “we are on the edge of having this Windows removal done, I don’t want to blow it.” So I’d like some assurances that this method suggested will allow the laptop to boot right up to the grub menu without a F9 need.

I do not know enough about EFI partitions to give you a real answer.
I think what you will be doing is reinstalling GRUB but I have never done that for EFI partitions. I do not think you needed to boot from the windows usb at all. I think you were probably seeing a system message because the windows partition was gone and the system was looking for it.

If you boot from your linux usb stick do you have an option anywhere to repair the boot loader or reinstall/repair GRUB?

As long as the installed linux can boot when using F9 I believe you will be able to save it and just get the boot loader working correctly will fix you up.

Someone should be able to pop in here with good information on getting you fixed up.

Thanks, Dennis for sharing that. The other source is saying to remove the Microsoft folder from the /boot/efi folder then do a sudo update-grub in terminal, and what you say sort of collaborates with that – that the system is thinking there’s a Windows partition when there isn’t anymore, and the existence of the Microsoft folder in the /boot/efi folder is making the system think there should be?

I just want to understand why this works this way so that if I do what he says, it won’t cause a problem. There’s no problem booting up with F9, but I want to resolve this for good, and in the right way. If others can confirm, that would be great.

Like I said above, I am not very familiar with EFI partitions. I use them but never had to repair any.
I really don’t see any reason for the Microsoft folder to be there now that Windows is gone.
If it were me and my system I would make a back up copy of the Microsoft folder then try Re-naming it, not deleting yet (if possible). Reboot and see if anything changed. If your initial error message goes away and/or the system boots from GRUB then you could Delete the Microsoft folder (keeping the backup).
If you still need to use F9 then Updating GRUB may work.
It wouldn’t hurt to read a little on updating GRUB. I have reinstalled grub but always following a tutorial closely. I don’t have a link to any tutorials but I am sure there are some online.

I also put this issue in the LinuxMint forums and I actually have the answer from over there today.

Two different guys pretty much gave the same answer that removing the Microsoft folder would be the issue, and then running that sudo update-grub in terminal. And their descriptions of the situation helped understand that the F9 boot up is looking for any boot manager available, and the Microsoft one is the first one in the order. When I booted this morning, I looked at the F9 panel and could see that each entry was a different boot manager listing. The order was Microsoft, Ubuntu and an EFI listing. So I’m assuming based on what they said that by default, the system is looking for Microsoft first and that’s what brings up the Blue Microsoft-like error message. One guy said that by removing the Microsoft folder, then updating Grub, that would give the computer no reason to go look for a Microsoft partition and then say, “hmm something’s missing here”.

So I’ll give that a go.

And it worked perfectly. I copied the Microsoft folder to a USB just to play it safe (you never know), ran the sudo update-grub command, and then rebooted for the moment of truth…

It came up perfectly into Mint, without a grub menu choice. PERFECT. This task officially ended the journey from Windows to Linux on my wife’s Envy. We’re there!

Now the question is: how do I edit this post’s title to say “[Solved]” in the front of the title?

It looks like you can Edit an original post and add an “Optional tag”. One of he options is “solved”.

And you can change/edit the topic/subject line.