How to uninstall GRUB

by Vivek Gite · 55 comments

Q. How do I uninstall GRUB? I need to uninstall everything before sending this hard disk to someone including GRUB. All I need to keep is windows XP.

A. GNU GRUB ("GRUB" for short) is a boot loader package from the GNU Project. GRUB is the reference implementation of the Multiboot Specification, which allows a user to have several different operating systems on their computer at once, and to choose which one to run when the computer starts.

You can overwrite MBR with standard dd command. You can also use old good MS-DOS fdisk command to overwrite MBR.

Using MS-DOS/Windows 9x boot disk

In order to remove the GRUB bootloader from a Linux and Windows XP machine, boot with a Windows 9x startup disk or CD and execute the MS-DOS command:
fdisk /mbr

Using Windows XP boot disk

Boot computer using Windows XP (Windows 2000) setup disc / CD / DVD. Next, type the following commands:
# fixmbr
# exit

Using Linux

You can also use dd command from Linux itself (it removes partition table):
# dd if=/dev/null of=/dev/sdX bs=512 count=1

Just remove MBR, without the partition table (see comment below):
# dd if=/dev/null of=/dev/sdX bs=446 count=1

Replace /dev/hdX with your actual device name such as /dev/hda. Use fdisk -l command to find out device name:
# fdisk -lOutput:

Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       30384   243955057+  83  Linux
/dev/sda3           30385       30515     1052257+  82  Linux swap

Featured Articles:

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 55 comments… read them below or add one }

1 Martijn van Vliet 12.15.06 at 8:07 pm

The command # dd if=/dev/null of=/dev/sdX bs=512 count=1 is correct, but this will also wipe the partition table(!).

It could use a note that this will get you in troubles if you want to be able to reuse your data.

the alternative to NOT wipe the partition table is with bs=446 (NOT 466)

Have a good one,

2 nixcraft 12.15.06 at 11:05 pm

Martijn,

You are correct; I have updated the article.

Appreciate your post.

3 Ron Plane 04.21.07 at 3:35 am

Thanks for the help very easy to follow

4 Teemu Pudas 04.29.07 at 5:10 pm

How do you do it in Vista? I was attempting to install a Linux on an external HD, but apparently the idiotic installer decided GRUB was better off being the only thing to end up the internal drive. This is on a laptop with Vista preinstalled.

5 Shafin 06.28.07 at 8:55 pm
6 Jereme 08.07.07 at 2:04 am

On Fedora Core 6, I had to use /dev/zero instead of /dev/null. Otherwise, this guide worked great. Thanks.

7 donnie bradley 09.03.07 at 4:29 am

i suggest you download the latest version of hiren’s boot cd and use one of the mbr tools to install standard boot code – worked for me

8 gbacskai 09.11.07 at 9:16 pm

Hi!

You can do it under linx:

0. log in as a root
1. install lilo (if you do not have)
2. create a dummy lilo.conf

like this:

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=dos

other=/dev/hda1
label=dos

install lilo to MBR
lilo -M /dev/sda -b /dev/shd
and uninstall
lilo -U -M /dev/sda /b /dev/sda

Regards
Gergo

9 P3eggroll 11.23.07 at 1:03 am

This only works for XP if you have the administrator password. The way to get around the password is to use the registry editor and go to HKEY_LOCAL_MACHINE, SOFTWARE, Microsoft, Windows NT, Setup and then Recovery Console. Once you get to the Recovery Console part you must change the Security Level and Security Command value’s to 1. You can do this by right clicking and the click modify and then change the values to 1. Then you can reboot to the Recovery Console and the CD and then you can do the FIXMBR command which will fix your MBR…

10 Ash 12.28.07 at 9:04 pm

Thanks, great article – removed that pesky GRUB from my drive which decided to boot before my primary one does

11 Rodney 02.08.08 at 3:09 am

Hi:
I am trying to get rid of this GRUB and Linux partitions but i have windows vista and i cannot enter to that recovery console with the installation disk. Any suggestion?

12 fluteman 02.25.08 at 2:17 pm

