NetBSD-Users archive

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

Re: fdisk MSDOS partitions too large = not mountable



Stephen Borrill <netbsd%precedence.co.uk@localhost> wrote:

> I'm seeing a number of makes and models of camera that have dodgy fdisk 
> partition structure. The size of the FAT partition is the same as the 
> whole disk, but the start offset is 1. On NetBSD 3, this is mountable, but 
> with NetBSD 4 and later, the filesystem will not be mounted.
> ...

Yup, here's another: Polaroid t1031.  Actually, it mounts okay w/o the flash RAM
(SDHC) installed but of course that doesn't leave much room for many pictures.
The work-around is to put it in "Printer" mode (PTP/PictBridge mode) and use
gphoto2/gphotofs.  Would be nicer though if a "fudge" could be made so as to
allow straight umass access. 

Jeff

--

dmesg, fdisk & disklabel output for Polaroid t1031 camera (w/ & w/o SDHC card):

---------------------
 camera w/ SDHC card
---------------------
# dmesg | tail
...
umass0 at uhub3 port 5 configuration 1 interface 0
umass0: Polaroid t1031, rev 2.00/0.00, addr 2
umass0: using ATAPI over Bulk-Only
atapibus1 at umass0: 2 targets
sd0 at atapibus1 drive 0: <Polaroid, Digital Camera, 1.10> disk removable
sd0: fabricating a geometry
sd0: 7593 MB, 7593 cyl, 64 head, 32 sec, 512 bytes/sect x 15550920 sectors
sd0: fabricating a geometry
sd0: mbr partition exceeds disk size
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

# fdisk /dev/sd0
Disk: /dev/sd0d
NetBSD disklabel disk geometry:
cylinders: 7593, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
total sectors: 15550920

BIOS disk geometry:
cylinders: 968, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 15550920

Partition table:
0: Primary DOS with 32 bit FAT (sysid 11)
    start 8192, size 15556608 (7596 MB, Cyls 0/130/3-968/220/20)
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
No active partition.


# disklabel /dev/sd0  | sed '1,/^$/d'

4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  15550920         0     4.2BSD      0     0     0  # (Cyl.      0 -   7593*)
 d:  15550920         0     unused      0     0        # (Cyl.      0 -   7593*)
disklabel: boot block size 0
disklabel: super block size 0


----------------------
 camera w/o SDHC card
----------------------
# dmesg | tail
...
umass0 at uhub3 port 5 configuration 1 interface 0
umass0: Polaroid t1031, rev 2.00/0.00, addr 2
umass0: using ATAPI over Bulk-Only
atapibus1 at umass0: 2 targets
sd0 at atapibus1 drive 0: <Polaroid, Digital Camera, 1.10> disk removable
sd0: fabricating a geometry
sd0: 10320 KB, 10 cyl, 64 head, 32 sec, 512 bytes/sect x 20640 sectors
sd0: fabricating a geometry


# fdisk /dev/sd0
fdisk: Cannot determine the number of heads
Disk: /dev/sd0d
NetBSD disklabel disk geometry:
cylinders: 10, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
total sectors: 20640

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

Partition table:
0: Primary DOS with 12 bit FAT (sysid 1)
    start 1, size 20639 (10 MB, Cyls 0/0/2-10/4/32), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
First active partition: 0


# disklabel /dev/sd0  | sed '1,/^$/d'

5 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 d:     20640         0     unused      0     0        # (Cyl.      0 -     10*)
 e:     20639         1      MSDOS                     # (Cyl.      0*-     10*)
disklabel: boot block size 0
disklabel: super block size 0


Home | Main Index | Thread Index | Old Index