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

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

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

Postby Acid_1 on Thu Sep 18, 2008 6:59 pm

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?
Website: Forkwhilefork
User avatar
Acid_1
Level 5
Level 5
 
Posts: 817
Joined: Thu Nov 01, 2007 11:12 pm
Location: Saskatchewan, Canada

Linux Mint is funded by ads and donations.
 

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

Postby Fred on Fri Sep 19, 2008 1:04 am

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
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

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

Postby Acid_1 on Fri Sep 19, 2008 12:08 pm

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
Website: Forkwhilefork
User avatar
Acid_1
Level 5
Level 5
 
Posts: 817
Joined: Thu Nov 01, 2007 11:12 pm
Location: Saskatchewan, Canada


Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 12 guests