Hi, I’m having exactly the same problem in trying to remove GRUB. I have an older dual-boot system (XP Pro SP/2 and Ubuntu) and I’m using one of the slave drives from that old system as a primary drive in a new system that I’m building. I installed the drive into the new system and attempted performing a fresh install using XP Pro to delete old repartitions, create a new one, and reformat the entire drive, without considering that I needed to remove the existing GRUB mbr prior to performing the install. So even though XP Pro will perform the entire install without no errors, I still get a GRUB load error on reboot.

I’ve tried using the recommended XP Pro Recovery Console process of running “FIXBOOT C:” then “FIXMBR” and then “BOOTCFG /rebuild” as well as various other alternatives and nothing works – not even deleting the partition and reformatting!

Help!

13 Carey 05.05.08 at 6:55 am

You need to use /dev/zero, not /dev/null.

14 Velibor 05.15.08 at 5:13 am

Guys if you have problems with grub in Windows Vista
this is how you solve it. restore your MBR before u erase the linux partition .

(Master Boot Record)= MBR

Put the Windows Vista installation disc in the disc drive, and then start the computer.
2. Press a key when you are prompted.
3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
4. Click Repair your computer.
5. Click the operating system that you want to repair, and then click Next.
6. In the System Recovery Options dialog box, click Command Prompt.
7. Type Bootrec.exe /FixMbr, and then press ENTER.

That’s it. Now when you reboot your PC, Vista will load automatically… You can now safely boot using your Ubuntu desktop CD, to use the built in Gnome Partition Manager to remove your Ubuntu partition!

15 Velibor 05.15.08 at 5:25 am

Rodney try to get any Vista instalation just to get in comand prompt and problem solved. Or get a dos boot floppy, USB, or burnt CD. Get to c: and type Bootrec.exe /FixMbr, and then press ENTER.
Done. Always enter bios setup to boot from the device to get to comand prompt ex: (USB, CD, Floppy etc.)
Remember to backup all your data before u install any other operating system.
That way your on the safe side always.

16 PapasmurfCBa 05.23.08 at 9:27 pm

A problem and a few questions.

Problem:
Older computer was running Fedora C4 great for several months installed from a Corporate DVD that I got from work.
Decided to install Fedora 9. Downloaded it and ultimately made 3 copies due to unsuccessful installs.
First:
Initial attempt wiped the drive and pooped the bed half way through the install. The system would not boot anything (no other media, cd, dvd, usb) until I removed the hard drive from the system, set it as slave in my XP box, formatted the drive, and set it back into the fedora box.
Next:
Fedora 9 installed with no errors, looking good so far. Reboot, and all I get is grub (I did not install this with the F9 but I did with the F4 I haven’t played with Linux since RedHat5.2).
Then:
Read this string as I was thinking that I don’t need grub if the system is only running one OS anyway. Removed grub using the

dd if=/dev/zero of=/dev/sdX bs=446 count=1
(null didn’t work)

Now:
When I boot the system stops at
Verifying DMI Pool Data ……….

I am guessing that I can fix the MBR using the F9 dvd in rescue mode but I don’t know how.

Q1: Can I fix this from the Fedora dvd in rescue mode?
Q2: If so, how do I go about that?
Q3: Since I have 1 hard drive and one OS, do I need grub?

Please don’t assume that I know anything, I hate the standard 3 hour search because I am supposed to know where the command/file is located that I don’t know to begin with.

Thank You for Your Time and Concern,
Papasmurfcba

17 PringleZ 06.03.08 at 2:31 pm

I was having Windows XP and Ubuntu before i went on to install Solaris. I made a mistake of not knowing that Solaris shared the same ’swap’ order as that of UBUNTU. So, after the installation, i got two OS’s in the system (Solaris and Windows), instead of 3 (i wanted XP, Solaris and UBUNTU together) and the GRUB menu got updated to 2.0. The Linux partition dissappeared from the menu.

Now i just want to get rid off these Solaris and UBUNTU installations by keeping my XP intact.
I tried the “fixmbr” technique, but i still get to the Solaris GRUB menu.

So, inorder to directly boot to XP, should i remove (delete) the Ubuntu and Solaris partitions on the harddisk?

When i tried to remove Solaris, i get an “operating system not found error”. So inorder to get to XP, i need the GRUB menu.

i want it to be plain old XP…(direct boot)

hope u guys can help me out here…

18 Nitin 08.05.08 at 7:52 am

