I'm trying to build an OpenBSD image for deployment on GCE. Towards this
end I'm running a script on Debian which runs OpenBSD-snapshot in qemu. The
script worked a few times for 6.3 release and then failed once and worked
once when I set it to use a snapshot. I would've reproduced this under
OpenBSD had growisofs not complained about inability to allocate memory
(quick ulimit hacking didn't prove fruitful). The kernel panic is at the
very end.

$ git clone https://github.com/blackgnezdo/build.git
$ cd ./build/env/openbsd-amd64/
$ env MIRROR=cloudflare.cdn.openbsd.org bash ./make.bash
... works fine
$ env RELNO=64 VERSION=snapshots MIRROR=cloudflare.cdn.openbsd.org bash -x
./make.bash
% env RELNO=64 VERSION=snapshots MIRROR=cloudflare.cdn.openbsd.org bash -x
./make.bash
+ set -e
+ set -u
+ readonly VERSION=snapshots
+ VERSION=snapshots
+ readonly RELNO=64
+ RELNO=64
+ readonly ARCH=amd64
+ ARCH=amd64
+ readonly MIRROR=cloudflare.cdn.openbsd.org
+ MIRROR=cloudflare.cdn.openbsd.org
+ [[ amd64 != \a\m\d\6\4 ]]
+ readonly ISO=install64-amd64.iso
+ ISO=install64-amd64.iso
+ readonly ISO_PATCHED=install64-amd64-patched.iso
+ ISO_PATCHED=install64-amd64-patched.iso
+ [[ ! -f install64-amd64.iso ]]
+ curl -o install64-amd64.iso
https://cloudflare.cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/install64.iso
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
Current
                                 Dload  Upload   Total   Spent    Left
Speed
100  343M  100  343M    0     0  3825k      0  0:01:31  0:01:31 --:--:--
3922k
+ trap cleanup EXIT INT
+ mkdir -p etc
+ cat
+ cat
+ cat
+ chmod +x install.site
+ tar -zcvf site64.tgz install.site etc/installurl etc/rc.local
install.site
etc/installurl
etc/rc.local
+ cat
+ cat
+ echo 'set tty com0'
+ dd if=/dev/urandom of=random.seed bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB, 4.0 KiB) copied, 8.8445e-05 s, 46.3 MB/s
+ cp install64-amd64.iso install64-amd64-patched.iso
+ growisofs -M install64-amd64-patched.iso -l -R -graft-points
/snapshots/amd64/site64.tgz=site64.tgz /auto_install.conf=auto_install.conf
/disklabel.template=disklabel.template /etc/boot.conf=boot.conf
/etc/random.seed=random.seed
Executing 'genisoimage -C 16,175680 -M /dev/fd/3 -l -R -graft-points
/snapshots/amd64/site64.tgz=site64.tgz /auto_install.conf=auto_install.conf
/disklabel.template=disklabel.template /etc/boot.conf=boot.conf
/etc/random.seed=random.seed | builtin_dd of=install64-amd64-patched.iso
obs=32k seek=10980'
I: -input-charset not specified, using utf-8 (detected in locale settings)
Rock Ridge signatures found
Total translation table size: 0
Total rockridge attributes bytes: 3117
Total directory bytes: 12288
Path table size(bytes): 80
Max brk space used 0
175867 extents written (343 MB)
builtin_dd: 192*2KB out @ average infx1352KBps
install64-amd64-patched.iso: copying volume descriptor(s)
+ rm -f disk.raw
+ qemu-img create -f raw disk.raw 10G
Formatting 'disk.raw', fmt=raw size=10737418240
+ expect
spawn qemu-system-x86_64 -nographic -smp 2 -drive
if=virtio,file=disk.raw,format=raw -cdrom install64-amd64-patched.iso -net
nic,model=virtio -net user -boot once=d
>> OpenBSD/amd64 CDBOOT 3.40
boot>
booting cd0a:/6.4/amd64/bsd.rd: 3507018+1496064+3887944+0+593920
[371914+111+440232+292841]=0xa1c058
entry point at 0x1000158
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2018 OpenBSD. All rights reserved.
https://www.OpenBSD.org

OpenBSD 6.4-beta (RAMDISK_CD) #271: Sat Sep  1 22:29:29 MDT 2018
    [email protected]:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 117301248 (111MB)
