FYI: how gpart show -p reports the same microsdhc card in a USB reader vs. in the microsdcard slot (on a Pine64+ 2GB)
Ian Lepore
ian at freebsd.org
Thu Aug 30 15:12:26 UTC 2018
On Thu, 2018-08-30 at 07:12 -0700, Mark Millard via freebsd-arm wrote:
> On 2018-Aug-30, at 6:54 AM, Ian Lepore <ian at freebsd.org> wrote:
>
> >
> > On Thu, 2018-08-30 at 02:39 -0700, Mark Millard via freebsd-arm
> > wrote:
> > >
> > > [I do not currently have access to any alternates to the
> > > Pine64+ 2GB that have a micro sdcard slot. So I can not
> > > say that this is specific to the Pine64+ 2GB type of
> > > context: no evidence for other contexts.]
> > >
> > > gpart show -p when the microsdhc card is in a USB-based
> > > reader:
> > >
> > > => 63 62333889 da4 MBR (30G)
> > > 63 16380 - free - (8.0M)
> > > 16443 131040 da4s1 fat32lba [active] (64M)
> > > 147483 997 - free - (499K)
> > > 148480 62185470 da4s2 freebsd (30G)
> > > 62333950 2 - free - (1.0K)
> > >
> > > => 0 62185470 da4s2 BSD (30G)
> > > 0 62185470 da4s2a freebsd-ufs (30G)
> > >
> > > => 0 62185470 ufsid/5b81680084249dc0 BSD (30G)
> > > 0 62185470 ufsid/5b81680084249dc0a freebsd-ufs (30G)
> > >
> > > => 0 62185470 ufs/PINE642GBrootfs BSD (30G)
> > > 0 62185470 ufs/PINE642GBrootfsa freebsd-ufs (30G)
> > >
> > > vs. when the same microsdhc card is in the mmcsd0 slot:
> > >
> > > => 63 62333889 mmcsd0 MBR (30G)
> > > 63 16380 - free - (8.0M)
> > > 16443 131040 mmcsd0s1 fat32lba [active] (64M)
> > > 147483 997 - free - (499K)
> > > 148480 62185470 mmcsd0s2 freebsd (30G)
> > > 62333950 2 - free - (1.0K)
> > >
> > > Despite what the mmcsd0 case does not show, it seems to
> > > work fine for the freebsd-ufs file system being the root
> > > file system for booting from /dev/mmcsd0 .
> > >
> > > In fact the /etc/fstab used has:
> > >
> > > /dev/ufs/PINE642GBrootfs / ufs
> > > rw,noatime 1 1
> > > /dev/label/PINE642GBboot /boot/efi msdosfs
> > > rw,noatime 0 0
> > >
> > > which show up just fine:
> > >
> > > # df -m
> > > Filesystem 1M-blocks Used Avail Capacity Mounted
> > > on
> > > /dev/ufs/PINE642GBrootfs 29400 26971 77 100% /
> > > devfs 0 0 0 100% /dev
> > > /dev/label/PINE642GBboot 63 0 63 0% /boot/ef
> > > i
> > >
> > > So the freebsd-ufs content is found and used.
> > >
> > It's all but impossible to dig any meaning out of that jumbled wall
> > of
> > text, but from the subject line I surmise you're saying that an
> > sdcard
> > in a usb card reader shows a different geometry or size than that
> > same
> > card in a native sd slot. That's normal and expected and has always
> > been so.
> I mean that the mmcsd0 case does not show any equivalent of the:
>
> => 0 62185470 da4s2 BSD (30G)
> 0 62185470 da4s2a freebsd-ufs (30G)
>
> There is no explicit hint of a freebsd-ufs being present in the
> "freebsd" area in mmcsd0 gpart show output. (Yet it uses that
> area just fine.)
>
> It seemed odd to me even if it is expected for some reason.
>
Oh, that is unusual. I just tried the same thing on an armv7 system,
recent build of 12-current, and it doesn't behave like that. I get the
same output whether the sdcard is in an sd slot or in a usb reader. Of
course there are many differences between our setups... different usb
reader, layout on the sdcard is similar but not identical, etc.
-- Ian
More information about the freebsd-arm
mailing list