Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Sometimes I just want to wipe all partitions, MBR, and start from scratch.
The reason is that I play a lot with different OS's, including Linux.
What I'm doing now is using a debug script found in Win98SE Start-up disk, and forcing int 13 to start over, thus forcing fdisk to start fresh with the MBR.
Questions:
Since Dos doesn't read a Linux partition, am I wiping those, too? (are Linux partition tools fdisk based?)
I'm now using Darik's Boot and Nuke (written in Linux), but it takes a LONG time> Any thing else out there?
Anybody steer me to a way to write the debug script in a batch file, put it on a boot disc, and have it operate on auto? Will this even work on Linux?
My MBR is corrupted right now, and I'm a bit puzzled.........(naturally I messed up and let some lilo go there, or maybe Grub, or maybe GAG
If you want to wipe the MBR, boot your favorite linux rescue disk and:
dd if=/dev/zero of=/dev/hda bs=512 count=1
Of course, replace "/dev/hda" with the drive whose MBR you want to wipe. This command will write one 512-byte block of binary zeros onto the specified drive in the first record (the MBR).
<gulp> I actually just found out the same thing using google. Although I tried it about a zillion times on the same subject. Maybe google is putting their *paid* subscribers to the front, heh?
If you have a Win98 start up disk, why didn't you just boot from it and run fdisk /mbr? That would have replaced the existing mbr with a clean, new one. Also, the DOS fdisk (fdisk) command will wipe Linux partitions - they will show up as non-DOS, but are still wipeable.
Originally posted by XavierP If you have a Win98 start up disk, why didn't you just boot from it and run fdisk /mbr? That would have replaced the existing mbr with a clean, new one. Also, the DOS fdisk (fdisk) command will wipe Linux partitions - they will show up as non-DOS, but are still wipeable.
Well, I did investigate this a few years ago. IIRC, fdisk /mbr simply rewrites a dos/win/xp version and doesn't wipe it. I forgot the problems it didn't fix.....but I think it used another copy stored on the drive.........so, I got ANOTHER windows mbr. The problems? Well, I was re-installing XP or something from an OEM disc and it wouldn't allow it. Also some third party boot managers wouldn't work. Also, any mbr virus stays...........Plenty of reasons to want to really wipe it. What's your experience? Plenty of people I know say it won't do anything except restore what was on it. Which is what I didn't want, naturally.
Why does this keep coming up - don't people know how to search ???.
First up, the first sector on the primary disk (usually called the MBR) consists of exectable boot code, the partition table, *and* a 2 byte signature - it is NOT just boot code.
- MBRs rarely (if every) need wiping. A virus might be a reason.
- re-installing a boot-loader (any boot-loader) will invalidate the previous incumbent - including viruses. There is no need to erase first.
- there is no need to erase partitions - in fact generally there's probably no need to even delete them.
- formatting or mkfs will effectively erase a partition. Much quicker - unless you have security requirements to meet DoD specifications. In which case you shouldn't be asking here.
- do *NOT* use the above dd command. See this for some tests I did.
Originally posted by syg00 Why does this keep coming up - don't people know how to search ???.
First up, the first sector on the primary disk (usually called the MBR) consists of exectable boot code, the partition table, *and* a 2 byte signature - it is NOT just boot code.
- MBRs rarely (if every) need wiping. A virus might be a reason.
- re-installing a boot-loader (any boot-loader) will invalidate the previous incumbent - including viruses. There is no need to erase first.
- there is no need to erase partitions - in fact generally there's probably no need to even delete them.
- formatting or mkfs will effectively erase a partition. Much quicker - unless you have security requirements to meet DoD specifications. In which case you shouldn't be asking here.
- do *NOT* use the above dd command. See this for some tests I did.
Why does this keep coming up? Well, it seems obvious with your link...
You wrote "this is crap-programming. I'll submit a bug report..........."
Plus, most are generally not as expert in this area as you seem to be. There appears to be differences of opinion on what to do/why/ and how..........
I DID, however use Nuke and Boot on my other box. I have no idea if I can partition and format due to the "bug" in fdisc. has it been fixed? Also, one experiment I did last week involved formatting over a previous install (mandrake) and installing Debian. When it booted, it had Mandrake's screen in with Deb's logo ovverlayed (is this a word)? Weird stuff.
And yes, I searched this forum with all the keywords I could think of previous to the post........
While trying to format previous built partitions with QTParted (found on CD rescue CD) the prog wouldn't touch other installs. That's right, it was designed to never remove any other Linux install. I think this is the reason I was looking to wipe the MBR.........(and about that 2 byte sig on the MBR) WHO use that and why? Just an identifier?
Since I ran "nuke and Boot" yesterday, I tried to use PqParted today to partition and reformat to better arrange my HD to my liking
So what happened? Nothing, Wouldn't work. so it indeed appears that using the dd command in Linux, or Nuke and Boot erases EVERYTHING, and some things that fdisk, etc requires in order to work.
I then tried to load my XP OEM to use fixmbr. No joy. Wouldn't load. Tried my XP start-up disk. No joy. No fdisk included apparently.
Next, I loaded the 98SE start-up and ran "fdsik /mbr". After that Qtparted worked fine (except it found an 8 gig partition (unknown format) I had to delete first)
Can anyone explain what happened here?? And maybe make it a sticky thread? That way, this topic wouldn't come up so much and everybody could leave their attitude at home
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.