[H-GEN] Cleaning up the MBR on a /dev/hda

Ewan Edwards Edwards_Ewan_B at cat.com
Tue Nov 15 00:42:43 EST 2005


On Tuesday 15 November 2005 12:17, Jason Parker-Burlingham wrote:
>
> The sfdisk manpage says:
>
>  -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 creates.

Great!  Thanks, looks exactly like what I need.

> I believe that standard Linux fdisk has -lu options which would be
> similarly useful.  It would probably be best to back up all your
> data, double-check the backup, and use two different fdisk programs
> to record the partition locations before making any changes.

Transfer the hdd to another box followed by a full backup and 
re-partition & format was another option.  But, being fundamentally 
lazy I wanted to avoid that.

> Oh, and Googling says that the "dd bs=512" command you mentioned
> will not, in fact, wipe the partition table, and such is my
> recollection (though I did get burned trying to run that command
> once before).

Interesting ... some of the links Google gave me suggested exactly the 
opposite. :-/  (I admit to being perplexed by that since I was of the 
understanding previously that the MBR was used for a bootloader and 
only a bootloader, while the partition table was stored elsewhere.)





More information about the General mailing list