summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2022-09-13 08:53:18 +0100
committerMatthew Lemon <matt@matthewlemon.com>2022-09-13 08:53:18 +0100
commit720c5c3e4706b83a098a61db90e8ca6f87c49fe2 (patch)
tree6c13e4fb66199dbb7e585fa60f5d12b0db3a3d34
parent490bd5e9398cf4cfc42610f804c2e41d6224d330 (diff)
draft blog post
-rw-r--r--content/blog/trouble_with_usb_drives_in_openbsd.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/content/blog/trouble_with_usb_drives_in_openbsd.md b/content/blog/trouble_with_usb_drives_in_openbsd.md
new file mode 100644
index 0000000..bc16237
--- /dev/null
+++ b/content/blog/trouble_with_usb_drives_in_openbsd.md
@@ -0,0 +1,31 @@
+---
+title: "Trouble with USB drives in OpenBSD"
+date: 2022-09-13T08:31:41+01:00
+draft: true
+categories: ['Computing']
+tags: ['openbsd']
+---
+
+Coming from a Linux background, creating drives on OpenBSD is a little weird.
+
+You use `fdisk` to create a suitable "meta" partition on a drive - one of four available, and then inside that you use `disklabel` to create up to 16 paritions that are used for your files.
+Details are given, as ever, in the [OpenBSD FAQ](https://www.openbsd.org/faq/faq14.html).
+
+I use [git-annex](https://git-annex.branchable.com/) to manage my file archive and I love git-annex!
+I use it completely manually (I don't use git-annex assistant) and I've allowed a single repository to become far too big, spanning across multiple drives and servers, but that is an issue for another day.
+
+I needed to move a large video file from the internal drive (managed by git-annex) on my desktop computer which runs Debian, so that I could watch it on my laptop which runs OpenBSD so i needed a USB drive suitable for both systems.
+
+FAT32, I thought. Great.
+
+Creating a FAT32 drive in OpenBSD is of course doable.
+
+Of course I believed that you needed to have a MBR on the drive, so I ran `fdisk -iy sd3` to create the default OpenBSD `A6` meta partition. (I go the device name from doing `sysctl hw.disknames`).
+
+Then I created a new `i` parition: `disklabel -E sd3`, `a i`, `w`, `q`.
+
+Next, the file system: `newfs_msdos -F 32 /dev/sd3i`.
+
+This last command did't produce any output, it just quit after thirty seconds or so.
+From my experience, `newfs` can take time, so I wasn't concerned about the time it took, but there was a problem.
+After running `newfs` and running `disklabel -h sd3`, I saw that the `i` partition was gone.