After some more investigation and especially after stumbling upon a mail
from Otto Moerbeek from 2020, I found that the problem was a missing 'i'
partition in the disklabel.
installboot(8) needs the 'i' partition in the disklabel to find the EFI
partition, otherwise it will try to fall back to MBR.
After manually adding the 'i' partition, everything went find.

Here is the updated disklabel:
# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: KINGSTON SA400S3
duid: 09a9344c23abff6c
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 14593
total sectors: 234441648
boundstart: 1024
boundend: 234441615

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  a:        230692352             1024  4.2BSD   2048 16384 12960 # /
  b:          3748239        230693376    swap # none
  c:        234441648                0  unused
  i:              960               64   MSDOS


installboot(8) works as expected now:
# installboot -v sd0
Using / as root
installing bootstrap on /dev/rsd0c
using first-stage /usr/mdec/biosboot, second-stage /usr/mdec/boot
copying /usr/mdec/BOOTIA32.EFI to /tmp/installboot.AfBA3OfNsR/efi/BOOT/BOOTIA32.EFI copying /usr/mdec/BOOTX64.EFI to /tmp/installboot.AfBA3OfNsR/efi/BOOT/BOOTX64.EFI


Best regards,
Jona

On 16/07/2023 17:28, Jona Joachim wrote:
Hi,

I have trouble with installboot on a small embedded amd64 system.

I get the following error during sysupgrade and also when I run
installboot manually: installboot: no OpenBSD partition.

You can find the output of installboot, fdisk and disklabel below.
I also attached a full dmesg.


I initially installed with 7.2 and I just upgraded to 7.3. This should
be a GPT install but installboot seems to find an MBR, maybe this is the
source of the problem.

If possible, I would like to be able to fix this problem without
reinstalling the system.

Do you have some idea what's going on?

Best regards,

Jona


# installboot -v sd0 /usr/mdec/biosboot /usr/mdec/boot
Using / as root
installing bootstrap on /dev/rsd0c
using first-stage /usr/mdec/biosboot, second-stage /usr/mdec/boot
copying /usr/mdec/boot to //boot
looking for superblock at 65536
found valid ffs2 superblock
//boot is 6 blocks x 16384 bytes
fs block shift 2; part offset 1024; inode block 56, offset 2928
expecting 64-bit fs blocks (incr 4)
master boot record (MBR) at sector 0
        partition 0: type 0xEE offset 1 size 4294967295
installboot: no OpenBSD partition



# fdisk sd0

Disk: sd0       Usable LBA: 34 to 234441614 [234441648 Sectors]
   #: type                                 [       start: size ]
------------------------------------------------------------------------
   0: EFI Sys                              [          64: 960 ]
   1: OpenBSD                              [        1024: 234440591 ]


# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: KINGSTON SA400S3
duid: 09a9344c23abff6c
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 14593
total sectors: 234441648
boundstart: 1024
boundend: 234441615

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  a:        230692352             1024  4.2BSD   2048 16384 12960 # /
  b:          3748239        230693376    swap # none
  c:        234441648                0  unused

Reply via email to