Oh my god! I ran following on my dual (XP & Fedora 9) after booting from Fedora(linux) and now my system doesn’t boot at all! Not even from XP!! Just shows blank screen (with blinking underscore)!

# dd if=/dev/zero of=/dev/sdX bs=446 count=1

Is it expected ? Please help…

If I run fixmbr now, I think that will destroy all my partition table??

19 Nitin 08.05.08 at 8:24 am

Looks like running “fixmbr” fixed the booting issue.

Cheers

20 Derfomiundz 09.02.08 at 9:57 pm

Hi, Well I got this issue with Grub 0.91 and Damn Small Linux 4.2.4. I have Vista Home Premium, and I run the Live cd of DSL, and there I connected my USB drive and I “Installed it on there”Now I have 2 partitions that I don’t know where did they came from and My OS Vista doesn’t load after doinf some of the thisngs you guys said about fixmrb and stuff. It says Error Running the Os. Now I dont know what happened to all my info and I dont know what this 2 partitions do and I dont know what to do… If needed I will give more details…Thnx

21 Bigjoe 09.08.08 at 9:51 pm

thankyou guys absolutely brilliant advise i managed to fix in literally 30seconds with your advise

22 Diesel 10.27.08 at 7:58 am

Great little article. I have been looking for a simple method to safely remove Ubuntu while keeping my XP install since I completely fluffed up Ubuntu by following an incorrect guide elsewhere for something completely unrelated.
Anyway, I will give this a go.
Thank you

23 Verbal 11.28.08 at 5:19 am

I had the same problem as Diesel, and this saved my XP install. Thanks for the information!

24 HKCHAN 11.30.08 at 3:50 pm

I have exactly the same problem with Derfomiundz . I tried to install DSL-n in the USB stick and had confirmed that I can see the contends in it when mount as “sda1″. But later I found out that the hard disk is also using “sda1″ and it overwrite my boot sector er installation and I can’t boot up my windows XP anymore. Any help will be appreciated as all my data for work in my hard disk is not backup. Any advise to make my Dell Laptop bootup again in Windows XP is very much appreciated.

25 camypaj 12.07.08 at 3:02 am

xp + fc6
didn’t work with fixboot c: or fixboot [c:], BUT “fixboot” (without parameters) wrote a warning, and then wrote proper boot record. Hope this helps.

Regards,
camypaj

26 Max Schwanekamp 12.23.08 at 7:23 pm

@Velibor (7 months later!)
Thank you! I had installed Ubuntu on an external USB drive, and did not realize grub would be installed on my boot hd. Grub is fine, but if I tried to boot my laptop without the external HD connected (even though I only wanted to boot into Windows), I’d get “Grub error 20″ (unspecified error).

27 Nitin 12.29.08 at 12:55 pm

Hi ppl,

I have Fedora 8 and Win XP SP2 installed… I have a problem in Win XPthrough GRUB. Everytime I try to boot WinXP it says “GRUB Read error” after showing the menu consisting of the different OS. I tried to uninstall GRUB using the “dd” command as mentioned in this discussion and my MBR was changed. Now, when I try to boot WinXP I am facing a black screen with “GRUB” at the top left corner of the screen. I am unable to boot any OS now. Initially I had WinXP as my primary boot. I went through this forum and couldn’t find a solution to my problem. I will be glad if I am able to boot WinXP for now so that I can go to disk management and then try to install linux after that…
Need your help people!
Thank you

28 H 01.09.09 at 12:20 pm

Hi – I wanted to try Ubuntu, but couldn’t get my head around it and now I have a dual-boot screen that I don’t know how to remove! I also no longer have my Vista recovery CD so the above, really straightforward methods, won’t work – which is what you get for packing in a hurry when you’re drunk and moving flats…..is there any way I can do this? Help really appreciated!

29 Rohit Mordani 02.07.09 at 9:09 am

I dont have a CD drive in my laptop and I wanted to fix the issue. I cannot use the Recovery method (obviously since I dont have a CD drive). Is there another way to re-write the windows boot record?

30 ercan 02.15.09 at 4:57 pm

listen to this man cos his solution realy works
thxxxxxxxxxxxxxx
gbacskai 09.11.07 at 9:16 pm
Hi!

You can do it under linx:

