Re: i386 boot hangs: "init: can't open /dev/console: Device not configured"

2022-09-12 Thread Jonathan Gray
On Thu, Sep 01, 2022 at 04:26:18PM -0500, Scott Cheloha wrote:
> Hi,
> 
> mlarkin@ said someone needed to verify my i386/lapic.c changes on real
> hardware:
> 
> https://marc.info/?l=openbsd-tech=166186787532304=2
> 
> So, like a chucklehead, I thought "how hard could it be?" and tried
> installing OpenBSD/i386 to an external drive and booting my amd64
> laptop (Lenovo X1 Carbon 6th) from it.
> 
> The install -- booted from a USB-attached CD-ROM, installed to a USB-3
> external drive -- went fine.
> 
> When I tried to boot after installation, however, I hit a snag.
> init(8) hung the boot.  It kept printing:
> 
> init: can't open /dev/console: Device not configured
> init: can't open /dev/console: Device not configured
> init: can't open /dev/console: Device not configured
> 
> every fifteen or so seconds.  Keyboard was unresponsive.
> 
> A little searching led me to this reddit post from a few years ago:
> 
> https://reddit.com/r/openbsd/comments/8zganh/new_amd64_install_says_cant_open_devconsole/
> 
> A commenter on that post suggests that disabling 'inteldrm' and/or
> 'radeondrm' during boot from config(8) might do the trick.  It worked.
> With those drivers disabled, init(8) doesn't trip over /dev/console
> and the machine finishes booting, is stable, etc.  Obviously I don't
> have accelerated graphics, but the machine is otherwise perfectly
> usable from the console and vterms.
> 
> I have never seen this issue booting OpenBSD/amd64 on this (or any
> other) machine before.
> 
> I have attached both the amd64 dmesg and the i386 dmesg below.  Same
> machine, no changes to the BIOS between reboots.  They are booting
> from different disks: amd64 boots from the internal NVMe drive, i386
> boots from an external LaCiE drive over USB.
> 
> The issue persists on the i386 side even after installing all missing
> firmware.

The dmesg on i386 without inteldrm disabled likely has some hints
as to what is going on.

When the drm drivers fail to attach they try to detach and reprobe
vgafb/efifb.

Your amd64 dmesg is with efifb not vgafb.  You could try amd64
with csm/bios instead of efi to rule that out.

