My setup in Lenovo laptop, which has UEFI in use, and for that GPT partition table.
antiX Linux is controlling boot via efi partition /dev/sda3
FreeBSD was installed first, and it did not make efi partition, because in lenovo has hybrid BIOS, and I did not force to FreeBSD to use UEFI mode, so the installation has made in bios-mode (CMS).
For getting FreeBSD to boot in UEFI mode, I added it to antiX´s /etc/grub.d/40_custom file, and after that need to run sudo update-grub
For computer which has UEFI in use, /etc/grub.d/40_custom entry for FreeBSD goes the next way:
An example FreeBSD on partition /dev/sda2 as ada0p2
menuentry ' FreeBSD ' {
insmod ufs2
set root='(hd0,gpt2)'
chainloader /boot/loader.efi
}
================================================
In the FreeBSD I made an example how to make a failsafe xorg.conf file, if installed video driver not work and login window does not start, or no graphical desktop does not start.
Because I could not made the video via tty (command line), I made an examples via graphical desktop. Anyway .. the commands are the same.
At first need to know that which mode computer has booted. The next command tells
sysctl machdep.bootmethod
If answer is UEFI, then need to use scfb driver, else need to use vesa driver.
To make xorg.conf as root file goes
1. Run Xorg -configure
If xserver is actice, you get an error message, so you need to select an another X, etc.
Xorg :1 -configure
It makes a /root/xorg.conf.new file, so you need to edit that file first by replacing to the Device section´s driver from somedriver to scfb
If using legacy bios mode, then Device section´s driver from somedriver to vesa
2. Save the file and copy it as xorg.conf to /etc/X11
cp /root/xorg.conf.new /etc/X11/xorg.conf
You can check that the file is in /etc/X11
cat /etc/X11/xorg.conf
3. Reboot and see what happens