0. log in as a root
1. install lilo (if you do not have)
2. create a dummy lilo.conf

like this:

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=dos

other=/dev/hda1
label=dos

install lilo to MBR
lilo -M /dev/sda -b /dev/shd
and uninstall
lilo -U -M /dev/sda /b /dev/sda

Regards
Gergo

31 Hasi, sri lanka 03.22.09 at 6:12 pm

Thank u very much

32 Artem 04.12.09 at 5:16 pm

I suppose FIXMBR only works if your windows partition was on the _FIRST_ partition of the drive..

33 vishal 04.13.09 at 3:50 pm

i am in big trouble , i removed my xp and installed ubuntu 7.10 but i realised dat i did blunder, when i wanted to install xp again… i booted from cd.. then a black screen comes with setup is inspecting your computer hardware config and screen disappears and nothing happens…. my exams are on my head pls anyone reply fast.. i will be very greatful of urs…thanks in advance..pls reply soon

34 vishal 04.13.09 at 4:21 pm

pls reply soon.. as soon aS possible

35 Jon 04.14.09 at 6:34 am

gbacskai,

Your information worked awesome for me — thanks muchly.

I had a broken grub boot loader after removing the linux partition from my dual boot EEE PC, and now it’s working again.

36 Francis Moeris 06.01.09 at 10:31 am

Thank you very much for the tip on how to remove grub.
Back to windows XP,
sorry to say but Ubuntu was a very bad experience for me.
In order for it to move I had to constantly move the mouse. I am using an ACER 430 travelmate.
Kind regards
Francis

37 Andrew J 06.12.09 at 10:53 am

I don’t have a setup disk, so I’ve tried the dd approach, which certainly seems to have removed grub, I no longer get an error at start up, but neither does the XP system load. How do I rebuild the MBR now that it has been over-written, so that XP can load? I have a current backup, so I would be happy completely formatting the disk or anything else destructive!

38 Nereik 06.19.09 at 3:04 pm

Hey, I have read the above tips on removing GRUB in the windows XP and Vista, but I have been unable to remove this successfully. I have duel booted windows Seven RC 32bit with Ubuntu 9.04 (Beta)! Is there anyway I can remove Ubuntu 9.04 and keep Seven? Thanks heaps cheers!

39 daid 06.20.09 at 7:36 pm

@PapasmurfCBa

I believe the assessment that outputing from /dev/null does not work is correct.

As far as I know, this is not limited to Fedora, but all Linux and UNIX-like sytems! It must be:

#dd if=/dev/zero of=/dev/hd## bs=446 count=1

To work in general. /dev/null is a place to send useless outputs, instead of to stout, for example. However, /dev/null will never contain anything, and so it cannot be used as an input file for any purpose, including dd. /dev/zero contains blank information, so it can be used as an input file to clear any sort of files or storage media location.

Unless I am in serious error, I request that the original post be edited to this point. If systems exist that can use /dev/null as an input file, then the post should, at the very least, be edited to specify that the commnad, as written, has limited usage, and that using if=/dev/zero is a more universally applicable technique.

I appreciate the post, though, and particularly the bs=446, which I always forget the exact value of.

A linked post on how to re-enable grub may also be useful. It’s pretty straight forward, but usually when I disable booting, it is for particular problem solving, and then I need to reenable grub later. I could post with the ~10 commands for this purpose from a Live CD if it’s useful.

40 paul 07.08.09 at 9:19 am

hey guys i installed unbuntu on my pc with xp, I wanted to get rid of ubuntu so i wiped the partition i made for it etc. tried to fixmbr etc noting works. whenever i boot up i get another error msg saying no sata disks detected which i only got once i deleted the partition with ununtu installed. i don’t even have any sata disks, there all IDE so ive no idea what to do. then after that msg i can press f1 to continune and then it has the dual boot either xp or ubuntu even tho ubuntu doesnt exist anymore! any help would be appreciated. also its weird i cant even do a live CD off backtrack 4 now since that happened i get errors..

Cheers lads.

41 The Doc 08.09.09 at 11:02 pm

daid is 100% correct! The use of “null” does not work. To post its use here as supposedly being an effective means of removing the Grub MBR is quite fatuous.

