Brian's Spare Time

posted in

Mounting bsd disk in linux (Debian jessie / stretch)

See what file systems are currently supported:

cat /proc/filesystems

My kernel was built with read-only support for UFS by default, but I had to load the module:

sudo modprobe ufs see loaded modules sudo lsmod

See listing of attached disks: sudo sfdisk -l

If not entirely sure what flavor of bsd disk it is: sudo apt-get install disktype sudo disktype /dev/sdd

To mount read only: sudo mkdir /mnt/usbextdisk sudo mount -t ufs -o ro,ufstype=44bsd /dev/sdb1 /mnt/usbextdisk

the OpenBSD side of things

To do some disk repair, I fired up an openbsd live image as a virtual machine: Login: live PW: live123

Attach the USB external drive.

To see listing of hard drives attached to the system sudo sysctl hw.disknames

External drives probably sd1 (or sdN where N >= 2 if multiple drives attached)

To see disklabels on the drive: sudo disklabel sd1

You’ll see a bunch of lettered disklabels. Label ‘c’ represents the entire drive and is always present.
You probably want one of the other ones. For future purposes, note the disklabel letter

To repair disk (if disklabel is i on device 1: sudo fsck -y /dev/sd1i

To mount: mkdir /mnt/usbextdisk mount /dev/sd1i /usbextdisk

installing packages in openbsd (like rsync)

edit or create /etc/installurl:

installpath =

then symlink to older config:

ln -s /etc/installurl /etc/pkg.conf

Make sure that PKG_PATH env variable is either unset, or is correct (overriding what’s in installurl)

unset PKG_PATH

then install package:

pkg_add rysnc

tips for fast local non-network rsync

sudo rsync --size-only --no-p --Prve "ssh -T -o Compression=no -x" /mnt/usbextdisk user@host:/path