On Fri, Apr 03, 2020 at 07:11:12AM -0700, Justin Noor wrote:

> Hello OpenBSD Community,
> 
> Hope you all are staying safe during these crazy times.
> 
> I am looking for any feedback on an installation error that occurred using
> the custom-layout partition option across two SSDs.
> 
> ERROR:
> 
>   Installboot: no OpenBSD partition
>   Failed to install bootblocks.
>   You will not be able to boot OpenBSD from sd0
> 
> VERSION:
> 
>   OpenBSD 6.6 release/install66.fs media

I don't think so, the logs below shows you were using a snapshot, or
maybe a mixed install (boot from a snap install.fs, but install older
sets; don't do that).

That would be my bet. Since you neglected to show any more detailad
info like the way you partitioned or an install log it is impossible
to diagnose what is going on.

        -Otto


> 
> MACHINE ARCHITECTURE:
> 
>   amd64/AMD Ryzen 5 chipset
> 
> BACKGROUND:
> 
> The plan was to install OpenBSD 6.6 across two disks. Previously, these
> disks had FreeBSD-12.1-ZFS installed on them. Since the disks were new and
> had no data on them, other than the FreeBSD installation sets, I decided
> not to clean the boot code area with 'dd if=/dev/zero of=/dev/rsd0c bs=1
> count=1'.
> 
> INSTALLATION STEPS:
> 
>   1) Initialized disks for a GPT schema:
> 
>      # fdisk -iy -g -b 960 sd0
>      # fdisk -iy -g -b 960 sd1
> 
>   2) Entered the installer, choosing the custom-layout option for a whole
> disk GPT
>   3) Cleared the auto-generated partitions, and created all new partitions
> across sd0 and sd1
>   4) At the error installer dropped into a shell. At the shell, I entered
> reboot, and the machine booted.
>   5) Logged into the machine and ran the installboot command:
> 
>      $ doas installboot -nv sd0
> 
>      Output:
> 
>        Using / as root
>        would install bootstrap on /dev/rsd0c
>        using first-stage /usr/mdec/biosboot, second-stage /usr/mdec/boot
>        would copy /usr/mdec/boot to //boot
>        looking for superblock at 65536
>        bad superblock magic 0x0
>        lookign for superblock at 8192
>        found valid ffs1 superblock
>        //boot is 6 blocks x 16384 bytes
>        fs block shift 2; part offset 1024; inode block 24, offset 1704
>        expecting 32-bit fs blocks (incr 0)
>        master boot record (MBR) at secto 0
>                partition 0: type 0xEE offset 1 size 4294967295
>        installboot: no OpenBSD partition
> 
> KEY OBSERVATIONS:
> 
>   1) The error only occurs with the custom-layout option. When OpenBSD is
> installed on a single disk using the auto-layout option, the error does not
> occur
> 
>   2) The error says there is "no OpenBSD partition," but there is an
> OpenBSD partition.
> 
>       $ doas fdisk sd0
> 
>       Output:
> 
>        Disk: sd0  Usable LBA: 64 to 976772081 [976772081 Sectors]
>           #: type       [    start:    size ]
> 
> ------------------------------------------------------------------------------------
>           1: EFI Sys      [ 64:     960 ]
>           2: OpenBSD      [     1024:   976772081 ]
> 
>   3) The machine seems to boot and run fine.
> 
>      $ doas reboot
> 
>       Output:
> 
>       probing: pc0 mem[640K 63M 92M 16M 3308M 1M 42M 29171M]
>       disk: hd0 hd1
>       >> OpenBSD/amd64 BOOTX64 3.46
>       boot>
>       booting hd0a:/bsd: 12858696+2749448+326464+0+704512
> [806406+128+1021271]
> 
>   4) The system successfully updates to current - it generates the error -
> but it updates and reboots on its own.
> 
>   5) The 'installboot' command generates a "bad superblock magic 0x0" error
> 
> QUESTIONS:
> 
>   Why does the error say that there is no OpenBSD partition?
>   Why does the error only occur with the custom-layout option?
>   Should I have cleaned the boot-code region with dd if=/dev/zero
> of=/dev/rsd0c bs=1 count=1 before the installation?
>   Is the "bad superblock magic 0x0 error" related to pre-existing garabage
> in the boot-code region?

Reply via email to