I have a grub multiboot , Windows & 3 linuxes

Question what is the best way to install freebsd. Because the installer wants freebsd to be alone. As i use grub there is no need for a freebsd-boot-partition. Also for the ease of booting i want to use ufs and not zfs. It makes booting much easier. And ufs is a good filesystem.
I think unpacking the .tgz files manually could be an option. Feel free to tell me your ideas for my configuration.
 
I have a page that includes some stuff about booting FreeBSD from grub2. https://srobb.net/grub2.html UFS is fine, though patovm04 has a howto at https://forums.freebsd.org/threads/...gside-another-os-sharing-the-same-disk.75734/ sharing a drive with zfs. I've used it for both of my multiboot laptops, and I've forgotten how I installed FreeBSD to share with Linux previously. I *think* I booted into Linux and used fdisk to make a FreeBSD UFS partition and then, booted from the FreeBSD install USB and chose that partion to use for install. So, I think you can boot from the FreeBSD boot partition, but make sure you know all your Linux or Window partitions and can then choose, during the installation, to use that partition. Then when done, manually edit /boot/grub/grub.cfg, or wherever your distribution uses for grub.cfg and use those lines from my page. My page is a bit older, so also search for UEFI on the page, since at the time I wrote it, it had a separate section.
I hope this helps.


menuentry "FreeBSD" {
insmod ufs2
insmod part_gpt
set root=(hd0,4)
chainloader /boot/loader.efi
}

That was on a machine with Fedora's grub and I put it in boot/efi/EFI/fedora/custom.cfg, but I've usually put the custom.cfg in /boot/grub2 or similar. So many distributions seem to have different ways of doing it.
The FreeBSD partition was on partition 4
 
If you use legacy bios computer, you can use msdos or GPT partition table. With legacy bios computer, let linux´s grub handle boot. You need to add FreeBSD by hand to the linux´s grub by editing /etc/grub.d/40_custom file.

…. add entry (if FreeBSD is sda1)

sh:
menuentry "FreeBSD boot loader "{
set root="hd0,1"
kfreebsd /boot/loader
}

An another way to add FreeBSD to linux’s grub, is to use chainloader

… add a line


sh:
menuentry "FreeBSD chainloader" {
insmod ufs2
set root=(hd0,1)
chainloader +1
}

Update grub after editing

sh:
sudo update-grub

My partition schema in this computer:

 
I came across this while trying to triple boot Fedora 42, Win10, and freeBSD 15 on my laptop (my Thinkpad t495 shows high compatibility). I checked scottro link out but as he mentions, it refers to a very old version of linux, and that config does not work for me as of this date. Most of the configs I found online are from 2020 or earlier and none of them work so far :D The goal is to just use GRUB for now.
  1. I resized one of my partitions and was left with some empty space
  2. From the freeBSD 15 installer, I manually created a root partition (UFS since it seems easier for this test) and a swap partition. The install went well (after some annoying Realtek ethernet issues - WiFi didn't work due to firmware)
  3. On reboot, I went into Fedora and modifed the config at
    Code:
    /etc/grub.d/40_custom
  4. I added a config I found from various searches
    Code:
    menuentry "FreeBSD" {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt1'
        chainloader /EFI/FreeBSD/loader.efi
    }
  5. I then reloaded grub using
    Code:
    sudo grub2-mkconfig -o /boot/grub2/grub.cfg
  6. I verified that the loader.efi exists in the freebsd folder in
    Code:
    /boot/efi/EFI/
  7. Rebooted and saw the freeBSD entry in GRUB. Clicked it and..
Results:
It loaded the EFI but failed to load with multiple errors (attached poor quality screenshots). Switch to gpt7 (the UFS root partition), 'unknown kernel' error. Using 'insmod uf2' gives the "ufs2.mod" not found error.

Things I tried:
  • Different configs:
Code:
menuentry "FreeBSD" {
insmod ufs2
insmod part_gpt
set root=(hd0,7) #tried 1 as well and got EFI error
chainloader /boot/loader.efi
}

Code:
menuentry 'FreeBSD' {
insmod ufs2
set root='(hd0,gpt7)' #tried gpt1 as well and got EFI error
chainloader /boot/loader.efi
}

Code:
menuentry 'FreeBSD' {
  insmod part_gpt
  insmod chain
  set root='hd0,gpt7' #tried gpt1 as well and got EFI error
  chainloader ($root)/efi/boot/bootx64.efi
}

  • Deleted partitions and redid them, then reinstalled
  • Verified all EFI partition.. it seems like chainloader doesn't work or something
Anyone else in 2025 able to boot freeBSD with a Fedora installation using GRUB? Thanks!

Reference URLs:
Debian dual boot

PXL_20251209_224448915.jpg

PXL_20251209_222124769.jpg


EDIT: I was able to get it booted.. and promptly caused a kernel panic on reboot :D

the config I used:
Code:
menuentry "FreeBSD" {
        insmod ufs2
        insmod part_gpt
        set root=(hd0,7)
        chainloader /boot/loader.efi
}
 
I have had grub problems due to bios disk renumbering different on each boot.
Currently i use freebsd on a zfs-ssd but booting from a ufs-usb stick.
Works great.
 
I specify the UUIDs of the FreeBSD's root partitions in my 40_custom:

menuentry "FreeBSD 13" {
insmod part_gpt
insmod ufs2
search --no-floppy --fs-uuid 624ff8c1090d8148 --set root
chainloader /boot/loader_4th.efi
}

menuentry "FreeBSD 14" {
insmod part_gpt
insmod ufs2
search --no-floppy --fs-uuid 655f39a36a90cf42 --set root
chainloader /boot/loader_4th.efi
}

menuentry "FreeBSD 15" {
insmod part_gpt
insmod ufs2
search --no-floppy --fs-uuid 69356de6fbbe9c14 --set root
chainloader /boot/loader_4th.efi
}


Then I do # update-grub (my distro is Debian).
To get the UUIDs, run ls -lha /dev/disk/by-uuid
 
Thanks, I was able to get it booted into freeBSD after setting:
Code:
menuentry "FreeBSD" {
        insmod ufs2
        insmod part_gpt
        set root=(hd0,7)
        chainloader /boot/loader.efi
}

But now I am getting kernel panics from the atkbd driver, so I can't even get into the sytem anymore. I was going to try and downgrade to 14.3 (reinstall), but have seen some reports that Thinkpads have issues. I see the issue when booting from the USB stick, but the kernel continues to load past that Giant Lock and boots into the system, so IDK what is going on..
 
I see the issue when booting from the USB stick, but the kernel continues to load past that Giant Lock and boots into the system, so IDK what is going on..
When I had problems with a grub configuration in the past, I booted Super Grub, and took the generated menu entry as a draft (enter edit mode "e" to see the configuration).

Try first to boot with one of the offered menu entries (there should be multiple detected, from the ESP, from /boot ), see it the kernel panics still happen.

 
Back
Top