January 21, 2023

NetBSD - Mounting a filesystem from linux

I have an SD card that boots NetBSD. I put it into my USB card reader and I see 2 partitions:
/dev/sdg1 - a FAT partition (for EFI) /boot under NetBSD
/dev/sdg2 - the NetBSD root
It would be nice to mount the NetBSD partition, but given the current state of things, this can't be done using linux (I am running Fedora 37 and a 6.0.16 kernel.
The following almost works:
mount -t ufs -o ro -o ufstype=44bsd /dev/sdg2 /mnt
It first scolded me that the "ufs mount" would only work read only, and now dmesg tells me:
ufs: ufs was compiled with read-only support, can't be mounted as read-write
ufs: ufs_fill_super(): fragment size 8192 is too large
ufs: ufs_fill_super(): fragment size 8192 is too large
So, game over for now anyway, I am not going to try reworking the ufs driver. I see that "ufs" is a module, so it would not involve rebuilding the kernek to work on this, but this is becoming a rabbit hole I don't want to go down.
lsmod | grep ufs
ufs                    94208  0


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org