> 
> OpenBSD 7.2-beta (GENERIC.MP) #0: Tue Aug 30 20:15:55 CDT 2022
> s...@jetsam.attlocal.net:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 17018175488 (16229MB)
> avail mem = 16354238464 (15596MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xaa62d000 (63 entries)
> bios0: vendor LENOVO version "N23ET82W (1.57 )" date 07/21/2022
> bios0: LENOVO 20KHCTO1WW
> acpi0 at bios0: ACPI 5.0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT SSDT TPM2 UEFI SSDT SSDT HPET APIC MCFG ECDT 
> SSDT SSDT BOOT BATB SSDT SSDT SSDT LPIT WSMT SSDT SSDT SSDT DBGP DBG2 MSDM 
> DMAR NHLT ASF! FPDT UEFI
> acpi0: wakeup devices GLAN(S4) XHC_(S3) XDCI(S4) HDAS(S4) RP01(S4) PXSX(S4) 
> RP02(S4) PXSX(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) 
> PXSX(S4) RP07(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 2399 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz, 1795.82 MHz, 06-8e-0a
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
> cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 
> 64b/line 4-way L2 cache, 8MB 64b/line 16-way L3 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 24MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz, 1795.82 MHz, 06-8e-0a
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
> cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 
> 64b/line 4-way L2 cache, 8MB 64b/line 16-way L3 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 

Re: i386 boot hangs: "init: can't open /dev/console: Device not configured"

2022-09-12 Thread Scott Cheloha
On Thu, Sep 01, 2022 at 04:26:18PM -0500, Scott Cheloha wrote:
> Hi,
> 
> mlarkin@ said someone needed to verify my i386/lapic.c changes on real
> hardware:
> 
> https://marc.info/?l=openbsd-tech=166186787532304=2
> 
> So, like a chucklehead, I thought "how hard could it be?" and tried
> installing OpenBSD/i386 to an external drive and booting my amd64
> laptop (Lenovo X1 Carbon 6th) from it.
> 
> The install -- booted from a USB-attached CD-ROM, installed to a USB-3
> external drive -- went fine.
> 
> When I tried to boot after installation, however, I hit a snag.
> init(8) hung the boot.  It kept printing:
> 
> init: can't open /dev/console: Device not configured
> init: can't open /dev/console: Device not configured
> init: can't open /dev/console: Device not configured
> 
> every fifteen or so seconds.  Keyboard was unresponsive.
> 
> A little searching led me to this reddit post from a few years ago:
> 
> https://reddit.com/r/openbsd/comments/8zganh/new_amd64_install_says_cant_open_devconsole/
> 
> A commenter on that post suggests that disabling 'inteldrm' and/or
> 'radeondrm' during boot from config(8) might do the trick.  It worked.
> With those drivers disabled, init(8) doesn't trip over /dev/console
> and the machine finishes booting, is stable, etc.  Obviously I don't
> have accelerated graphics, but the machine is otherwise perfectly
> usable from the console and vterms.
> 
> I have never seen this issue booting OpenBSD/amd64 on this (or any
> other) machine before.
> 
> I have attached both the amd64 dmesg and the i386 dmesg below.  Same
> machine, no changes to the BIOS between reboots.  They are booting
> from different disks: amd64 boots from the internal NVMe drive, i386
> boots from an external LaCiE drive over USB.
> 
> The issue persists on the i386 side even after installing all missing
> firmware.

Ping.

> OpenBSD 7.2-beta (GENERIC.MP) #0: Tue Aug 30 20:15:55 CDT 2022
> s...@jetsam.attlocal.net:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 17018175488 (16229MB)
> avail mem = 16354238464 (15596MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xaa62d000 (63 entries)
> bios0: vendor LENOVO version "N23ET82W (1.57 )" date 07/21/2022
> bios0: LENOVO 20KHCTO1WW
> acpi0 at bios0: ACPI 5.0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT SSDT TPM2 UEFI SSDT SSDT HPET APIC MCFG ECDT 
> SSDT SSDT BOOT BATB SSDT SSDT SSDT LPIT WSMT SSDT SSDT SSDT DBGP DBG2 MSDM 
> DMAR NHLT ASF! FPDT UEFI
> acpi0: wakeup devices GLAN(S4) XHC_(S3) XDCI(S4) HDAS(S4) RP01(S4) PXSX(S4) 
> RP02(S4) PXSX(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) 
> PXSX(S4) RP07(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 2399 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz, 1795.82 MHz, 06-8e-0a
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
> cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 
> 64b/line 4-way L2 cache, 8MB 64b/line 16-way L3 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 24MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz, 1795.82 MHz, 06-8e-0a
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
> cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 
> 64b/line 4-way L2 cache, 8MB 64b/line 16-way L3 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz, 1795.82 MHz, 06-8e-0a
> cpu2: 
> 

i386 boot hangs: "init: can't open /dev/console: Device not configured"

2022-09-01 Thread Scott Cheloha
Hi,

mlarkin@ said someone needed to verify my i386/lapic.c changes on real
hardware:

https://marc.info/?l=openbsd-tech=166186787532304=2

So, like a chucklehead, I thought "how hard could it be?" and tried
installing OpenBSD/i386 to an external drive and booting my amd64
laptop (Lenovo X1 Carbon 6th) from it.

The install -- booted from a USB-attached CD-ROM, installed to a USB-3
external drive -- went fine.

When I tried to boot after installation, however, I hit a snag.
init(8) hung the boot.  It kept printing:

init: can't open /dev/console: Device not configured
init: can't open /dev/console: Device not configured
init: can't open /dev/console: Device not configured

every fifteen or so seconds.  Keyboard was unresponsive.

A little searching led me to this reddit post from a few years ago:

https://reddit.com/r/openbsd/comments/8zganh/new_amd64_install_says_cant_open_devconsole/

A commenter on that post suggests that disabling 'inteldrm' and/or
'radeondrm' during boot from config(8) might do the trick.  It worked.
With those drivers disabled, init(8) doesn't trip over /dev/console
and the machine finishes booting, is stable, etc.  Obviously I don't
have accelerated graphics, but the machine is otherwise perfectly
usable from the console and vterms.

I have never seen this issue booting OpenBSD/amd64 on this (or any
other) machine before.

I have attached both the amd64 dmesg and the i386 dmesg below.  Same
machine, no changes to the BIOS between reboots.  They are booting
from different disks: amd64 boots from the internal NVMe drive, i386
boots from an external LaCiE drive over USB.

The issue persists on the i386 side even after installing all missing
firmware.

OpenBSD 7.2-beta (GENERIC.MP) #0: Tue Aug 30 20:15:55 CDT 2022
s...@jetsam.attlocal.net:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17018175488 (16229MB)
avail mem = 16354238464 (15596MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xaa62d000 (63 entries)
bios0: vendor LENOVO version "N23ET82W (1.57 )" date 07/21/2022
bios0: LENOVO 20KHCTO1WW
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT SSDT TPM2 UEFI SSDT SSDT HPET APIC MCFG ECDT SSDT 
SSDT BOOT BATB SSDT SSDT SSDT LPIT WSMT SSDT SSDT SSDT DBGP DBG2 MSDM DMAR NHLT 
ASF! FPDT UEFI
acpi0: wakeup devices GLAN(S4) XHC_(S3) XDCI(S4) HDAS(S4) RP01(S4) PXSX(S4) 
RP02(S4) PXSX(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) 
PXSX(S4) RP07(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 2399 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz, 1795.82 MHz, 06-8e-0a
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 
4-way L2 cache, 8MB 64b/line 16-way L3 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz, 1795.82 MHz, 06-8e-0a
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 
4-way L2 cache, 8MB 64b/line 16-way L3 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz, 1795.82 MHz, 06-8e-0a
cpu2: