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)
Le lun. 15 mars 2021 à 09:46, Martin Husemann <martin%duskware.de@localhost> a écrit :
> You need a sunlabel/disklabel whenever firmware needs to access data on the
> disk, but that is ... unlikely for a SD card ,-)
Unlikely but not impossible :-) The machine currently uses a SCSI2SD V6,
so actually already uses a micro-sd card for storage although in SCSI emulation.
My long-term goal, if I ever get the time and figure everything out,
is to use the
micro-sd card in my SBus device as a 'true' storage medium, that is, have both
a RW driver in NetBSD but also a RO driver in the firmware. Keyword here is
obviously the *if* as I'm neither a NetBSD expert nor a Forth expert :-)
> 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).
Cordially,
--
Romain Dolbeau
Home |
Main Index |
Thread Index |
Old Index