Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MSDOS vs diskabel regression in -4, -5 and -current

On Fri, 6 Mar 2009, Stephen Borrill wrote:
The code is validating the mbr data against the reported media size,
detecting that it is invalid so ignoring the mbr.

I've been sent one of the offending cameras now.

I used dd to clear the camera's memory and then fdisk to partition it (accepting defaults in the main). This started partition 0 at 32 instead of 1 (as when the camera formatted itself - fdisk didn't like this "Track zero is reserved for the BIOS"):

Disk: /dev/rsd0d
NetBSD disklabel disk geometry:
cylinders: 6, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
total sectors: 14143

BIOS disk geometry:
cylinders: 7, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
total sectors: 14143

Partition table:
0: Primary DOS with 12 bit FAT (sysid 1)
   start 32, size 14143 (7 MB, Cyls 0-6/58/31)
Bootselector disabled.

After newfs_msdos (or format from Windows), disklabel was still unhappy with the offsets set to 0 instead of 32

Further info. I tried to recreate this using vnd (dd if=/dev/zero of=test.fs count=14175). I was able to successfully fdisk, format and use disklabel on it.

Just for kicks, I copied the filesystem image created with vnd back to the camera and disklabel didn't work on there.


Home | Main Index | Thread Index | Old Index