Hi all,
I'm posting my question here because it seems like my problem is specific to FreeBSD. I have a Dell laptop with Windows installed. I have installed Arch Linux on another partition, and it successfully detects Windows and allows me to boot it from the GRUB menu. I have also installed FreeBSD, but GRUB will not detect that.
When I mount the FreeBSD partition in Linux,
. When I booted into this entry it told me that hd0 did not exist. I thought this would be the name, as I only have one drive. The names of the partitions are /dev/nvme0n1pX, which I assume is a Windows convention. I tried entering a GRUB shell as someone suggested on this forum, in order to figure out what the drive is called, to run
So, my problem is that I know where FreeBSD is installed, and I can get
As I said, I think this is a BSD issue, as GRUB was able to detect Windows, and I've always been able to pick up other Linux OSes before. If any other information or output would help with diagnosing this, please let me know.
Thanks
UPDATE:
When I mount the FreeBSD slice in Arch Linux, it now shows up for
This is copied from here: https://forums.freebsd.org/threads/cannot-boot-freebsd-with-grub.60952/
This entry shows up in the GRUB menu, but when I select it, it tells me
.
I have confirmed that (hd0,gpt10) is the correct partition. When I list it in the GRUB shell it shows a UFS filesystem.
When I compared this with the entry generated for Windows, I noticed that the entry for Windows says
This makes me think that the entry for BSD requires a path that GRUB can find to a FreeBSD EFI loader. Does that exist? Do I need to create one at installation?
Based on the information on UEFI here: https://wiki.freebsd.org/UEFI I have also tried copying boot1.efi from the FreeBSD /boot to the Linux /boot/EFI/Boot/ directory. I then changed the custom GRUB entry to read
When I booted it said
So it seems like the custom entry worked, but GRUB does not know how to find that file or boot the OS. I tried putting the file in /boot/EFI/GRUB/boot1.efi and editing 40_custom to reflect that, but I got the same results.
I've also noticed that when GRUB detects Windows it lists the partition it's located on as well as the filename of the EFI file, but for the "unknown Linux" entry it only lists the partition. I imagine the filesystem FreeBSD uses is partly responsible for this, but I'm not sure how to get around this problem.
I'm posting my question here because it seems like my problem is specific to FreeBSD. I have a Dell laptop with Windows installed. I have installed Arch Linux on another partition, and it successfully detects Windows and allows me to boot it from the GRUB menu. I have also installed FreeBSD, but GRUB will not detect that.
When I mount the FreeBSD partition in Linux,
os-prober
detects an "unknown Linux", but GRUB does not create an entry for it. I have tried creating a custom entry in GRUB, but it requires the line
Code:
set root=(hdX, Y)
find /boot/grub/stage1
, but the GRUB shell does not recognise find
as a command. This is an SSD, and there is only one, so I'm not sure what it would be called.So, my problem is that I know where FreeBSD is installed, and I can get
os-prober
to recognise it, but I can't get GRUB to detect it. I can make a custom entry, but I don't know what my SSD is called to the computer prior to booting.As I said, I think this is a BSD issue, as GRUB was able to detect Windows, and I've always been able to pick up other Linux OSes before. If any other information or output would help with diagnosing this, please let me know.
Thanks
UPDATE:
When I mount the FreeBSD slice in Arch Linux, it now shows up for
os-prober
and grub-mkconfig
, however GRUB will not write an entry for it. I have tried writing the following entry in /etc/grub.d/40_custom:
Code:
menuentry "FreeBSD" {
set root='(hd0,gpt10)'
insmod ufs2
kfreebsd /boot/loader
chainloader +1
}
This entry shows up in the GRUB menu, but when I select it, it tells me
Code:
Invalid EFI path
I have confirmed that (hd0,gpt10) is the correct partition. When I list it in the GRUB shell it shows a UFS filesystem.
When I compared this with the entry generated for Windows, I noticed that the entry for Windows says
Code:
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
Based on the information on UEFI here: https://wiki.freebsd.org/UEFI I have also tried copying boot1.efi from the FreeBSD /boot to the Linux /boot/EFI/Boot/ directory. I then changed the custom GRUB entry to read
Code:
chainloader /EFI/Boot/boot1.efi
Code:
Error: file '/EFI/Boot/boot1.efi' not found
I've also noticed that when GRUB detects Windows it lists the partition it's located on as well as the filename of the EFI file, but for the "unknown Linux" entry it only lists the partition. I imagine the filesystem FreeBSD uses is partly responsible for this, but I'm not sure how to get around this problem.