Skip to content

Instantly share code, notes, and snippets.

@reyk
Created July 6, 2017 19:32
Show Gist options
  • Save reyk/9bb09dc38b190b782953b286c5890e78 to your computer and use it in GitHub Desktop.
Save reyk/9bb09dc38b190b782953b286c5890e78 to your computer and use it in GitHub Desktop.
Self-installing VM: OpenBSD 6.1 with modified auto-installer (doesn't work yet, ec2-user is not accepted as user name)
Copyright (c) 1982, 1986, 1989, 1991, 199
The Regents of the University of California. All rights reserved
Copyright (c) 1995-2017 OpenBSD. All rights reserved. https://www.OpenBSD.org
OpenBSD 6.1 (RAMDISK_CD) #19: Sat Apr 1 13:49:18 MDT 2017
deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 1056964608 (1008MB)
avail mem = 1021235200 (973MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xeb01f (11 entries)
bios0: vendor Xen version "4.2.amazon" date 02/16/2017
bios0: Xen HVM domU
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC HPET WAET SSDT SSDT
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 11, 48 pins
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz, 2400.35 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,RDTSCP,LONG,LAHF,ABM,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 100MHz
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu at acpi0 not configured
"PNP0F13" at acpi0 not configured
"PNP0303" at acpi0 not configured
"PNP0700" at acpi0 not configured
"PNP0501" at acpi0 not configured
"ACPI0007" at acpi0 not configured
pvbus0 at mainbus0: Xen 4.2
xen0 at pvbus0: features 0x705, 32 grant table frames, event channel 3
xbf0 at xen0 backend 0 channel 5: disk
scsibus0 at xbf0: 2 targets
sd0 at scsibus0 targ 0 lun 0: <Xen, phy hda 768, 0000> SCSI3 0/direct fixed
sd0: 10240MB, 512 bytes/sector, 20971520 sectors
xnf0 at xen0 backend 0 channel 6: address 0a:8e:06:16:bc:52
"console" at xen0: device/console/0 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)
pciide0: channel 1 disabled (no drives)
"Intel 82371AB Power" rev 0x01 at pci0 dev 1 function 3 not configured
vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
vga1: aperture needed
wsdisplay1 at vga1 mux 1: console (80x25, vt100 emulation)
xspd0 at pci0 dev 3 function 0 "XenSource Platform Device" rev 0x01
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
scsibus1 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.1 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') openbsd
Available network interfaces are: xnf0 vlan0.
Which network interface do you wish to configure? (or 'done') [xnf0] xnf0
IPv4 address for xnf0? (or 'dhcp' or 'none') [dhcp] dhcp
IPv6 address for xnf0? (or 'rtsol' or 'none') [none] none
Available network interfaces are: xnf0 vlan0.
Which network interface do you wish to configure? (or 'done') [done] done
Using DNS domainname eu-west-1.compute.internal
Using DNS nameservers at 172.31.0.2
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] yes
Do you want the X Window System to be started by xenodm(1)? [no] 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] 9600
Setup a user? (enter a lower-case loginname, or 'no') [no] ec2-user
ec2-user is not a useable loginname.
Setup a user? (enter a lower-case loginname, or 'no') [no] no
Since no user was setup, root logins via sshd(8) might be useful.
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) [Europe/Dublin] UTC
Available disks are: sd0.
Which disk is the root disk? ('?' for details) [sd0] sd0
Disk: sd0 geometry: 1305/255/63 [20971520 Sectors]
Offset: 0 Signature: 0xAA55
Starting Ending LBA Info:
#: id C H S - C H S [ start: size ]
-------------------------------------------------------------------------------
0: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
*3: A6 0 2 3 - 1305 105 60 [ 128: 20971372 ] OpenBSD
Use (W)hole disk MBR, whole disk (G)PT, (O)penBSD area or (E)dit? [OpenBSD] Whole
Setting OpenBSD MBR partition to whole sd0...done.
URL to autopartitioning template for disklabel? [none] none
The auto-allocated layout for sd0 is:
# size offset fstype [fsize bsize cpg]
a: 233.4M 64 4.2BSD 2048 16384 1 # /
b: 386.9M 478112 swap
c: 10240.0M 0 unused
d: 365.5M 1270432 4.2BSD 2048 16384 1 # /tmp
e: 478.9M 2018912 4.2BSD 2048 16384 1 # /var
f: 1053.4M 2999744 4.2BSD 2048 16384 1 # /usr
g: 604.0M 5157152 4.2BSD 2048 16384 1 # /usr/X11R6
h: 2354.9M 6394240 4.2BSD 2048 16384 1 # /usr/local
i: 1085.4M 11216992 4.2BSD 2048 16384 1 # /usr/src
j: 1422.7M 13439808 4.2BSD 2048 16384 1 # /usr/obj
k: 2251.5M 16353568 4.2BSD 2048 16384 1 # /home
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] a
Rounding size to bsize (32 sectors): 478048
Rounding offset to bsize (32 sectors): 1270432
Rounding size to bsize (32 sectors): 748480
Rounding size to bsize (32 sectors): 980832
Rounding size to bsize (32 sectors): 2157408
Rounding size to bsize (32 sectors): 1237088
Rounding size to bsize (32 sectors): 4822752
Rounding size to bsize (32 sectors): 2222816
Rounding size to bsize (32 sectors): 2913760
Rounding size to bsize (32 sectors): 4611072
newfs: reduced number of fragments per cylinder group from 29872 to 29752 to enlarge last cylinder group
/dev/rsd0a: 233.4MB in 478048 sectors of 512 bytes
5 cylinder groups of 58.11MB, 3719 blocks, 7552 inodes each
/dev/rsd0k: 2251.5MB in 4611072 sectors of 512 bytes
12 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
newfs: reduced number of fragments per cylinder group from 46776 to 46592 to enlarge last cylinder group
/dev/rsd0d: 365.5MB in 748480 sectors of 512 bytes
5 cylinder groups of 91.00MB, 5824 blocks, 11648 inodes each
/dev/rsd0f: 1053.4MB in 2157408 sectors of 512 bytes
6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
newfs: reduced number of fragments per cylinder group from 77312 to 77008 to enlarge last cylinder group
/dev/rsd0g: 604.0MB in 1237088 sectors of 512 bytes
5 cylinder groups of 150.41MB, 9626 blocks, 19328 inodes each
/dev/rsd0h: 2354.9MB in 4822752 sectors of 512 bytes
12 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0j: 1422.7MB in 2913760 sectors of 512 bytes
8 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
/dev/rsd0i: 1085.4MB in 2222816 sectors of 512 bytes
6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
newfs: reduced number of fragments per cylinder group from 61296 to 61056 to enlarge last cylinder group
/dev/rsd0e: 478.9MB in 980832 sectors of 512 bytes
5 cylinder groups of 119.25MB, 7632 blocks, 15360 inodes each
/dev/sd0a (9ac43f2c1da49c04.a) on /mnt type ffs (rw, asynchronous, local)
/dev/sd0k (9ac43f2c1da49c04.k) on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0d (9ac43f2c1da49c04.d) on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0f (9ac43f2c1da49c04.f) on /mnt/usr type ffs (rw, asynchronous, local, nodev)
/dev/sd0g (9ac43f2c1da49c04.g) on /mnt/usr/X11R6 type ffs (rw, asynchronous, local, nodev)
/dev/sd0h (9ac43f2c1da49c04.h) on /mnt/usr/local type ffs (rw, asynchronous, local, nodev)
/dev/sd0j (9ac43f2c1da49c04.j) on /mnt/usr/obj type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0i (9ac43f2c1da49c04.i) on /mnt/usr/src type ffs (rw, asynchronous, local, nodev, nosuid)
/dev/sd0e (9ac43f2c1da49c04.e) on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid)
Let's install the sets!
Location of sets? (disk http or 'done') [http] http
HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] none
HTTP Server? (hostname, list#, 'done' or '?') mirrors.evowise.com
Server directory? [pub/OpenBSD/6.1/amd64] pub/OpenBSD/6.1/amd64
Select sets by entering a set name, a file name pattern or 'all'. De-select
sets by prepending a '-' to the set name, file name pattern or 'all'. Selected
sets are labelled '[X]'.
[X] bsd [X] base61.tgz [X] game61.tgz [X] xfont61.tgz
[X] bsd.rd [X] comp61.tgz [X] xbase61.tgz [X] xserv61.tgz
[ ] bsd.mp [X] man61.tgz [X] xshare61.tgz
Set name(s)? (or 'abort' or 'done') [done] *
[X] bsd [X] base61.tgz [X] game61.tgz [X] xfont61.tgz
[X] bsd.rd [X] comp61.tgz [X] xbase61.tgz [X] xserv61.tgz
[X] bsd.mp [X] man61.tgz [X] xshare61.tgz
Set name(s)? (or 'abort' or 'done') [done] done
Get/Verify SHA256.sig 100% |**************************| 2152 00:00
Signature Verified
Get/Verify bsd 100% |**************************| 10433 KB 00:05
Get/Verify bsd.rd 100% |**************************| 9210 KB 00:05
Get/Verify bsd.mp 100% |**************************| 10499 KB 00:05
Get/Verify base61.tgz 100% |**************************| 52322 KB 00:12
Get/Verify comp61.tgz 100% |**************************| 46070 KB 00:12
Get/Verify man61.tgz 100% |**************************| 8719 KB 00:05
Get/Verify game61.tgz 100% |**************************| 2707 KB 00:02
Get/Verify xbase61.tgz 100% |**************************| 17497 KB 00:07
Get/Verify xshare61.tgz 100% |**************************| 4406 KB 00:03
Get/Verify xfont61.tgz 100% |**************************| 39342 KB 00:11
Get/Verify xserv61.tgz 100% |**************************| 13001 KB 00:06
Installing bsd 100% |**************************| 10433 KB 00:00
Installing bsd.rd 100% |**************************| 9210 KB 00:00
Installing bsd.mp 100% |**************************| 10499 KB 00:00
Installing base61.tgz 100% |**************************| 52322 KB 00:05
Extracting etc.tgz 100% |**************************| 189 KB 00:00
Installing comp61.tgz 100% |**************************| 46070 KB 00:04
Installing man61.tgz 100% |**************************| 8719 KB 00:01
Installing game61.tgz 100% |**************************| 2707 KB 00:00
Installing xbase61.tgz 100% |**************************| 17497 KB 00:01
Extracting xetc.tgz 100% |**************************| 7006 00:00
Installing xshare61.tgz 100% |**************************| 4406 KB 00:01
Installing xfont61.tgz 100% |**************************| 39342 KB 00:03
Installing xserv61.tgz 100% |**************************| 13001 KB 00:01
Location of sets? (disk http or 'done') [done] done
Saving configuration files...done.
Making all device nodes...done.
Fetching EC2 init script
CONGRATULATIONS! Your OpenBSD install has been successfully completed!
To boot the new system, enter 'reboot' at the command prompt.
When you login to your new system the first time, please read your mail
using the 'mail' command.
syncing disks... done
rebooting...
\|/-\|/booting hd0a:/bsd: -\|/-6997072\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-+2221064\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/+260896-\|/-\|/-\|/-\|/+0+671744 [72+715512-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/+482706-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\]=0xad4b58
entry point at 0x1001000 [7205c766, 34000004, 24448b12, 81c0a304]
[ using 1198936 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2017 OpenBSD. All rights reserved. https://www.OpenBSD.org
OpenBSD 6.1 (GENERIC) #19: Sat Apr 1 13:42:46 MDT 2017
deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 1056964608 (1008MB)
avail mem = 1020383232 (973MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xeb01f (11 entries)
bios0: vendor Xen version "4.2.amazon" date 02/16/2017
bios0: Xen HVM domU
acpi0 at bios0: rev 2
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP APIC HPET WAET SSDT SSDT
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 11, 48 pins
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz, 2400.34 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,RDTSCP,LONG,LAHF,ABM,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
acpihpet0 at acpi0: 62500000 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: C1(@1 halt!)
"PNP0F13" at acpi0 not configured
"PNP0303" at acpi0 not configured
"PNP0700" at acpi0 not configured
"PNP0501" at acpi0 not configured
"ACPI0007" at acpi0 not configured
pvbus0 at mainbus0: Xen 4.2
xen0 at pvbus0: features 0x705, 32 grant table frames, event channel 3
xbf0 at xen0 backend 0 channel 5: disk
scsibus1 at xbf0: 2 targets
sd0 at scsibus1 targ 0 lun 0: <Xen, phy hda 768, 0000> SCSI3 0/direct fixed
sd0: 10240MB, 512 bytes/sector, 20971520 sectors
xnf0 at xen0 backend 0 channel 6: address 0a:8e:06:16:bc:52
"console" at xen0: device/console/0 not configured
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
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)
pciide0: channel 1 disabled (no drives)
piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x01: SMBus disabled
vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
xspd0 at pci0 dev 3 function 0 "XenSource Platform Device" rev 0x01
isa0 at pcib0
isadma0 at isa0
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: density unknown
fd1 at fdc0 drive 1: density unknown
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 wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (9ac43f2c1da49c04.a) swap on sd0b dump on sd0b
Automatic boot in progress: starting file system checks.
/dev/sd0a (9ac43f2c1da49c04.a): file system is clean; not checking
/dev/sd0k (9ac43f2c1da49c04.k): file system is clean; not checking
/dev/sd0d (9ac43f2c1da49c04.d): file system is clean; not checking
/dev/sd0f (9ac43f2c1da49c04.f): file system is clean; not checking
/dev/sd0g (9ac43f2c1da49c04.g): file system is clean; not checking
/dev/sd0h (9ac43f2c1da49c04.h): file system is clean; not checking
/dev/sd0j (9ac43f2c1da49c04.j): file system is clean; not checking
/dev/sd0i (9ac43f2c1da49c04.i): file system is clean; not checking
/dev/sd0e (9ac43f2c1da49c04.e): file system is clean; not checking
setting tty flags
pf enabled
machdep.allowaperture: 0 -> 2
starting network
DHCPREQUEST on xnf0 to 255.255.255.255
DHCPACK from 172.31.32.1 (0a:cf:95:b4:d0:47)
bound to 172.31.41.45 -- renewal in 1800 seconds.
/usr/local/libexec/ec2-init[125]: cannot create /home/ec2-user/.ssh/authorized_keys: No such file or directory
reordering libraries: done.
openssl: generating isakmpd/iked RSA keys... done.
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
starting early daemons: syslogd pflogd ntpd.
starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.
preserving editor files.
starting network daemons: sshd smtpd sndiod.
Path to firmware: http://firmware.openbsd.org/firmware/6.1/
No devices found which need firmware files to be downloaded.
starting local daemons: cron.
Thu Jul 6 19:23:43 UTC 2017
OpenBSD/amd64 (openbsd.eu-west-1.compute.internal) (tty00)
login:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment