My ESP is on
/dev/ada0p6 and mounted on
/boot/efi then I’ve copied EFI drivers
/boot/efi/efi/hbsd and I have HBSD installed on
boot1.efi are forwarded to TrueOS-STABLE as fallback, also
loader.efi doesn’t mount any partitions and always frozen inside single user.
Newnix has told to me in Telegram, which these EFI drivers are needed to be configured using EFI shells, to ask them to mount
/dev/ada0p1 for HBSD. How to do so and what other configs to do?
My ESP is on
Any tip in handbook? https://hardenedbsd.org/~shawn/hbsd_handbook/book.html
That handbook is useless to my issue, I mean all the BSD-based EFI drivers always show no UFS partitions, then I can never properly boot HBSD. Note that my
/boot/loader.rc are empty.
These guides are for NetBSD, but have a look and see if any of them can give you some hints.
I forgot this one…
If the HBSD installer is also being worked on, maybe it already supports something along the lines in the wiki article above
My own HBSD EFI config script below,
mkdir -pv /boot/efi
mount -t msdosfs /dev/ada0p6 /boot/efi
menu=Boot normally:rndseed /etc/entropy-file;boot ufs:ada0p1 menu=Boot single user:rndseed /etc/entropy-file;boot ufs:ada0p1 -s menu=Disable ACPI:rndseed /etc/entropy-file;boot ufs:ada0p1 -2 menu=Disable ACPI and SMP:rndseed /etc/entropy-file;boot ufs:ada0p1 -12 menu=Drop to boot prompt:prompt default=1 timeout=15 #HBSD installer at least times out 10 seconds clear=1
include /boot/loader.conf include /boot/loader.4th start
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 21 ada0
gpart set -a bootme -i 1 ada0
gpart set -a bootonce -i 1 ada0
Based on this from the original NetBSD script,
mount -t msdos /dev/wd0a /media
mkdir -p /media/EFI/boot
cp /usr/mdec/*.efi /media/EFI/boot
menu=Boot normally:rndseed /etc/entropy-file;boot hd0b:netbsd menu=Boot single user:rndseed /etc/entropy-file;boot hd0b:netbsd -s menu=Disable ACPI:rndseed /etc/entropy-file;boot hd0b:netbsd -2 menu=Disable ACPI and SMP:rndseed /etc/entropy-file;boot hd0b:netbsd -12 menu=Drop to boot prompt:prompt default=1 timeout=5 clear=1
installboot -v /dev/rwd0b /mnt/usr/mdec/bootxx_ffsv2
EFI/loader_4th.efi still probe no UFS partitions and always forward to TrueOS somewhy.
Useless to me where HBSD is FreeBSD-based instead of NetBSD. The
bsdinstall interfaces are totally different to any others.
Could rEFInd be a temporary solution for you?
See here for a walk through…
No but what I need is to make rEFInd to probe my UFS partitions using my drivers from https://efi.akeo.ie. And rEFInd is my long-term EFI manager, not temp.
/usr/sbin/efibootmgr /usr/sbin/efidp /usr/sbin/efivar /usr/sbin/uefisign
Which commands from these are needed to finish configuring my EFI drivers?
I’m now trying to config using
Sorry …no clue.
Just trying to give some ideas, never digged into this myself. I use Grub and it has always worked OOTB. As for NetBSD, my system is booting in legacy mode.
HBSD also has GRUB then I install and probe it,
sudo pkg install -y grub2-efi && sudo grub-install --efi-directory=/boot/efi --target=x86_64-efi --bootloader-id=hbsd --force && sudo grub-mkconfig -o /boot/grub/grub.cfg
HBSD GRUB has now been already present on my rEFInd but it reports kernel panic.!
For sure you know about https://groups.google.com/a/hardenedbsd.org/forum/m/#!forum/users
This has been solved using other EFI drivers, now the system boots normally to the multi-user session.
Out of curiosity… what drivers did you use?
loader_simple.efi, but needs to manually mount my root using any of
ufs:ada0p1, so Intel graphics driver still always doesn’t work.
Others just still forward to TrueOS.
Thanks for sharing!
You never know when/if needed
You could start by posting the grub.cfg entry for your HBSD system,
grub-install has never really worked with anything but Linux and Windows, and always required making a custom entry ;), which will vary depending on your partition layout, root file system, encryption, etc… non-encrypted ufs2 is usually easy to get booting with Grub or SysLinux on FreeBSD, hope this applies to HBSD too.
Also, gptboot(8) is meant for BIOS, not UEFI