You are not logged in.

#1 2010-11-08 19:42:10

no_mad
Member
Registered: 2010-10-21
Posts: 19

[SOLVED] dd mbr

in hurry I did something which I never believed to happen:

dd if=/dev/zero of=/dev/hda
dd: writing to `/dev/hda': No space left on device
20009+0 records in
20008+0 records out
10244096 bytes (10 MB) copied, 0.0457617 s, 224 MB/s

I were erasing my usb memory but instead my mbr flew away... I really don't know how to proceed, my machine is on and I'm not shutting it down, it wouldn't boot. I ask help to recover the "hda" grub

Last edited by no_mad (2010-11-08 22:06:23)

Offline

#2 2010-11-08 20:02:00

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: [SOLVED] dd mbr

I believe you overwrote the entire disk, not just the mbr

Offline

#3 2010-11-08 20:03:10

no_mad
Member
Registered: 2010-10-21
Posts: 19

Re: [SOLVED] dd mbr

but it wrote 10 MB I have 200 GB disk

Offline

#4 2010-11-08 20:09:50

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: [SOLVED] dd mbr

If I'm not mistaken the partition table is also stored in the MBR...
If you have the possibility, then backup all files to a USB drive right away. Then you can always try to save the first part of the harddrive afterwards.


MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

#5 2010-11-08 20:24:12

phaedrus
Member
From: Wellington, New Zealand
Registered: 2010-06-18
Posts: 20

Re: [SOLVED] dd mbr

the MBR is the first 512 bytes of the disk... not sure what you would have got with 10MB. I'm assuming MBR/partition table and more.

http://www.archlinux.org/packages/extra/x86_64/gpart/

gpart apparently scans the disk to try and recognise partitions, in the event of having wielded powerful commands in the wrong direction wink so if your first partition was boot you could well get away with only needing to reinstall grub onto the boot partition. however, i'm fairly noobish at the best of times, so your mileage may vary.

Last edited by phaedrus (2010-11-08 20:32:11)

Offline

#6 2010-11-08 20:28:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] dd mbr

IIRC Testdisc can recreate the partition table if your partitions are OK, but you overwrote / deleted the MBR / partition table, not sure if it can help in your case though.

Last edited by karol (2010-11-08 20:29:00)

Offline

#7 2010-11-08 20:44:52

no_mad
Member
Registered: 2010-10-21
Posts: 19

Re: [SOLVED] dd mbr

I decided to do new install. I had "luck" this machine is only for internet use so it has minimal home files and software.. I already saved my /home content and did package list. so it's up again quite fast


edit: up again....

Last edited by no_mad (2010-11-08 22:06:03)

Offline

Board footer

Powered by FluxBB