1811 pre-release out in the wild. Discussion


#41

I tried the following (under Antergos Linux) in /boot/grub/custom.cfg, but none of them works:

# Trident
menuentry "chainloader Trident @ (hd0,3)" {
   set root=(hd0,msdos3)
   chainloader +1
}
menuentry "chainloader Trident @ (hd0,c)" {
	root (hd0,c)
	kernel /boot/loader
}
menuentry "chainloader Trident @ (hd0,3)" {
   insmod zfs
   insmod bsd
   insmod chain
   set root=(hd0,3)
   chainloader +1
}
menuentry "kfreebsd /boot/loader Trident @ (hd0,3)" {
   set root=(hd0,3)
   kfreebsd /boot/loader
}
menuentry "kfreebsd /boot/loader Trident @ (hd0,3)" {
   insmod zfs
   insmod bsd
   set root=(hd0,3)
   kfreebsd /boot/loader
   kfreebsd_loadenv /boot/device.hints
   set kFreeBSD.vfs.root.mountfrom=zfs:/dev/ada0s3a
   set kFreeBSD.vfs.root.mountfrom.options=rw
}

#42

maybe someone else will chime in as well

this does not look right

Trident

menuentry “chainloader Trident @ (hd0,3)” {
set root=(hd0,msdos3) <------------------------------------
chainloader +1
}


#43

For a DOS PT it’s ok and does work for GhostBSD, but only with UFS.


#44

If you manually type the grub config in the grub bootloader command prompt, when you set the root, you should be able to list the files within the the root. Is it worth confirming this just to be sure the msdos3 partition is actually visible? Just a suggestion.


#45

Well I tried “hd2,msdos1” and “hd2,1” and both successfully booted GhostBSD. When using “hd0,msdos3” or “hd0,3”, a blinking cursor appeared and nothing else happened.


#46

grub> ls (hd0,msdos3)/

You can use the tab completion as you go.
This will let you check that the partition mappings are as you expect and give you the file listing on the partition ie that the expected files are there.


#47

An example from my Trident install.

SuperGrub2 Boot Trident

It’s for UEFI boot with GPT layout but the same methods can be used.

grub>boot
works.


#48

Well this is really weird! GRUB doesn’t recognize the Trident partition (hd0,3), “no known filesystem detected”. But I can successfullly import trident under Antergos and gparted shows that partition 3 is the correct one. Can someone explain this?


#49

Is (hd0,3) a EFI/UEFI partition, FreeBSD boot (MBR) or a ZFS partition? If ZFS, then I’d guess that the version of grub is not recognizing it.


#50

It’s an old BIOS PC and (hd0,3) is a ZFS partition.


#51

And now it’s getting even more weird :wink: I finally installed Trident on my second disk in (hd1,3). This is a HDD while my first one is a SSD. The FreeBSD boot loader was already installed on the HDD because of a former installation of GhostBSD. After the installation of Trident, a valid entry for Trident was added to the boot menu and I can boot it. Even more strange: Now the GRUB can also boot Trident by using (hd1,3) and chainloader.

My resume so far:

  1. I could never boot Trident if the wasn’t already a FreeBSD boot loader installed on the same disk. The one that was created during the Trident installation didn’t work.

  2. Neither the FreeBSD nor the GhostBSD installation created an entry for a Trident installed on the SSD. Both did create a valid entry when Trident was installed on the same HDD.

  3. The GRUB chainloader does work for the HDD but NOT for the SSD.

  4. I could import the Trident pool from the SSD using Antergos Linux (also on the SSD) but I could NOT import it using GhostBSD (on the HDD), it was invisible there.

This is all very confusing.

And now I have TWO pools called “trident”, one on the SSD and one on the HDD. Can I choose another name for one of them? I don’t know how to access the one on the SSD.


#52

hd1,3 and hd0,3 sound like they are different. if hd0,3 is a ZFS partition, then I’m guessing the version of grub you are using doesn’t understand it.
hd1,3, is it a freebsd-boot partition by any chance? If so, then I’m guessing that your grub understands that and chainloads gptzfsboot from it so it can boot the ZFS partition.

How to fix it? I have no clue; last time I multibooted a system with grub was around redhat 1.0.


#53

The (hd0,3) ZFS partition is identical to the ZFS on (hd1,3). They were both created using Trident-18.11-PRERELEASE_2-x64-20181130.iso. The only difference is: I did a trueos-update upgrade on(hd1,3) because I could boot it.

Strange enough, now this new trident pool gets imported:Bildschirmfoto_2018-12-08_18-24-55


#54

It might be that different grub versions having different modules loaded.

Are we looking at the right partition? Well normally I would look for matching UIIDS or sector start/ends not just for the filesystem type, order, or mapping. However the size matches up. So yes, I believe you have the right partition.

Your grub config does this:

insmod zfs

However on the command line, it would be worth making sure this module is loaded by grub to see if it can identify the zfs partition. You might also need:

insmod zfsinfo

It’s not an explanation just yet, but it might lead to something.


#55

to muddy this even further. I have been trying to get trident/trueos to play nice with refind. They do not

I have grabbed a version of 13-CURRENT, which I will install later.

It looks like the new freebsd loader is doing something wierd

will report back later


#56

There’s a surprise :wink:


#57

VBox and Bhyve support support EFI and are helpful testbeds for refind.

John
groenveld@acm.org