![]() |
dd question
I have read man dd, but still am unsure of what it means. look at this line of code
Code:
dd if=/dev/zero of=/dev/hda bs=512 count=1 |
That clears the MBR. The partition table is located in that space also, so it will appear to format the drive.
However, that's only an illusion as you can restore a saved MBR and the partitions and data will re-appear if you haven't actually formated anything. I use dd or sfdisk to save and restore the mbr. For example: dd if=/dev/hda of=/mnt/images/mbrfile bs=512 count=1 dd if=/mnt/images/mbrfile of=/dev/hda bs=512 count=1 or sfdisk -d /dev/hda > mbrfile sfdisk /dev/hda < mbrfile ( man sfdisk ) -d Dump the partitions of a device in a format useful as input to sfdisk. For example, % sfdisk -d /dev/hda > hda.out % sfdisk /dev/hda < hda.out will correct the bad last extended partition that the OS/2 fdisk cre- ates. |
Thanks, that clears it up :-)
|
| All times are GMT -5. The time now is 06:00 PM. |