Subject: Re: USB memory reporting "fabricating a geometry"
To: None <port-i386@NetBSD.org>
From: Claes Leufven <rinsan@lysator.liu.se>
List: port-i386
Date: 09/02/2005 11:40:35
Alan Barrett <apb@cequrux.com> writes:

> What does "fdisk sd0" say?
>
> Some USB memory sticks have an MBR in sector 0 (just like an MSDOS hard
> disk), and a partition table that points to a FAT filesystem that starts
> in some sector > 0 (often sector 63).  Other USB memory sticks don't
> have an MBR at all, and have a FAT filestem starting in sector 0 (just
> like an MSDOS floppy disk).
>
> If the FAT filesystem starts in sector 0, then fdisk tries to interpret
> some random data from sector 0 as if it was an MBR partition table, and
> gets confused. disklabel might also get confused (I don't remember).
> However, you should be able to mount the raw partition (/dev/sd0d in
> your case).  I usually end up reformatting the device with an MBR (using
> fdisk, disklabel, newfs_msdos).
>
> --apb (Alan Barrett)

My fdisk output looks like this

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

BIOS disk geometry:
cylinders: 150, heads: 256, sectors/track: 53 (13568 sectors/cylinder)
total sectors: 2035200

Partition table:
0: Primary DOS with 32 bit FAT (sysid 11)
    start 53, size 2035147 (994 MB, Cyls 0-150), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>


I did fdisk,disklabel and newfs_msdos and now it works!:)

Thanks all for your fast help!

Claes Leufven