searching correct disk identifier for a 40_custom multiboot installation

Dear all

I have installed FreeBSD in MBR legacy mode using FreeBSD-11.1-RC2-amd64-memstick.img on second SATA hard disk of my new Udoox86 SBC.
I have correctly installed in MBR legacy mode also Debian 9.0.1 in M2 that is the first SSD hard disk with a separate GRUB and I have also installed, always in the second SATA hard disk, Slackware 14.2 and Ubuntu 17.04, always in legacy MBR mode.
I can boot in Debian, Slackware and Ubuntu either from Debian GRUB installed on M2 first hard disk, or in Ubuntu GRUB installed on SATA secondary hard disk.
Finally I have 3 OS regularly accessible from one of the 2 GRUB available (Debian on M2 and Ubuntu on SATA).

I have regularly boot from a USB stick with FreeBSD-11.1-RC2-amd64-memstick.img in a multiuser boot and regularly mounted /dev/ada1s1a disk and

I have created a /boot/loader.conf
with only this instruction (this was sufficient in an old FreeBSD 386 installation)
Code:
kern.vty=vt

then I have used this 40_custom but doesn'work

Code:
menuentry "FreeBSD" {
set root=(hd1,1)
insmod ufs2
kfreebsd /boot/loader
chainloader +1
}

Also this etc/grub.d/40_custom code that I have utilized doesn't work

Code:
menuentry "FreeBSD" {
set root='(hda1,1)'
chainloader +1
}

So I can't understand as identify the disk.

Code:
gpart show -p
identify the disk with this label

DISK-S21JNXAGC87803Ns1a freebsd-ufs
DISK-S21JNXAGC87803Ns1b freebsd-swap

Can you help me to obtain the correct code for 40_custom ?

Thanks in advance
 
From the handbook FAQ chapter 8 section 7
If I understood FreeBSD will be on the second hard drive
You will need to have the freebsd-boot partition in the first slice
How do I boot FreeBSD and Linux® using GRUB?


To boot FreeBSD using GRUB, add the following to either /boot/grub/menu.lst or /boot/grub/grub.conf, depending upon which is used by the Linux® distribution.
Code:
title FreeBSD 11.1
   root (hd0,b)
   kernel /boot/loader
Where hd0,b points to the root partition on the second disk. To specify the slice number, use something like this (hd0,2,b). By default, if the slice number is omitted, GRUB searches the first slice which has the a partition.
 
From the handbook FAQ chapter 8 section 7
If I understood FreeBSD will be on the second hard drive
You will need to have the freebsd-boot partition in the first slice

Dear monwarez excuse me for the delay in my answer but I wanted to understand well the situation before write to you.

This FreeBSD 11.1-RC2 has been installed on the second hard disk of my new Udoox86, a SATA SSD formatted in MBR. The FreeBSD installer don't allow me to create the freebsd-boot partition in the disk.

For experimentation, according to your suggestion, I have so created a GPT disk on a 64GB MicroSD and I have regularly created the freebsd-boot partition but I don't now the nomenclature of the MicroSD disk.

Coming back to the principal subject of my problem I want to say you that I have used this command after a boot from a FreeBSD 11.01-RC2 USB stick LiveCDROM and root login

<code>
boot0cfg -B ada1
</code>

in this way I have obtained to boot directly from secundary SATA disk with FreeBSD bootloader

But this command have overwritten the Ubuntu 17.04 GRUB installed on the same MBR SATA disk.
I have regenerated the Ubuntu GRUB and this have overwritten the freeBSD bootloader so I have reused the boo0cfg command to regenerate FreeBSD bootloader

Now I can boot all the OS because I boot FreeBSD with FreeBSD bootloader of the secundary MBR SATA disk, the Slackware 14.2 installed on the same disk from the Debian 9.0.1 GRUB installed on the primary M2 disk, the Ubuntu 17.04 installed on the secundary MBR SATA disk from the mentioned Debian 9.0.1 GRUB and the Debian from itself.
 
Back
Top