Also the use of “sdx” in the expression (presumably for a SATA drive), and then the note “Replace /dev/hdX with your actual device name such as /dev/hda. ” adds to the confusion!

The correct expression (for a PC with hda) to remove Grub from the MBR without deleting the partition table is:

“# dd if=/dev/zero of=/dev/hda bs=446 count=1″.
When this is accepted you will then get a response indicating one record in and one out.

42 votuananhs 08.20.09 at 2:28 pm

Thank you for information. It is great.
I run two command: fixmbr and fixboot.
Before I used both ubuntu 9.0.4 and win xp. But disk of OS ubuntu die. I find information to fix the error. Fortunately i read this article.

43 Hi_This_is_Dev 08.30.09 at 8:39 pm

Hi,

In order to explain my problem let me give you the details of my system as follows:

HD: 80 GB
First OS: Widnows XP
Partitions for Windows XP: C, D, E, F, (Free)

Installed Second OS: RHEL 5
Partitions/File Systems of Linux: Use the Free space and installed RHEL and specified / and /home partitions.

Some 3 GB space was still left free which I found through My Computer – > Manage – > Disk Manage:

Code:
C
D
E
F
Healthy Unknown Parition
Healthy Unknown Parition
Free SpaceSo, I deleted the Free Space and created a new logical volume in Windows. Before that, both Windows and Linux were running fine as part of dual booting system. When I restarted the system…. errrrrrr
Code:
Grub>prompt was there. Well, having seen it I wondered but was not worried because I am doing RHCE and my trainer taught me what to do when Grub> prompt comes. However, she said that it would come if grub.conf file was deleted. But I had not deleted any file, so, I went ahead did the troubleshooting part and was able to load linux and get the desktop. I checked the file grub.conf was intact and it must not have cuased the problem. I restarted the system and the same thing:
Code:
Grub>was there.

I was not able to load Windows XP and so I was a little confused this time. I called some other trainer and she asked me to do the following:

Code:
Grub> rootnoverify (hd0,0)
Grub> chainloader +1
Grub> boot
and voila! Widnows XP was loading!

So, I deleted the Linux partitions and restarted the system. But Grub> prompt was not willing to go away.

So, can you show me a way to remove the grub info in order for Windows XP to boot normally as if there were no Linux installed on the system? I have to do those steps over and again to boot from Windows:

Code:
Grub> rootnoverify (hd0,0)
Grub> chainloader +1
Grub> boot

One more thing, when I have deleted the Linux partitions why Grub> is still alive? I think it is present in MBR. So, how to troubleshoot it?

44 Bhgyesh Dhamecha 08.31.09 at 4:13 am

Dear,

M’ bhagyesh dhamecha..

i need help…
In my system.. is dual booting .. with win XP and RHEL 4.
at the time for new booting the system is taking automatic priority to booting Linux. i don’t know how to set priority for booting..
Yesterday, i was planned to remove the RHEL4 from my system.. the total partition is occupied to Linux total 15 GB..with like partition [ /, /home, /boot, and swap ], what wrongly i have doing is remove all partition one by one from windows, disk Management console…and then create new NTFS partition for 15 GB,

After booting the system… i show this grub error console..

” grub >”

and use to complete the command use ” tab key “…

Please help me as soon as possible..

bye.. friends..

Thanks,
Bhagyesh Dhamecha

45 dustin 09.01.09 at 7:01 pm

in reply to:

Velibor 05.15.08 at 5:13 am

Guys if you have problems with grub in Windows Vista
this is how you solve it. restore your MBR before u erase the linux partition .

(Master Boot Record)= MBR

Put the Windows Vista installation disc in the disc drive, and then start the computer.
2. Press a key when you are prompted.
3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
4. Click Repair your computer.
5. Click the operating system that you want to repair, and then click Next.
6. In the System Recovery Options dialog box, click Command Prompt.
7. Type Bootrec.exe /FixMbr, and then press ENTER.

That’s it. Now when you reboot your PC, Vista will load automatically… You can now safely boot using your Ubuntu desktop CD, to use the built in Gnome Partition Manager to remove your Ubuntu partition!

THANK YOU SO MUCH! I have searched for a vista option everywhere and no help. your command was so easy! thank you!

46 marc 09.07.09 at 4:08 pm

Hello,

