BSD OS installation on logical MBR partitions or GPT partitions reddit / BSD ---------------------------------------------------------------------- Ji993 · 2018-11-25 00:47 Hello, I am trying to multiboot multiple different operating systems from 1 HDD. I am trying to install some combination of these operating systems: Windows 7,8.1,10, FreeBSD, OpenBSD, DragonflyBSD, some Linux distros. The bootloader used will be Grub2. The partitioning scheme can be either MBR or GPT. I don't think any other partitioning scheme is commonly supported by all these OSes. If I go the MBR route I am running out of primary partitions. But this might not be a problem if I am able to install all the BSDs on logical MBR partitions. The GPT route has no obvious limitations. All the OSes will have a separate GPT partition. But I'm not sure if all OSes support booting from GPT. I was able to multiboot the BSDs on primary MBR partitions. I haven't tested it on logical MBR partitions or GPT partitions. Has someone been able to successfully install and multiboot BSD OSes on logical MBR partitions or GPT partitions? ---------------------------------------------------------------------- dlangille · 2018-11-25 01:15 Try GPT ---------------------------------------------------------------------- Ranguvar · 2018-11-25 04:20 I can boot OpenBSD, Arch Linux, and Win10 off GPT+UEFI without issues on a Kaby Lake R laptop. ---------------------------------------------------------------------- Kernigh · 2018-11-25 07:27 GPT disks can't boot systems like FreeDOS that don't understand GPT. I guess that Windows 7 and recent BSDs and Linuxes can use GPT, but you should check. Also, GPT and MBR disks start in different video modes. A GPT disk gets an EFI boot and starts with the EFI graphical framebuffer. An MBR disk gets a BIOS boot and starts in VGA text mode (looking like DOS). One can see the difference by booting a system that doesn't change the video mode. The difference in OpenBSD is between [efifb(4)](https://man.openbsd.org/efifb) and [vga(4)](https://man.openbsd.org/vga). OpenBSD might be difficult. OpenBSD/amd64 installs a bootloader. When you upgrade OpenBSD through bsd.rd, it installs the bootloader again. You might get stuck with a disk that only boots OpenBSD, and might need to boot a different disk to reinstall Grub2. (If you have an MBR disk, it might boot the active partition instead of OpenBSD.) (I do wonder if one can ask bsd.rd for a shell, then `sed -i.orig 's/installboot -r/true/'` `install.md` before `./install` or `./upgrade`.) I believe that OpenBSD can boot from a GPT or extended MBR partition. The code in [src/sys/kern/subr\_disk.c](https://cvsweb.openbsd.org/cgi- bin/cvsweb/src/sys/kern/subr_disk.c?rev=1.234&content- type=text/x-cvsweb-markup) readdoslabel() looks like it would dig through DOSPTYP\_EXTENDL partitions to find OpenBSD's MBR partition. I wouldn't create extended partitions with OpenBSD's [fdisk(8)](https://man.openbsd.org/fdisk), because it has no obvious way to create them, but you can use fdisk(8) to change one partition's type to OpenBSD. OpenBSD's [disklabel(8)](https://man.openbsd.org/disklabel) will subdivide its (MBR or GPT) partition into multiple partitions. The default layout for larger disks has 10 partitions for /, swap, /tmp, /var, /usr, /usr/X11R6, /usr/local, /usr/src, /usr/obj, /home. OpenBSD can't see other MBR or GPT partitions (like DOS partitions) unless you add them to the disklabel. When you create the disklabel, it tries to add DOS, NTFS, and Linux partitions. A disklabel can only have 15 partitions. ---------------------------------------------------------------------- Ji993 · 2018-11-25 09:36 >When you upgrade OpenBSD through bsd.rd, it installs the bootloader again. It would be an interesting exercise to restore the Grub2 bootloader code on the disk. Maybe I can use Ubuntu Live + a grub.cfg file and do the restore. I will try. Thank you for the additional information as well. ---------------------------------------------------------------------- [deleted] · 2018-11-25 16:19 [removed]