avail mem = 110112768 (105MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf68c0 (10 entries)
bios0: vendor SeaBIOS version "1.10.2-1" date 04/01/2014
bios0: QEMU Standard PC (i440FX + PIIX, 1996)
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC HPET
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: QEMU Virtual CPU version 2.5+, 2695.97 MHz, 06-06-03
cpu0:
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,HV,NXE,LONG,LAHF,SVM
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
64b/line 16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: apic clock running at 1010MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu at acpi0 not configured
"ACPI0006" at acpi0 not configured
"PNP0B00" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"QEMU0002" at acpi0 not configured
"ACPI0010" at acpi0 not configured
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
"Intel 82371SB ISA" rev 0x00 at pci0 dev 1 function 0 not configured
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel
0 wired to compatibility, channel 1 wired to compatibility
pciide0: channel 0 disabled (no drives)
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 2.5+> ATAPI 5/cdrom
removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
"Intel 82371AB Power" rev 0x03 at pci0 dev 1 function 3 not configured
vga1 at pci0 dev 2 function 0 "Bochs VGA" rev 0x02
vga1: aperture needed
wsdisplay1 at vga1 mux 1: console (80x25, vt100 emulation)
virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio0: address 52:54:00:12:34:56
virtio0: msix shared
virtio1 at pci0 dev 4 function 0 "Qumranet Virtio Storage" rev 0x00
vioblk0 at virtio1
scsibus1 at vioblk0: 2 targets
sd0 at scsibus1 targ 0 lun 0: <VirtIO, Block Device, > SCSI3 0/direct fixed
sd0: 10240MB, 512 bytes/sector, 20971520 sectors
virtio1: msix shared
isa0 at mainbus0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay1
softraid0 at root
scsibus2 at softraid0: 256 targets
root on rd0a swap on rd0b dump on rd0b
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/amd64 6.4 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? s
# mount /dev/cd0c /mnt
# cp /mnt/auto_install.conf /mnt/disklabel.template /
# chmod a+r /disklabel.template
# umount /mnt
# exit
init: cannot stat /etc/login.conf: No such file or directory
erase ^?, werase ^W, kill ^U, intr ^C, status ^T

Welcome to the OpenBSD/amd64 6.4 installation program.
Starting non-interactive mode in 5 seconds...
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell?
Performing non-interactive install...
Terminal type? [vt220] vt220
System hostname? (short form, e.g. 'foo') buildlet

Available network interfaces are: vio0 vlan0.
Which network interface do you wish to configure? (or 'done') [vio0] vio0
IPv4 address for vio0? (or 'dhcp' or 'none') [dhcp] dhcp
IPv6 address for vio0? (or 'autoconf' or 'none') [none] none
Available network interfaces are: vio0 vlan0.
Which network interface do you wish to configure? (or 'done') [done] done
DNS domain name? (e.g. 'example.com') [my.domain] my.domain
Using DNS nameservers at 10.0.2.3

Password for root account? <provided>
Public ssh key for root account? [none] none
Start sshd(8) by default? [yes] yes
Do you expect to run the X Window System? [yes] no
Change the default console to com0? [yes] yes
Available speeds are: 9600 19200 38400 57600 115200.
Which speed should com0 use? (or 'done') [9600] 115200
Setup a user? (enter a lower-case loginname, or 'no') [no] gopher
Full name for user gopher? [gopher] Gopher Gopherson
Password for user gopher? <provided>
Public ssh key for user gopher [none] none
WARNING: root is targeted by password guessing attacks, pubkeys are safer.
Allow root ssh login? (yes, no, prohibit-password) [no] no
What timezone are you in? ('?' for list) [US/Pacific] US/Pacific

Available disks are: sd0.
Which disk is the root disk? ('?' for details) [sd0] sd0
No valid MBR or GPT.
Use (W)hole disk MBR, whole disk (G)PT or (E)dit? [whole] whole
Setting OpenBSD MBR partition to whole sd0...done.
URL to autopartitioning template for disklabel? [none]
file://disklabel.template
Fetching file://disklabel.template
/dev/rsd0a: 9008.0MB in 18448448 sectors of 512 bytes
45 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/sd0a (a99cc7c53e357bc3.a) on /mnt type ffs (rw, asynchronous, local)

Let's install the sets!
Location of sets? (cd0 disk http or 'done') [cd0] cd0
Pathname to the sets? (or 'done') [6.4/amd64] 6.4/amd64

Select sets by entering a set name, a file name pattern or 'all'. De-select
sets by prepending a '-', e.g.: '-game*'. Selected sets are labelled '[X]'.
    [X] bsd           [X] base64.tgz    [X] game64.tgz    [X] xfont64.tgz
    [X] bsd.mp        [X] comp64.tgz    [X] xbase64.tgz   [X] xserv64.tgz
    [X] bsd.rd        [X] man64.tgz     [X] xshare64.tgz
Set name(s)? (or 'abort' or 'done') [done] +* -x* -game* -man* done
Directory does not contain SHA256.sig. Continue without verification? [no]
yes
Installing bsd          100% |**************************| 14963 KB
00:04
Installing bsd.mp       100% |**************************| 15062 KB
00:03
Installing bsd.rd       100% |**************************|  9768 KB
00:00
wdc_atapi_start: not ready, st = 50
fatal protection fault in supervisor mode
trap type 4 code 0 rip ffffffff81006bc5 cs 8 rflags 282 cr2  276b2f000 cpl
6 rsp ffff8000039b9368
gsbase 0xffffffff8186fff0  kgsbase 0x0
panic: trap type 4, code=0, pc=ffffffff81006bc5
syncing disks... 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 giving up

dump to dev 17,1 not possible
rebooting...


-- 
nest.cx is Gmail hosted, use PGP for anything private. Key:
http://goo.gl/6dMsr
Fingerprint: 5E2B 2D0E 1E03 2046 BEC3  4D50 0B15 42BD 8DF5 A1B0

Reply via email to