• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

Corrupt partition table

how can i corrput a partition from a linux OS?
0
areyouready344
Asked:
areyouready344
1 Solution
 
areyouready344Author Commented:
I'm trying to test the recovery of corrupt partition if there is a way to do it with the "dd" command on the linux operating system
0
 
Maciej SsysadminCommented:
Assuming you have your disk on /dev/sda. Remember, that below command will write random data to your partition table - do it on your own risk!

dd if=/dev/urandom of=/dev/sda bs=1 skip=446 count=64
0
 
fosiul01Commented:
HI
have you tryed with gparted, its worth to give it a try
http://ubuntuforums.org/showthread.php?t=370121

but is there any way to explain little bit actualy, whats the problem, what error you seeing ??
0
 
MysidiaCommented:
An easy way to corrupt the partition table (and the boot block)
is to blow away sector 0.

for example, if your hard drive device is 'hda'

dd if=/dev/zero of=/dev/hda bs=512 count=1


It would be extroardinarily unlikely for just the last 64 bytes of sector 0 to get corrupted,  most likely all 512 bytes would.

To recover, you should be prepared to restore not only your partition table from backup,  but your boot code (i.e. Grub, LILO, etc) as well.

0
 
Maciej SsysadminCommented:
Overwriting 512 bytes will corrupt entire MBR, not only partition table.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now