I have the same problem with the GRUB loader, but am unable to follow your advices. The reason is that i have done the same mistake on a mini pc (Acer ONE). And there is no way to boot from an optical unit. The only way to boot the system is eventually with USB key. At this point my question is: Is it possible to create a windows XP based bootable usb key to restore the original booting for Win XP?
Thanks

47 Hi_This_is_Dev 09.07.09 at 6:59 pm

In reply to Bhgyesh Dhamecha’s problem:
——————————————————

Since you have deleted Linux partitions while being in Windows mode, you are getting Grub> prompt.

Now, what do you want to do?
[1] Do you want to start up Windows?

[b]Solution:[/b] (Assuming that Windows is / was your first OS)

[code]
Grub> rootnoverify (hd0,0)
Grub> chainloader +1
Grub> boot
[/code]

[2] Do you want to install Linux again?

[b]Solution:[/b]

Well, you can do that by bootting from the media containing Linux installation. (O, you already know that! )

However, be careful when you choose paritions for installing Linux. As you have already deleted the partitions which were being used by Linux, so this time you should choose “Custom Layout” and then use the Free Space for creating new partitions for Linux.

[3] Do you want to get rid of the Grub> prompt and get into Windows directly every time you start your system?

[b]Solution:[/b]

Install Recovery Console using your Windows XP Installation CD and then select it at next start up (you should follow the first solution given above for getting into Windows) and then type this command:

[code]C:\WINDOWS> fixmbr
C:\WINDOWS> boot [/code]

It will remove Grub Loader and reinstall MS DOS Loader so that you should not see the Grub> prompt again.

You may like to have a look at this page which contains my originals posts. I had a similar problem some days ago and posted how I fixed it.

http://www.linuxquestions.org/questions/linux-general-1/grub-prompt-751305/

48 Alexander 09.13.09 at 4:04 pm

Hello i’ve been having trouble with GRUB as well;
Originally i Had Xandros on my desktop, i got hold of another hard drive and installed Mandriva on it, so now i have two hard drives on desktop
thats when the problem started;
Mandriva loads fine but i can’t get Xandros to load up again.
Through Mandriva i accessed my Xandros hard drive and did what you recommended (first two steps);
# dd if=/dev/null of=/dev/sdX bs=512 count=1
# dd if=/dev/null of=/dev/sdX bs=446 count=1

But i’m not sure what you mean by your last step
“Replace /dev/hdX with your actual device name such as /dev/hda. Use fdisk -l command to find out device name:”
dis is what i get when i do fdisk -l;

—————————————————————————–
Disk /dev/sda: 10.0 GB, 10003955200 bytes
255 heads, 63 sectors/track, 1216 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0×563d5c59

Device Boot Start End Blocks Id System
/dev/sda1 * 1 629 5052411 83 Linux
/dev/sda2 630 1216 4715077+ 5 Extended
/dev/sda5 630 704 602406 82 Linux swap / Solaris
/dev/sda6 705 1216 4112608+ 83 Linux

Disk /dev/sdb: 81.9 GB, 81963220480 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0×000e689a

Device Boot Start End Blocks Id System
/dev/sdb1 1 182 1456128 82 Linux swap / Solaris
Partition 1 does not end on cylinder boundary.
/dev/sdb2 * 182 9965 78586079 83 Linux

Disk /dev/sdc: 4077 MB, 4077912064 bytes
126 heads, 62 sectors/track, 1019 cylinders
Units = cylinders of 7812 * 512 = 3999744 bytes
Disk identifier: 0×00000000

Device Boot Start End Blocks Id System

Disk /dev/sdd: 2032 MB, 2032664576 bytes
64 heads, 63 sectors/track, 984 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes
Disk identifier: 0×00000000

Device Boot Start End Blocks Id System
/dev/sdd1 1 984 1983619+ 6 FAT16
——————————————————————————-

Disk /dev/sda is my Mandriva and Disk/dev/sdb is Xandros other was my Sansa player charging.

How do i do that third step and what should i do.

Thanks for the help

P.S. after i did the first two steps and tried loading my hard drive, my monitor only displayed “GRUB” not “GRUB ERROR”.

49 MuZo 11.02.09 at 5:18 pm

Ok, here comes my problem:

