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 Tue, 10 Feb 2009, David Laight wrote:
On Fri, Feb 06, 2009 at 03:49:46PM +0000, Stephen Borrill wrote:
I've been asked to try to get an Olympus camera working again after an
upgrade to NetBSD 4.0_STABLE. On NetBSD 3.1, the fictitious disklabel
correctly has an MSDOS partition as partition e (and thus can be easily
mounted with mount_msdos /dev/sd0e /mnt). On NetBSD 4.0 and later, the
fdisk partition table appears subtly different and no MSDOS partition is
seen in disklabel; rather there is a 4.2BSD partition as partition a.

sd0: fabricating a geometry
sd0: mbr partition exceeds disk size

I suspect this is the cause of the problem.
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)
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.

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

# /dev/rsd0d:
type: SCSI
disk: FE210/X775
label: fictitious
flags: removable
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 6
total sectors: 14143
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:     14143         0     4.2BSD      0     0     0  # (Cyl.      0 - 6*)
 d:     14143         0     unused      0     0        # (Cyl.      0 - 6*)

--
Stephen


Home | Main Index | Thread Index | Old Index