Boot loader install to partion


#1

Not sure if it is ok to start a thread, I was asking a similiar question in a older thread. How do I install the boot loader on the partition rather than the MBR? Re-installing triple boot (2003r2 ,kali, TrueOS) on a bios machine. It was working, I decided to update to a SSD and changed the sata settings in bios from legacy to native. Windows works, Kali works, TrueOS installs, on reboot the boot-loader appears and list TrueOS as F4. Press F4 a “#” is displayed on the screen press any key get a “#”, do not press any key it prints “#” all by itself (no the keyboard is not the issue). If some one can assist in getting this to work I would appreciated it. I do not care if I use TrueOS boot-loader, Grub or anything for that matter. I use to be able to use the Acronis Boot selector but it cannot find the TrueOS install. Again if I put the old Hard drive in it all works flawlessly. I do not care if it is supported or not, just want it to work.


#2

windows native?

The FreeBSD bootloader still has some issues with UEFI on certain computers.

make sure “secure boot” is turned off.

Not sure past that


#3

More info is needed.

Post this about your installed TrueOS-Disk:

$ gpart show da0
=>        40  7814037088  da0  GPT  (3.6T)
          40      409600    1  efi  (200M)
      409640        2008       - free -  (1.0M)
      411648    33554432    2  freebsd-swap  (16G)
    33966080  7780069376    3  freebsd-zfs  (3.6T)
  7814035456        1672       - free -  (836K)

Before this is known, question is unanswerable.

Other details are needed, too. But start with this.
Insert Installer-USB/DVD, and use its command line interface to show Your previously installed TrueOS-Disk.

If I had to make a wild guess, I’d think it would be possible to start TrueOS via Linux-GrUB chainloading, but to be sure about that, info about Your configuration is missing.


#4


here it is


#5

This 2nd one is from the tri-boot that worked with the bigger drive.


#6

Thanks for the screen photos.

If I understand this correctly, You installed TrueOS on a non-ZFS filesystem (UFS/UFS2/FFS). Am I right? Please, confirm.

If I understand Your original post correctly, presently You can boot into none of Your 3 operating systems. Is this correct?

If You can’t boot into any of Your operating systems,
You should try to rewrite the Master Boot Record of ada0.

I would try this with all of Your operating systems while booting Your hardware from their rescue-ers/install-ers, one after the other. The order of doing this I recommend would be: TrueOS, Linux, Windows.

Let’s start with TrueOS:
TrueOS booting consists of three stages on MBR-disks.
Those are (re-)installable/initializable with:
“gpart bootcode …”.

Please, read “man gpart” and look for “boot” in there.
https://www.freebsd.org/cgi/man.cgi?query=gpart&manpath=FreeBSD+12-current

Afterwards, boot from installer, make sure Your root-filesytem from ada0 gets mounted somewhere, then do a change-root to this mountpoint. Afterwards enter “mount -a”. Now You can reinstall Your bootstrapping code again, using the software from Your ada0-TrueOS.

Your root filesystem is presumably “ada0s4a”.

Afterwards, reboot and check.


The same technique can be used with Linux to re-install GrUB, if necessary.


#7

Another thing You could try:

Boot any Linux-Installer, and try to chainload the first sector of the TrueOS-partition via GrUB command line. Maybe it will work.
Personally, I never tried it as yet. But it may be the quickest solution if it works to get Your installed TrueOS running. Don’t know. Try it.


#8

Shouldn’t the FreeBSD-partition be the “active” one, instead of the “NTFS”-partition?

I don’t know if TrueOS/FreeBSD doesn’t care about this, but normally this would be necessary, because the BIOS-firmware requires it for MBR-disk boot-partitions.

Problem is, last time I worked with BIOS/MBR Hardware was over 7 years ago. Since then I only used BIOS/MBR in Virtual Machines, and only if unavoidable. Since then, I only used GPT-partitioned disks, and no MBR-partitioned ones.

Edit: Addition
In “man gpart” we find:

The Master Boot Record (MBR) uses a 512-byte bootstrap code image, embed-
ded into the partition table’s metadata area. There are two variants of
this bootstrap code: /boot/mbr and /boot/boot0. /boot/mbr searches for a
partition with the active attribute (see the ATTRIBUTES section) in the
partition table. Then it runs next bootstrap stage. The /boot/boot0
image contains a boot manager with some additional interactive functions
for multi-booting from a user-selected partition.

Therfore, a clumsy solution could be:

Replace “boot0” by “mbr”. And change Your boot-target by setting the “active”-attribute of the OS-partition You want to boot into.

And I repeat: It’s clumsy. But according to man page, it should work.


#9

Thank you for your help, I haven’t been able to get back to it, my dog had puppies yesterday morning and it has taken all my time. I will get back to it on Tuesday. Thanks again.


#10

Maybe this helps, too:

EDIT: Information regarding BIOS/MBR/GRUB is scattered all around… Maybe this post will be useful if you really need to restamp TrueOSs GRUB after installing other OSes: