~ Return to the rest of the site

NetBSD

updated 2021-07-14


Mounting ext4 partitions

I don't know that this is documented in either the NetBSD guide or wiki. If you have edit access to either and see this, please, add this in with any necessary edits! This page is public domain (as is the rest of my site); don't worry about copyright (I can confirm anything by e-mail if needed).

  1. Install filesystems/fuse and filesystems/ext2.
  2. Connect the drive with the ext4 partition you want to access.
  3. Use dmesg(8) to determine the location in /dev/ of the disk.
  4. Use disklabel(8) to determine which partition on the disk you want to access (disklabel /dev/disk) - it will be listed with the partition type "Linux Ext2" even though the partition may be ext4.
  5. Use fuse-ext2(1) to mount the partition (fuse-ext2 /dev/disk with partition letter mountpoint - for example, fuse-ext2 /dev/sd1e /mnt/sd1 to mount partition e of device sd1 to the mountpoint /mnt/sd1).
  6. This mountpoint can be unmounted with umount(8) (TODO: double-check this) as normal.