Port-sparc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: disklabel vs. dos partition (reading an sdcard in NetBSD/sparc)
Hello,
On Mon, 15 Mar 2021 10:06:23 +0100
Romain Dolbeau <romain%dolbeau.org@localhost> wrote:
> > You can use a MBR only solution, but it requires a tiny bit of manual
> > work: you need to run mbrlabel(8) to pick up the MBR partitions at
> > runtime.
>
> Thank you! That's the command I was missing for proper testing.
> That, and the fact I had messed up the device node: I was still using
> minor 0 (leftover from pre-disk driver development), when for the full disk
> I needed 2 as I discovered immediately after my e-mail...
>
> 'mbrlabel' does detect the partition on the micro-sd now:
>
> ####
> (dolbeau)ss20:~> ll /dev/rdfpga_sdcard0*
> brw-r--r-- 1 root wheel 141, 2 Mar 15 09:42 /dev/rdfpga_sdcard0
> brw-r--r-- 1 root wheel 141, 0 Mar 15 09:52 /dev/rdfpga_sdcard0a
> brw-r--r-- 1 root wheel 141, 1 Mar 15 09:53 /dev/rdfpga_sdcard0b
> brw-r--r-- 1 root wheel 141, 2 Mar 15 09:53 /dev/rdfpga_sdcard0c
> (dolbeau)ss20:~> mbrlabel /dev/rdfpga_sdcard0
> Found MSDOS partition; size 62513152 (30524 MB), offset 8192
> adding MSDOS partition to slot a.
>
> 3 partitions:
> # size offset fstype [fsize bsize cpg/sgs]
> a: 62513152 8192 MSDOS # (Cyl. 0*- 3891*)
> c: 62521344 0 unused 0 0 # (Cyl. 0 - 3891*)
>
> Not updating disk label.
> ####
>
> I still can't mount the partition with 'sudo mount -o ro
> /dev/rdfpga_sdcard0a /mnt/'; same complaint about 'Device not
> configured' - and my extra traces in the kernel show it's the same as
> before: readdisklabel doesn't find the nonexistent label on-disk.
>
> My guess is I need to update the on-disk label with 'mbrlabel -w -r'
> to be able to then mount partitions ? I've tried 'mbrlabel -w' as
> root, but it didn't help (I haven't enabled writing yet, so '-r' won't
> work ATM).
mbrlabel -w should update the kernel's idea of the label, and allow you
to mount the partition. I do that on sparc64 all the time.
You could also enable wedges with MBR support and have this done
automatically:
options DKWEDGE_AUTODISCOVER # Automatically add dk(4) instances
options DKWEDGE_METHOD_BSDLABEL # Support disklabel entries as wedges
options DKWEDGE_METHOD_MBR # Support MBR partitions as wedges
... and leave BSDLABEL out if you don't want them on your boot disk.
have fun
Michael
Home |
Main Index |
Thread Index |
Old Index