Skip to content

Instantly share code, notes, and snippets.

@kaworu
Created November 20, 2014 13:58
Show Gist options
  • Save kaworu/c39e16452a8dc3fe97a9 to your computer and use it in GitHub Desktop.
Save kaworu/c39e16452a8dc3fe97a9 to your computer and use it in GitHub Desktop.
(hd0) ./disk.img
(cd0) ./install56.iso
@kaworu
Copy link
Author

kaworu commented Nov 20, 2014

# grub-bhyve -m device.map -r hd0 -M 1024M openbsd0
grub> kopenbsd -h com0 (hd0,openbsd1)/bsd
grub> boot

@kaworu
Copy link
Author

kaworu commented Nov 20, 2014

# bhyve -c 2 -m 1024M -A -H -P -s 0:0,amd_hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0,mac=00:50:56:00:6d:cd -s 3:0,virtio-blk,./disk.img -l com1,stdio -W openbsd0

@kaworu
Copy link
Author

kaworu commented Nov 20, 2014

[ no symbol table formats found ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2014 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 5.6 (GENERIC.MP) #333: Fri Aug  8 00:20:21 MDT 2014
    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1056964608 (1008MB)                                          
avail mem = 1021001728 (973MB)
warning: no entropy supplied by boot loader
mpath0 at root                             
scsibus0 at mpath0: 256 targets
mainbus0 at root               
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf101f (10 entries)
bios0: vendor BHYVE version "1.00" date 03/14/2014       
acpi0 at bios0: rev 2                             
acpi0: sleep states S5
acpi0: tables DSDT APIC FACP HPET MCFG
acpi0: wakeup devices                 
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)       
cpu0: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 3400.04 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,CX8,APIC,SEP,PGE,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,PBE,SSE3,PCLMUL,DTES64,DS-CPL,SMX,SSSE3,CX16,xTPR,PCID,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,ITSC,FSGSBASE,ERMS
cpu0: 256KB 64b/line 8-way L2 cache                                                                         
cpu0: smt 0, core 0, package 0     
cpu0: apic clock running at 134MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 3399.61 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,CX8,APIC,SEP,PGE,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,PBE,SSE3,PCLMUL,DTES64,DS-CPL,SMX,SSSE3,CX16,xTPR,PCID,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,ITSC,FSGSBASE,ERMS
cpu1: 256KB 64b/line 8-way L2 cache                                                                         
cpu1: smt 0, core 0, package 1     
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins
acpihpet0 at acpi0: 10000000 Hz                               
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpiprt0 at acpi0: bus 0 (PC00)              
pci0 at mainbus0 bus 0         
0:0:0: bridge bus conflict 0-0
pchb0 at pci0 dev 0 function 0 vendor "AMD", unknown product 0x7432 rev 0x00
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00                 
virtio0 at pci0 dev 2 function 0 "Qumranet Virtio Network" rev 0x00: Virtio Network Device
vio0 at virtio0: address 00:50:56:00:6d:cd                                                
virtio0: msi                              
virtio1 at pci0 dev 3 function 0 "Qumranet Virtio Storage" rev 0x00: Virtio Block Device
vioblk0 at virtio1                                                                      
scsibus1 at vioblk0: 2 targets
sd0 at scsibus1 targ 0 lun 0: <VirtIO, Block Device, > SCSI3 0/direct fixed
sd0: 16384MB, 512 bytes/sector, 33554432 sectors                           
virtio1: msi                                    
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console                                          
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5                             
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
/dev/ksyms: Symbol table not valid.
vscsi0 at root                     
scsibus2 at vscsi0: 256 targets
softraid0 at root              
scsibus3 at softraid0: 256 targets
root device:                      

@kaworu
Copy link
Author

kaworu commented Nov 20, 2014

