Dual booting Linux and FreeBSD on a single drive

1. Create script, let's say a.sh with the following content:
Code:
declare -x PATH=$PATH:/sbin
update-grub

2. Change permissions:
chmod +x a.sh

3. open root terminal, and run this script:
./a.sh
 
and now what do i do ?

update-grub says: "Warning: os-prober will not be executed to detect other bootable partitions."

Is it normal ?
 
Hmm, no.
Normal output looks like this:
Code:
root@debian2:/home/lanin# ./a.sh
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.10.0-16-amd64
...
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Debian GNU/Linux 10 (buster) on /dev/sda6
Found FreeBSD 13.1-RELEASE-p1 on /dev/sdf4
Found FreeBSD 13.1-RELEASE-p1 on /dev/sdi2
Adding boot menu entry for EFI firmware configuration
done
 
1660746705965.png

Here is what it shows.
 
Hmm, no.
Normal output looks like this:
Code:
root@debian2:/home/lanin# ./a.sh
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.10.0-16-amd64
...
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Debian GNU/Linux 10 (buster) on /dev/sda6
Found FreeBSD 13.1-RELEASE-p1 on /dev/sdf4
Found FreeBSD 13.1-RELEASE-p1 on /dev/sdi2
Adding boot menu entry for EFI firmware configuration
done
Hmmmmm...... weird that not normal, So i don't know whats happening ? is FreeBSD installed the EFI file correctly ? FreeBSD failed at the end when i choosed the exit option.
 
Ok adding the #!/bin/bash line in the sh file fixes the declare not found issue. but GRUB still does not find FreeBSD.
 
cd to /sbin, edit update-grub (insert './' before grub-mkconfig'), and run ./update-grub from here
 
Can you put here text output (not images!) of ls -lha /dev/disk/by-uuid
and content of your 40_custom file ? May be 'typo' somewhere ?
 

adam@adam-HP-Notebook:~$ ls -lha /dev/disk/by-uuid
total 0
drwxr-xr-x 2 root root 140 août 17 15:36 .
drwxr-xr-x 8 root root 160 août 17 15:36 ..
lrwxrwxrwx 1 root root 9 août 17 15:36 2022-05-12-09-09-46-00 -> ../../sdb
lrwxrwxrwx 1 root root 10 août 17 15:36 2BE6-B6DD -> ../../sda1
lrwxrwxrwx 1 root root 10 août 17 15:36 62fcecf90e518464 -> ../../sda3
lrwxrwxrwx 1 root root 10 août 17 15:36 C501-10EF -> ../../sdb2
lrwxrwxrwx 1 root root 10 août 17 15:36 ea8a99d3-6971-47e8-8ae0-33e62122633a -> ../../sda2


Here is the 40_custom file:


#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "freebsd" {
insmod part_gpt
insmod ufs2
search --no-floppy --fs-uuid 62fcecf90e518464 --set root
chainloader /boot/loader_4th.efi }
 
Looks good. I'm out of ideas...
And what the output from ./a.sh
Does it run from root terminal ?

Transfer closing '}' on its own line.
 
Back
Top