Deleted linux partition on a dual boot system...made mistake?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Deleted linux partition on a dual boot system...made mistake?
Hey everyone,
I am new to linux. I think I made a mistake and now I am getting a GRUB LOADER Error 21. I had a dual boot system of winxp and ubuntu. On a single hdd, winxp had 80gig partition with linux 30gig partition. After many months, I decided I wanted to remove ubuntu and through partition magic in winxp I deleted the main linux partition, not noticing the smaller swap linux partition. Now I get the error 21. Can I salvage my system without having to reformat the entire drive? What should I do now? Thanks in advance for your help.
The easiest way is to insert your WinXP disk, goto rescue mode and type "fixmbr".
This will fix your Master Boot Record (remove grub) and Windows should start.
Distribution: Formerly Various Linux Distros, Now Fixed on Fedora 32
Posts: 189
Rep:
Well I don't think this is terminal... If I read your post right you have simply wiped Linux off your hard drive - and you want to go back to just Windows (strange but OK...)
Now I'm no expert on this and if this is wrong I hope someone else will step in...
All you need to do is to put back the MBR (Master Boot Record) that Windows had (and that Ubuntu replaced with Grub) the information that Grub needs to boot isn't there anymore - that was in your Linux partition.
As I understand it - and please check first - to restore the Windows MBR you need to put in a Windows rescue disk - or boot from the Windows CD and run the command fdisk /MBR which is supposed to recover the original boot record. I've not done it myself...
The other option would be to reinstall Ubuntu (or another Linux distro) which should find Windows and set up Grub all over again and allow you to dual-boot again.
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
Well, if you removed linux partition, GRUB will not work. Try booting from DOS (Windows) boot-cd and run fdisk /fixmbr (or simply mbr, I don't remember, must be mentioned in /?).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.