C: Vista : Active and Running
Z(or)M: FlashDisk : Xubuntu 9.04 installed. 8gb

My Problem : Grub Error 17. Without Flash drive,system is NOT starting.
Recovery CD-DVD: Valid,but i dont want to use it. (REASON:) It can delete everything.

Wish: i dont want to See Grub+Uninstall linux from my usb.

Any ideas?

50 MuZo 11.03.09 at 4:24 am

Ok, Here i fixed my problem from Vista with MBRFix file.

I made a quick uninstall guide for Grub from Vista:

A “Fast” and simple Grub Removal Guide(From vista without and disk or any other stuff) with pictures :)

http://www.mumizone.com/grubuninstall.htm

51 alex 11.10.09 at 4:02 pm

boot hiren cd
run smartfdisk
then repair mbr for partition c:
and save changes

52 Starl8gazer 12.02.09 at 3:20 pm

Hello,

I have the following BIG problem.

Original situation: dual-boot computer Windows XP SP3, Linux

Goal: remove Linux installation;
concluded from web searches that I should remove GRUB first

My level of knowledge in these things: beginner

What I did: started with booting from a WinXP installation CD;
‘Repair’ did not work because hard disk driver was not found (?!);
so I thought I’d go for the Linux solution suggested above
and issued command:

root@mymachine:/# dd if=/dev/zero of=/dev/sda1 bs=446 count=1

Result: GRUB still comes up when booting, giving option to Windows or Linux;
booting Windows fails with following message:


Booting 'Windows 95/98/NT/2000'

root (hd0,0)
Filesystem type unknown, partition type 0x7
makeactive
chainloader +1

Loading stage 2..

GRUB loading, please wait...
Error 18

Linux still boots okay; it presents the following info:


root@mymachine:/# fdisk -l

Disk /dev/sda: 81.9 GB, 81963253760 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3602 28933033+ 7 HPFS/NTFS
/dev/sda2 3603 9964 51102765 f W95 Ext'd (LBA)
/dev/sda5 3603 6993 27238176 b W95 FAT32
/dev/sda6 6994 7056 506016 82 Linux swap
/dev/sda7 * 7057 9964 23358478+ 83 Linux

root@mymachine:/# cat /etc/fstab
/dev/sda6 swap swap defaults 0 0
/dev/sda7 / ext3 defaults 1 1
/dev/sda1 /mnt/winc ntfs user,ro,auto,umask=2 1 0
/dev/sda5 /mnt/wind vfat user,rw,auto,umask=0 1 0
/dev/cdrom /mnt/cdrom iso9660 unhide,noauto,exec,user,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,umask=0 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

What can I do to get WinXP to boot again?

Thanks a lot for your help!

Starl8gazer

53 Richard 12.12.09 at 4:45 am

Hi,
I have a similar query to Starl8gazer:
Will the command dd if=/dev/null of=/dev/sdX bs=446 count=1 allow the system to boot back into windows automatically at boot.

Cheers.

54 Cole Mickens 12.21.09 at 1:47 am

Richard,

No, the very point is that the command dd if=/dev/zero of=/dev/sdX bs=446 count=1, (Note: Use /dev/zero not /dev/null), will erase the boot sector (MBR) of the drive. Your computer will be unable to boot from that drive. If you are trying to boot Windows, then you need to use the Windows recovery disc and run one of the various Windows Boot Recovery commands.

They involve bootrec, fixboot/fixmbr or fdisk /mbr. I’ll leave it to you to figure out which you need for which recovery console you’re using.

55 Nicholas Maskal 01.15.10 at 4:47 am

I recently had a similar problem on a dualboot of Windows 7 x64 and Vista x86 on an SSD, with Linux run from an older IDE drive. GRUB installed itself on the SSD and recently refused to boot. I’ve tried everything in these forums, finally figuring out the only solution that has worked:

Run Windows 7 Start-up Disk. Choose the Repair option, and run command prompt.
type bootsect /nt60 ALL /mbr

this was the only command that ended up writing over GRUB while allowing the windows loader to remain intact with both partitions. Hopefully you could turn this into a tutorial for future users, because I couldn’t find anything to help me online.

-Nick

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous FAQ:

Next FAQ:

nixCraft FAQ PDF Collection Now Available To All