NetBSD-Users archive

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

Re: disklabel generating wrong fstype



Martin Husemann wrote:
> On Thu, Jan 09, 2020 at 12:48:37AM -0500, MLH wrote:
> > I have been using fuse-exfat to read large sdcards for some time
> > and it has worked great. I have what appears to be three identical
> > 128G Samsung sdcards. Two of them mount fine, the third doesn't.
> 
> These are not real disklabels, but "faked" up from other information found
> on the disk. You can verify with 
> 
> 	disklabel -r sd0
> 
> which should tell you there is no real label on it.
> 
> The kernel generates the fake one usually from the MBR, which you can
> view with 
> 
> 	fdisk sd0
> 
> and I guess there you will see a difference.
> 
> Now to fix it you can use fdisk and change the MBR partition type, or you can
> write a real disklable to the card and switch the type there. As soon as a
> real disklabel is present, the kernel will stop generating fictious ones.

Exactly. I had written one with 
$ disklabel -i -I /dev/sd0
$ disklabel sd0
type: SCSI
disk: Flash Reader    
...
5 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 d: 250085376         0     unused      0     0        # (Cyl.      0 - 122111)
 e: 250052608     32768      MSDOS                     # (Cyl.     16 - 122111)

Then fast formatted it with a laptop so it has one there now but
it still can't mount it.

$ mount -v -t msdos /dev/sd0e /mnt
exec: mount_msdos /dev/sd0e /mnt
mount_msdos: /dev/sd0e on /mnt: Invalid argument

This was the original issue with the card. Not sure what the invalid
argument still is.

Thanks


Home | Main Index | Thread Index | Old Index