LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 09-22-2005, 02:51 AM   #1
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
Removing bootloader from within Linux or CD.


Well, this may or may not have been asked before but if it has I can not find it. I installed Linux on a friends rig but I need my hard drive back. She was supposed to buy one of her own but never did.

This is the setup. She has two hard drives, one with windoze XP and one with Gentoo Linux. Linux is on the second hard drive, grub is installed on the MBR of the drive with windoze XP on it. The Linux drive is the one I need back. Naturally if I just remove my drive it will not find the /boot with the grub file, I assume I will just get a error message though I never tried it.

She doesn't have the original XP CD, she lost it, so I can not boot the CD and just let it wipe it out real quick. Is there a way to erase the MBR and therefore grub from the drive from within Linux or from the Gentoo CD maybe? Is there a way to do it from within windoze without the CD? I just want to get rid of the bootloader so it will just boot windoze and I can remove the drive again.

Oh, I don't need to mess up windoze either. She doesn't have a CD remember, no way to install again if it gets messed up.

Thanks

 
Old 09-22-2005, 03:23 AM   #2
Stan the caddy
Member
 
Registered: Dec 2003
Location: Victoria, B.C
Distribution: Slackware
Posts: 61

Rep: Reputation: 15
Well in windows open a "terminal" and try
Code:
fdisk /mbr
I dont know if you have to be in the rescue cd for that to work or not though.

To do it from linux i belive
Code:
dd if=/dev/zero of=/dev/hda bs=512 count=1
should do it.

Last edited by Stan the caddy; 09-22-2005 at 03:27 AM.
 
Old 09-22-2005, 06:04 AM   #3
kees-jan
Member
 
Registered: Sep 2004
Distribution: Debian, Ubuntu, BeatrIX, OpenWRT
Posts: 273

Rep: Reputation: 30
Uh....
That last command will erase the master boot record, rendering your disk unbootable. I'd recommend against trying that :-)

Basically, you can't "erase" the master boot record. Best you can do is write something else over it, be it zeroes (as in the example above, rendering your disk unbootable), or a "standard" windows MBR, using fdisk /mbr or fixmbr or whatever.

Groetjes,

Kees-Jan
 
Old 09-22-2005, 12:02 PM   #4
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Original Poster
Rep: Reputation: 79
What if I make a bootable floppy. like a DOS disk but from windoze XP, will it have the fdisk command and then run it from that?

If I have read correctly, the above command fills the MBR with O's and does the same thing as fdisk /mbr or fixmbr with windoze. I have never used it though.

Has someone ever used the dd command and had it work for them? I need to know if someone actually did this or not though. I don't want to have to go buy a copy of Windoze XP so I can reinstall windoze on her rig.

Thanks

 
Old 09-22-2005, 12:47 PM   #5
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
I get my boot floppys from www.putergeek.com and they have never failed me. Get a Win 98 one, boot from it and run "fdisk /mbr" and the boot loader will be removed.
 
Old 09-22-2005, 01:58 PM   #6
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Original Poster
Rep: Reputation: 79
XavierP, have you ever used the dd command to do this? You ever seen or heard first hand of someone using that command and it being sucessful?

Mostly curious now. I have a win 98 CD and a old hard drive that I can install it on to get the floppy. Hmmm, I have a neighbor that is using my rig with windoze 98 on it too. I can just run up there and get one from it.

Still wondering about the dd command though. I read the man page and it sounds like it does erase the first 512 bytes of the drive which is the MBR.

Thanks

 
Old 09-22-2005, 03:16 PM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
I have never used dd. Normally because my system gets so hosed that I give up and start from scratch LQ members have reported that it's worked, though I'd use a test box first to ensure that the right thing gets deleted!
 
Old 09-22-2005, 06:24 PM   #8
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Original Poster
Rep: Reputation: 79
Well, I called and talked to the new guy and told him I wanted to come get my drive, he wants to use Linux too. The lady that owns the place may get the same story from him that she got from me.

Just so you know, she owns a local newspaper and needs Scribus to replace Quark. She has a very public email address, it's on the newspaper , so she gets a ton of spam and viruses. She gets several hundred emails a day, 80% of which is spam or virus stuff. Weekends, she can easily get close to 2,000 emails. She had to get broadband just because of the email. It would take all of Monday morning just to download the email. Paper has to be out on Tuesday so she needs it first thing.

That's the story. I may not get my drive back for a while longer. LOL


Last edited by dalek; 09-22-2005 at 06:27 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
removing the bootloader fom fedora? blackman890 Linux - Distributions 1 08-20-2005 03:28 PM
Removing Linux partition and bootloader drummervin Linux - General 4 10-20-2004 04:39 PM
Removing Mandrake Bootloader mzhao Linux - Newbie 2 09-11-2004 12:55 PM
removing Mandrake bootloader wjal Linux - Newbie 4 02-28-2004 09:48 AM
Removing Linux bootloader from XP. TwiceBorn Linux - Newbie 2 04-19-2003 09:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration