I think I made a really really big mistake...

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Acid_1
Level 5
Level 5
Posts: 796
Joined: Thu Nov 01, 2007 11:12 pm
Location: Saskatchewan, Canada

I think I made a really really big mistake...

Post by Acid_1 »

I entered the command:

Code: Select all

dd if=/dev/zero of=/dev/sdb bs=512 count=1
to get rid of my MBR on my pendrive. Umm, now when I go to Computer, it says this about my partitions:

Size Type Date Modified
-- Unknown type Unknown

On virtually all my drives, which include:
USB
CD (there's nothing even in it!)
and the scariest yet, Filesystem

So, I'm going to try installing grub, so please give me info if that's wrong. Thanks.

EDIT:

And when I go

Code: Select all

sudo grub
find /boot/grub/stage1
Then it returns that it's not there.

EDIT2:

I did

Code: Select all

sudo grub
root (hd0,0)
setup (hd0,0)
And I can now boot. But in Computer it doesn't recognize the type, size, or modification dates. Is there a way to fix this?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Fred

Re: I think I made a really really big mistake...

Post by Fred »

Acid_1,

I wish I didn't have to almost always, it seems, give you bad news. :-)

You have erased your partition table as well as your mbr. The dd command once executed is unrecoverable. As you have discovered, you can put grub back into the mbr pointing to the menu.lst file and the Linux kernel. That will get your Linux system running but you have nothing in your master partition table so there is nothing there for Linux to read. From a practical stand point of view, it will be rather difficult to straighten this out without loosing the system now on the drive.

You should be able to mount usb storage and have it recognized by Linux. Then transfer anything you want to keep to that storage device. If you have separate data partitions on that drive, you will probably loose all that data.

Then repartition and start over. I know that is not what you want to hear, but it is probably where you will wind up.

The next time you want to zero your mbr and not touch your master partition table, (mpt), use the dd command below:

dd if=/dev/zero of=/dev/sdb bs=446 count=1

Look at the url below to see how that 512 byte sector is structured and you will understand why.

http://en.wikipedia.org/wiki/Master_boot_record

Fred
User avatar
Acid_1
Level 5
Level 5
Posts: 796
Joined: Thu Nov 01, 2007 11:12 pm
Location: Saskatchewan, Canada

Re: I think I made a really really big mistake...

Post by Acid_1 »

Hmm. Yes I saw that table, now it makes sense. The last 64b were for the partition table... My mistake. Well, I keep everything backed up weekly, and I did want to try openSUSE 11 sometime too. So I guess I'll dual boot Mint and OS.

EDIT:

Oh yeah, I always do stuff like this. I break my system weekly trying new things. Gotta learn somehow. :p
Locked

Return to “Installation & Boot”