Grub2Win set up great on my device. I am trying to boot to FreeBSD with it,
but I am having problems.
I have added the entry on the menu, but when run I get the error "grub did
not find a root partition with file /boot/bootloader".
And in fact this file bootloader is not there. I have been trying to figure
this out on my own for about 40 hours now so I thought I would ask for help.
It appears that FreeBSD isn't actually bundled with grub2win, right?
How can I add it? I have already downloaded several ISO and img files for
the FreeBSD program, but just cant figure out how to make Grub2Win to load
them.
Just wanted you to know that I did not just arbitrarily drop support of FreeBSD.
The GNU Grub entries required have changed considerably over the last couple of years and continue to change:
menuentry 'FreeBSD Two years ago ' --class freebsd --class icon-freebsd {
set rootfile=/boot/loader
getpartition file $rootfile root
kfreebsd $rootfile
}
This was something that Grub2Win could automatically generate.
menuentry 'FreeBSD Today ' --class freebsd --class icon-freebsd {
insmod zfs
set root='(hd0,gpt4)'
search --no-floppy --fs-uuid --set $UUID
kfreebsd /boot/kernel/kernel
kfreebsd_loadenv /boot/device.hints
kfreebsd_loadenv /boot/kernel/linker.hints
set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada0p4
set kFreeBSD.vfs.root.mountfrom.options=rw
set kFreeBSD.module_path="/boot/kernel;/boot/modules
}
Now the GNU Grub entry has become quite complex and obscure.
The setup seems to change every couple of months.
I feel bad for Dizzle. I did give him the current configuration so he could try custom code.
However, I don't think Grub2Win can support this any longer.
Contrast FreeBSD with the Windows entry, which is quite simple and hasn't changed a bit for many years.
menuentry 'The Windows EFI Boot Manager Five years ago ' --class windows --class icon-windows {
set efibootmgr=/efi/Microsoft/Boot/bootmgfw.efi
getpartition file $efibootmgr root
chainloader $efibootmgr
}
menuentry 'The Windows EFI Boot Manager Today ' --class windows --class icon-windows {
set efibootmgr=/efi/Microsoft/Boot/bootmgfw.efi
getpartition file $efibootmgr root
chainloader $efibootmgr
}
My three cents,
Dave
Last edit: Drummer 2019-08-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This may work for some EFI systems definitely not for BIOS systems though.
However, the FreeBSD installer likes to create its own EFI partition, separate from the Windows or Linux EFI partition and sometimes strangely formatted.
The location of the FreeBSD boot loader within this EFI partition is also not consistent. Often altered by the installation options the user enters.
Anyway, I hope this methodology works out for you.
Thanks,
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I haven't had much luck with FreeBSD over the last couple of years.
The boot code has become very complex and varies unpredictably.
For theses reasons, Grub2Win can no longer automatically generate FreeBSD boot code.
Please send me your Grub2Win diagnostics and a directory listing of your FreeBSD /boot directory and I'll see if I can help with some sort of manual configuration. I'm not optimistic.
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes its a BIOS machine, no uefi or secure boot. Again thank you Dave but I found another solution for the dual boot and am using BCD on this machine. Grub2Win works great for me on another machine helping prevent Windows taking over on a triple boot Linux/Windows/ChromeOS machine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Help with FreeBSD
Grub2Win set up great on my device. I am trying to boot to FreeBSD with it,
but I am having problems.
I have added the entry on the menu, but when run I get the error "grub did
not find a root partition with file /boot/bootloader".
And in fact this file bootloader is not there. I have been trying to figure
this out on my own for about 40 hours now so I thought I would ask for help.
It appears that FreeBSD isn't actually bundled with grub2win, right?
How can I add it? I have already downloaded several ISO and img files for
the FreeBSD program, but just cant figure out how to make Grub2Win to load
them.
Thanks for any help and your patience.
Hi Dizzle,
I'm sending you an email with some additional questions and info.
Dave
Hey Ed,
Just wanted you to know that I did not just arbitrarily drop support of FreeBSD.
The GNU Grub entries required have changed considerably over the last couple of years and continue to change:
menuentry 'FreeBSD Two years ago ' --class freebsd --class icon-freebsd {
set rootfile=/boot/loader
getpartition file $rootfile root
kfreebsd $rootfile
}
This was something that Grub2Win could automatically generate.
menuentry 'FreeBSD Today ' --class freebsd --class icon-freebsd {
insmod zfs
set root='(hd0,gpt4)'
search --no-floppy --fs-uuid --set $UUID
kfreebsd /boot/kernel/kernel
kfreebsd_loadenv /boot/device.hints
kfreebsd_loadenv /boot/kernel/linker.hints
set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada0p4
set kFreeBSD.vfs.root.mountfrom.options=rw
set kFreeBSD.module_path="/boot/kernel;/boot/modules
}
Now the GNU Grub entry has become quite complex and obscure.
The setup seems to change every couple of months.
I feel bad for Dizzle. I did give him the current configuration so he could try custom code.
However, I don't think Grub2Win can support this any longer.
Contrast FreeBSD with the Windows entry, which is quite simple and hasn't changed a bit for many years.
menuentry 'The Windows EFI Boot Manager Five years ago ' --class windows --class icon-windows {
set efibootmgr=/efi/Microsoft/Boot/bootmgfw.efi
getpartition file $efibootmgr root
chainloader $efibootmgr
}
menuentry 'The Windows EFI Boot Manager Today ' --class windows --class icon-windows {
set efibootmgr=/efi/Microsoft/Boot/bootmgfw.efi
getpartition file $efibootmgr root
chainloader $efibootmgr
}
My three cents,
Dave
Last edit: Drummer 2019-08-16
If your machine has EFI support you can simply chainload the EFI bootloader to boot FreeBSD.
menuentry 'FreeBSD' {
chainloader /boot/loader.efi
}
This does work and is rather simple. I'm not sure if this does work for machines without EFI though.
Hi MGP,
This may work for some EFI systems definitely not for BIOS systems though.
However, the FreeBSD installer likes to create its own EFI partition, separate from the Windows or Linux EFI partition and sometimes strangely formatted.
The location of the FreeBSD boot loader within this EFI partition is also not consistent. Often altered by the installation options the user enters.
Anyway, I hope this methodology works out for you.
Thanks,
Dave
Even though this is the old boot method, it still works for many people:
menuentry 'FreeBSD' {
kfreebsd /boot/loader
}
As far as I know, however, this method doesn't work for systems with EFI enabled.
Last edit: Matheus Garcia 2020-09-30
Can confirm
kfreebsd /boot/loader
still works for non-EFI hardware, as of FreeBSD 13. Only tested with ZFS, though.For EFI hardware,
chainloader /boot/loader.efi
still is the way to go.For EFI hardware:
For non-EFI hardware:
For EFI hardware + ZFS:
For non-EFI hardware + ZFS:
I tried this option:
set root=(hd0,3)
kfreebsd /boot/loader
boot
On my bios install of freeBSD 13.0 but it wouldn't boot from Grub2WIn. I got a message
"Couldn't boot FreeBSD, you have to load the kernel first."
That sounds like you need to turn off your machine's EFI's Secure Boot option.
Hi Simon,
I haven't had much luck with FreeBSD over the last couple of years.
The boot code has become very complex and varies unpredictably.
For theses reasons, Grub2Win can no longer automatically generate FreeBSD boot code.
Please send me your Grub2Win diagnostics and a directory listing of your FreeBSD /boot directory and I'll see if I can help with some sort of manual configuration. I'm not optimistic.
Dave
Thanks for your kind offer, I'll have a look and get back on here...
Hey Ed,
I believe Simon said this was a BIOS machine. There is no Secure Boot in BIOS machines.
Thanks again,
Dave
Yes its a BIOS machine, no uefi or secure boot. Again thank you Dave but I found another solution for the dual boot and am using BCD on this machine. Grub2Win works great for me on another machine helping prevent Windows taking over on a triple boot Linux/Windows/ChromeOS machine.
Hi Simon,
Cool. Glad that worked out for you.
Dave