# cat /etc/mygate                                                              
178.63.43.193
# cat /etc/hostname.vio0                                                       
inet 178.63.43.247 255.255.255.192
!route add -inet 178.63.43.193/32 -link -iface $if
inet6 2a01:4f8:120:5388::b:1 64
# ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
        priority: 0
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
vio0: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:50:56:00:6d:cd
        priority: 0
        groups: egress
        media: Ethernet autoselect
        status: active
        inet 178.63.43.247 netmask 0xffffffc0 broadcast 178.63.43.255
        inet6 fe80::250:56ff:fe00:6dcd%vio0 prefixlen 64 scopeid 0x1
        inet6 2a01:4f8:120:5388::b:1 prefixlen 64
enc0: flags=20000<NOINET6>
        priority: 0
        groups: enc
        status: active
pflog0: flags=20141<UP,RUNNING,PROMISC,NOINET6> mtu 33144
        priority: 0
        groups: pflog
# netstat -rn                                                                  
Routing tables

Internet:
Destination        Gateway            Flags   Refs      Use   Mtu  Prio Iface
default            178.63.43.193      UGS        0        0     -     8 vio0 
127/8              127.0.0.1          UGRS       0        0 32768     8 lo0  
127.0.0.1          127.0.0.1          UH         1        0 32768     4 lo0  
178.63.43.192/26   link#1             UC         0        0     -     4 vio0 
178.63.43.193      76:69:6f:30:00:00  UHLS       1        0     -     8 vio0 
178.63.43.247      00:50:56:00:6d:cd  UHLl       0        0     -     1 lo0  
224/4              127.0.0.1          URS        0        0 32768     8 lo0  

Internet6:
Destination                        Gateway                        Flags   Refs      Use   Mtu  Prio Iface
::/104                             ::1                            UGRS       0        0 32768     8 lo0  
::/96                              ::1                            UGRS       0        0 32768     8 lo0  
::1                                ::1                            UH        14        0 32768     4 lo0  
::127.0.0.0/104                    ::1                            UGRS       0        0 32768     8 lo0  
::224.0.0.0/100                    ::1                            UGRS       0        0 32768     8 lo0  
::255.0.0.0/104                    ::1                            UGRS       0        0 32768     8 lo0  
::ffff:0.0.0.0/96                  ::1                            UGRS       0        0 32768     8 lo0  
2002::/24                          ::1                            UGRS       0        0 32768     8 lo0  
2002:7f00::/24                     ::1                            UGRS       0        0 32768     8 lo0  
2002:e000::/20                     ::1                            UGRS       0        0 32768     8 lo0  
2002:ff00::/24                     ::1                            UGRS       0        0 32768     8 lo0  
2a01:4f8:120:5388::/64             link#1                         UC         0        0     -     4 vio0 
2a01:4f8:120:5388::b:1             00:50:56:00:6d:cd              UHLl       0        0     -     1 lo0  
fe80::/10                          ::1                            UGRS       0        0 32768     8 lo0  
fe80::%vio0/64                     link#1                         UC         0        0     -     4 vio0 
fe80::250:56ff:fe00:6dcd%vio0      00:50:56:00:6d:cd              UHLl       0        0     -     1 lo0  
fe80::%lo0/64                      fe80::1%lo0                    U          0        0     -     4 lo0  
fe80::1%lo0                        fe80::1%lo0                    UHLl       0        0     -     1 lo0  
fec0::/10                          ::1                            UGRS       0        0 32768     8 lo0  
ff01::/16                          ::1                            UGRS       0        0 32768     8 lo0  
ff01::%vio0/32                     link#1                         UC         0        0     -     4 vio0 
ff01::%lo0/32                      fe80::1%lo0                    UC         0        0     -     4 lo0  
ff02::/16                          ::1                            UGRS       0        0 32768     8 lo0  
ff02::%vio0/32                     link#1                         UC         0        0     -     4 vio0 
ff02::%lo0/32                      fe80::1%lo0                    UC         0        0     -     4 lo0  
# 

@kaworu
Copy link
Author

kaworu commented Nov 20, 2014

# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
panic: smashed stack in ether_output
Stopped at      0xffffffff813466c9:     leave
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
IF RUNNING SMP, USE 'mach ddbcpu <#>' AND 'trace' ON OTHER PROCESSORS, TOO.
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!      
ddb{1}> trace
(null)() at 0xffffffff813466c9
(null)() at 0xffffffff811a39be
(null)() at 0xffffffff81195149
(null)() at 0xffffffff811f48a1
(null)() at 0xffffffff8124d3d4
(null)() at 0xffffffff8124dabd
(null)() at 0xffffffff811bd47a
(null)() at 0xffffffff811bfb89
(null)() at 0xffffffff811bfe52
(null)() at 0xffffffff81327177
end of kernel
end trace frame: 0x40, count: -10
ddb{1}> ps
   PID   PPID   PGRP    UID  S       FLAGS  WAIT          COMMAND
* 4180  11639   4180      0  7        0x33                ping
 11639      1  11639      0  3        0x8b  pause         ksh
  8190      1   8190      0  3        0x80  select        cron
 31711      1  31711     99  3        0x90  poll          sndiod
  4036   1237   1237     95  3        0x90  kqread        smtpd
 16177   1237   1237     95  3        0x90  kqread        smtpd
  1376   1237   1237     95  3        0x90  kqread        smtpd
   727   1237   1237     95  3        0x90  kqread        smtpd
 14880   1237   1237     95  3        0x90  kqread        smtpd
  6322   1237   1237    103  3        0x90  kqread        smtpd
  1237      1   1237      0  3        0x80  kqread        smtpd
 17686   5881   5881     74  3        0x90  bpf           pflogd
  5881      1   5881      0  3        0x80  netio         pflogd
  4706  28493  28493     73  3        0x90  poll          syslogd
 28493      1  28493      0  3        0x80  netio         syslogd
 26890      0      0      0  3     0x14200  aiodoned      aiodoned
 31028      0      0      0  3     0x14200  syncer        update
  2909      0      0      0  3     0x14200  cleaner       cleaner
  9680      0      0      0  3     0x14200  reaper        reaper
  6817      0      0      0  3     0x14200  pgdaemon      pagedaemon
 20268      0      0      0  3     0x14200  bored         crypto
  6230      0      0      0  3     0x14200  pftm          pfpurge
 10281      0      0      0  3  0x40014200  acpi0         acpi0
 31978      0      0      0  3  0x40014200                idle1
 15212      0      0      0  3     0x14200  bored         systqmp
 13901      0      0      0  3     0x14200  bored         systq
 11075      0      0      0  3     0x14200  bored         syswq
  1935      0      0      0  7  0x40014200                idle0
     1      0      1      0  3        0x82  wait          init 
     0     -1      0      0  3     0x10200  scheduler     swapper
ddb{1}> mach ddbcpu 0  
Stopped at      0xffffffff813466c9:     leave
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
IF RUNNING SMP, USE 'mach ddbcpu <#>' AND 'trace' ON OTHER PROCESSORS, TOO.
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb{0}> trace                                                        
(null)() at 0xffffffff813466c9
(null)() at 0xffffffff81344bc4
(null)() at 0xffffffff813296fb
end trace frame: 0x0, count: -3
ddb{0}> mach ddbcpu 1          
Stopped at      0xffffffff813466c9:     leave
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
IF RUNNING SMP, USE 'mach ddbcpu <#>' AND 'trace' ON OTHER PROCESSORS, TOO.
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!      
ddb{1}> trace                                                        
(null)() at 0xffffffff813466c9
(null)() at 0xffffffff811a39be
(null)() at 0xffffffff81195149
(null)() at 0xffffffff811f48a1
(null)() at 0xffffffff8124d3d4
(null)() at 0xffffffff8124dabd
(null)() at 0xffffffff811bd47a
(null)() at 0xffffffff811bfb89
(null)() at 0xffffffff811bfe52
(null)() at 0xffffffff81327177
end of kernel                 
end trace frame: 0x40, count: -10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment