Strange booting problem

Chris Murphy lists at colorremedies.com
Tue Jun 30 22:36:27 UTC 2015


On Tue, Jun 30, 2015 at 4:32 PM, jd1008 <jd1008 at gmail.com> wrote:
> Here is what happened after the 2 bytes at offset 511 and 512 were null'ed:
>
> fdisk /dev/sdb
>
> Welcome to fdisk (util-linux 2.24.2).
> Changes will remain in memory only, until you decide to write them.
> Be careful before using the write command.
>
> Device does not contain a recognized partition table.
>
> Created a new DOS disklabel with disk identifier 0x2c945747.
>
> Command (m for help): p
>
> Disk /dev/sdb: 1.8 TiB, 2000398933504 bytes, 3907029167 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
> Disklabel type: dos
> Disk identifier: 0x2c945747
>
>
> So, you see, those 2 bytes must have also been encoded to contain
> something about the partitions.
>
> So, with this kind of change, it destroys the partition table.

It invalidates it not destroys it. If you restore the signature, the
partition table is valid again and will work.

You really shouldn't use dd for these sorts of things, it's dangerous.
This is what wipefs is for. It also has a backup facility that makes
it easy to reverse mistakes.

http://man7.org/linux/man-pages/man8/wipefs.8.html




-- 
Chris Murphy


More information about the users mailing list