Openbsd dualbooting
I'm fairly new to OpenBSD and am kind of a distrohopper so to speak. I really like OpenBSD but my one issue is that I can't find a better way to install then running a liveinstall of arch, creating an OpenBSD type partition, running OpenBSD install, and then installing to that partition. Is there a better way of doing this? I'm not familiar with fdisk and drive hardware enough to be able to use OpenBSDs implementation of fdisk in which you must create a partition based on blocks.
Posted Jan 7, 2020, 2:36 AM UTC
There's an fdisk(8) manual: https://man.openbsd.org/fdisk
It is easy to change a partition type (use
setpid), but hard to add partitions. This is because OpenBSD uses only one MBR or GPT partition, so there is no easy way to add more. If you want multiple operating systems to share this disk, I would install another OS first, and use the other OS to add an MBR or GPT partition for OpenBSD. If this partition has the wrong type, then OpenBSD fdisk(8) can change the type to OpenBSD.If you install OpenBSD first, then
reinit mbrorreinit gptthe disk, then shrink the OpenBSD partition. Useedit, keep the offset, set the size like50gfor 50 gigabytes, and let fdisk(8) calculate the number of blocks in that many gigs. Then useswapto move the OpenBSD partition to a higher slot.If you need to add a partition in OpenBSD fdisk(8), then calculate its new offset = last offset + last size. For example, if the last partition had offset 1024 size 104857600, then your new offset is 1024 + 104857600 = 104858624. The new size might be
50gif you have that much room, or*to use the rest of the disk. If you need to add an extended MBR partition, you must manually create the chain of nested MBRs.Thanks for the fdisk manpage. I knew where it was in actual openbsd but it's pretty annoying to read the manpages in shell when ur not in a terminal emulator IMO. Also thanks for the explanation about blocks.