Unable to boot from internal hard disks on new PC

From: Johannes-Maria Kaltenbach <johannes-maria_at_t-online.de>
Date: Tue, 27 Dec 2022 11:08:00 UTC
Hello,

I can boot from usb-sticks, (after getting rid of this annoying
Secure Boot feature) but not from internal disks.

The PC was new, the disks 'empty' (no OS installed, just virgin disks).
With FreeBSD-13.1-RELEASE-amd64-memstick.img dd'd on a memory-stick
I formatted the disks (gpart, newfs/UFS) then installed the base
system of 13.1.
No problem with this.
But then I wanted to boot the new system and install further software
but the bios (or uefi) doesn't recognise the internal disks; only
boot device was the 13.1 install stick.
On my old PC I made a bootable stick an copied my old system to it;
this I could also boot without problems on the new PC. Bios sees both
stick, but no internal disk.
I repeated gpart/new/install several times with small variations
(with and without a freebsd-boot partition or efi partition) but
without success.

At the moment the partition is

ada0p1 freebsd-boot (512k)
ada0p2 efi (100m)
ada0p3 freebsd-swap (32g)
ada0p4 freebsd-ufs (200g, 13.1 base system)
(and further partitions for var, tmp, poudriere, home; still unused)

and I  tried the following

gpart bootcode -b /boot/pmbr ada0
gpart bootcode -p /boot/gptboot -i 1 ada0

newfs_msdos on ada0p2, mounted to mnt, create directories and copied
/boot/loader.efi to /mnt/efi/freebsd/loader.efi; also tried copying
/boot/boot1.efi to /mnt/efi/boot/.

Any help?

Best regards,
Johannes-Maria


P. S. In bios I found the following information

	Gigabyte(Tm)
	System B660 DS3H AX DDR4
	Biosversion F20, 25. Oct. 2022
	Bios-ID 8AADL080


Some additional infos to ada0 (don't know if it's of value):


/dev/ada0: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2),
    end-CHS (0x3ff,255,63), startsector 1, 4294967295 sectors


pass1: <WDC WD60EFAX-68JH4N1 83.00A83> ACS-3 ATA SATA 3.x device
pass1: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)

protocol              ACS-3 ATA SATA 3.x
device model          WDC WD60EFAX-68JH4N1
firmware revision     83.00A83
serial number         WD-WX22D412ZVUC
WWN                   50014ee2bed0b7af
additional product id
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 4096, offset 0
LBA supported         268435455 sectors
LBA48 supported       11721045168 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6
media RPM             5400
Zoned-Device Commands no

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes	yes
write cache                    yes	yes
flush cache                    yes	yes
Native Command Queuing (NCQ)   yes		32 tags
NCQ Priority Information       yes
NCQ Non-Data Command           no
NCQ Streaming                  no
Receive & Send FPDMA Queued    no
NCQ Autosense                  no
SMART                          yes	yes
security                       yes	no
power management               yes	yes
microcode download             yes	yes
advanced power management      no	no
automatic acoustic management  no	no
media status notification      no	no
power-up in Standby            no	no
write-read-verify              no	no
unload                         yes	yes
general purpose logging        yes	yes
free-fall                      no	no
sense data reporting           no	no
extended power conditions      no	no
device statistics notification no	no
Data Set Management (DSM/TRIM) yes
DSM - max 512byte blocks       yes              10
DSM - deterministic read       yes              zeroed
Trusted Computing              no
encrypts all user data         no
Sanitize                       no
Host Protected Area (HPA)      yes      no      11721045168/11721045168
HPA - Security                 yes      no
Accessible Max Address Config  no