NetBSD-Users archive

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

Re: laptop memory card reader



On Thu, 10 Jan 2013, Riccardo Mottola wrote:
Hi Martin

On 01/10/13 10:15, Martin Husemann wrote:
On Thu, Jan 10, 2013 at 09:36:05AM +0100, Riccardo Mottola wrote:
mount: cannot open `/dev/ld0a': Device not configured

Running fdisk on /dev/ld0 shows me:

Partition table:
0: Primary DOS with 32 bit FAT (sysid 11)
     start 8192, size 15515648 (7576 MB, Cyls 0/130/3-966/80/10)
Check out mbrlabel(8), or just try to mount the whole disk as msdos, like:

mount -t msdos /dev/ld0d /mnt
Oh, partition "d", sounds like a good idea. I'd prefer not to touch anything on the card to mount it.

sudo mount -t msdos /dev/ld0d /mnt
mount_msdos: /dev/ld0d on /mnt: Invalid argument

which is different than "not configured".

'd' would only work if the drive didn't have a partition table on it and so effectively the FAT started at 0 (fdisk would show garbage in that case as it would to interpret the filesystem as a partition table).

when I run mbrlabel, I get:

sudo mbrlabel /dev/ld0
Found MSDOS partition; size 15515648 (7576 MB), offset 8192
 skipping existing MSDOS partition at slot e.

5 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
d:  15523840         0     unused      0     0        # (Cyl. 0 -   3850*)
e:  15515648      8192      MSDOS                     # (Cyl. 2*-   3850*)

Not updating disk label.

I thus mounted /dev/ld0e and it worked smoothly!

Is it normal o have to "chase" partition with these cards? I hoped to automate mounting, being interested into view and download images from digital cameras conveniently.

Note the "skipping existing MSDOS partition at slot e" line. A disklabel will have been spoofed up anyway and running mbrlabel was not necessary. Non-NetBSD, but valid partitions count up from e (so if you had 2 partitions they would be e and f), so no need to hunt the partitions.

--
Stephen



Home | Main Index | Thread Index | Old Index