Re: NAT for dual-WAN with public and private LAN

2018-02-19 Thread Martin Schröder
2018-02-17 15:08 GMT+01:00 miraculli . :
> I just got an second ADSL-uplink installed and now I try to reconfigure my
> pf.conf to load-balance NAT over both connections.

Just a reminder: NAT is not security and IPv6 should be the default.

https://youtu.be/v26BAlfWBm8

Best
Martin



Setting up IKEv2 IPSec connection to Algo VPN

2018-02-19 Thread Alec Newman
Hello,

I was experimenting with setting up a VPN server on AWS using Algo (
https://github.com/trailofbits/algo) that I'd like to connect to using an
OpenBSD laptop.

They don't explicitly provide an OpenBSD client configuration but from what
I can tell it should be doable with OpenBSD's built in tools.  It appears
to be IKEv2 so from what I can tell I just need the correct /etc/iked.conf
and copy the right keys/certificates into the right places in /etc/iked.

This is the StrongSwan config file provided for the client (VPN server's IP
address replaced with $REMOTEGW and username replaced with $USER).

conn ikev2-$REMOTEGW
fragmentation=yes
rekey=no
dpdaction=clear
keyexchange=ikev2
compress=no
dpddelay=35s

ike=aes128gcm16-prfsha512-ecp256!
esp=aes128gcm16-ecp256!

right=$REMOTEGW
rightid=$REMOTEGW
rightsubnet=0.0.0.0/0
rightauth=pubkey

leftsourceip=%config
leftauth=pubkey
leftcert=$USER.crt
leftfirewall=yes
left=%defaultroute

auto=add

I tried copying the certifcate produced by algo named $REMOTEGW.crt to
/etc/iked/pubkeys/ipv4/$REMOTEGW but when I restart iked with rcctl restart
iked I get "iked[37566]: set_policy: could not find pubkey for
/etc/iked/pubkeys/ipv4/$REMOTEGW" in /var/log/messages.  The certificate is
in the PEM format, which appears to be what is required, so I'm unsure what
problem iked is having.

Any insight or help would be appreciated.  I'd be happy to provide more
information if necessary.

Thanks,
Alec


Gtk-WARNING and cannot open display attempting to forward X

2018-02-19 Thread Ed Ahlsen-Girard
Since the snapshot of the 16th, I cannot run X apps from a W10 box with
PuTTY and mingw. No config changes to Windows, put X11Forwarding yes
back into sshd_config.dmesg and sshd_config below signature.

-- 

Edward Ahlsen-Girard
Ft Walton Beach, FL


#   $OpenBSD: sshd_config,v 1.102 2018/02/16 02:32:40 djm Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile  .ssh/authorized_keys

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
PasswordAuthentication no
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# override default of no subsystems
Subsystem   sftp/usr/libexec/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#   X11Forwarding no
#   AllowTcpForwarding no
#   PermitTTY no
#   ForceCommand cvs server
-
OpenBSD 6.2-current (GENERIC.MP) #8: Fri Feb 16 22:00:50 MST 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4176125952 (3982MB)
avail mem = 4042555392 (3855MB)
enter_shared_special_pages: entered idt page va 0x8001 pa 0x1d55000
enter_shared_special_pages: entered kutext page va 0x8183 pa 
0x183
enter_shared_special_pages: entered kutext page va 0x81831000 pa 
0x1831000
enter_shared_special_pages: entered kutext page va 0x81832000 pa 
0x1832000
enter_shared_special_pages: entered kudata page va 0x81ac8000 pa 
0x1ac8000
cpu_enter_pages: entered tss+gdt page at va 0x81a9c000 pa 0x1a9c000
cpu_enter_pages: entered t.stack page at va 0x81a9d000 pa 0x1a9d000
cpu_enter_pages: cif_tss.tss_rsp0 = 0x81a9d3e0
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xdbc40018 (36 entries)
bios0: vendor AMI version "80.06" date 04/01/2015
bios0: Hewlett-Packard 550-036
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT MSDM SSDT SSDT MCFG HPET SSDT SSDT DBGP
acpi0: wakeup devices PXSX(S4) RP01(S4) PXSX(S4) PXSX(S4) PXSX(S4) RP04(S4) 
PXSX(S4) PXSX(S4) RP06(S4) PXSX(S4) RP07(S4) PXSX(S4) GLAN(S4) EHC1(S3) 
EHC2(S3) XHC_(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
lapic_map: entered lapic page va 0x81ab1000 pa 0xfee0
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz, 3691.91 MHz
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,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
acpitimer0: recalibrated TSC frequency 3691448568 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE
cpu1 at mainbus0cpu_enter_pages: entered tss+gdt page at va 0x800021fff000 
pa 0

booting fedora 27 under vmm is somehow possible

2018-02-19 Thread Jiri B
Hi,

there are maybe some collegues at my work who maybe would be interested to try
running Fedora under vmm.

So I made following notes about how to boot Fedora 27 under VMM.
Although it does still take ages for Fedora to boot with networking enabled, 
wtf!

VMM output and Fedora 27 dmesg below.

IMO next steps - after Fedora is up - should be to disable cloud-init (as it 
would
timeout because it needs to get data via network), disable ipv6 and probably NTP
client/server as it takes ages to complete boot, probably modify grub2 with
'tsc=unstable'.

Jiri

- messages

Feb 20 23:27:20 t470s vmd[76516]: vcpu_process_com_data: guest reading com1 
when not ready
Feb 20 23:27:21 t470s last message repeated 2 times
Feb 20 23:27:22 t470s vmd[76516]: vioblk_notifyq: unsupported command 0x8
Feb 20 23:27:25 t470s last message repeated 4 times

- trying to mount_ext2fs partition from raw image via vnd0i.

Feb 20 23:26:58 t470s /bsd: ext2fs: unsupported incompat features 0x2c2

- steps

# cd /home
# ftp 
http://mirror.vutbr.cz/fedora/releases/27/CloudImages/x86_64/images/Fedora-Cloud-Base-27-1.6.x86_64.raw.xz
# xz -d -c /home/Fedora-Cloud-Base-27-1.6.x86_64.raw.xz > /home/fedora.raw

# mkdir cloud-init

# cat meta-data < user-data < /etc/sysctl.d/disableipv6.conf
* systemctl disable cloud-init 
* poweroff

# vmctl start "fedora" -d /home/fedora.raw -m 2G -c -L -i 1

- vmm boot & dmesg/systemd stuff

# vmctl start "fedora" -d /home/fedora.raw -m 2G -c -r /home/fedora-cidata.iso
vmctl: starting without network interfaces
Connected to /dev/ttyp2 (speed 115200)
Changing serial settings was 0/0 now 3/0
SeaBIOS (version 1.10.2p5-OpenBSD-vmm)
BUILD: gcc: (GCC) 4.2.1 20070719  binutils: 2.17
enabling shadow ram
Unable to unlock ram - bridge not found
RamSize: 0x8000 [cmos]
malloc preinit
malloc init
RamSizeOver4G: 0x [cmos]
init ivt
init bda
init bios32
init keyboard
init pic
math cp init
pci setup
=== PCI bus & bridge init ===
PCI: pci_bios_init_bus_rec bus = 0x0
=== PCI device probing ===
PCI probe
Found 5 PCI devices (max PCI bus is 00)
=== PCI new allocation pass #1 ===
PCI: check devices
=== PCI new allocation pass #2 ===
PCI: IO: 1000 - 4fff
PCI: 32: 8000 - fec0
PCI: map device bdf=00:01.0  bar 0, addr 1000, size 1000 [io]
PCI: map device bdf=00:02.0  bar 0, addr 2000, size 1000 [io]
PCI: map device bdf=00:03.0  bar 0, addr 3000, size 1000 [io]
PCI: map device bdf=00:04.0  bar 0, addr 4000, size 1000 [io]
PCI: init bdf=00:00.0 id=0b5d:0666
PCI: init bdf=00:01.0 id=1af4:1005
PCI: init bdf=00:02.0 id=1af4:1001
PCI: init bdf=00:03.0 id=1af4:1004
PCI: init bdf=00:04.0 id=0b5d:0777
PCI: No VGA devices found
No apic - only the main cpu is present.
init timer
Scan for VGA option rom
init virtio-blk
found virtio-blk at 00:02.0
pci dev 00:02.0 using legacy (0.9.5) virtio mode
virtio-blk 00:02.0 blksize=512 sectors=8388608
Registering bootable: Virtio disk PCI:00:02.0 (type:2 prio: data:f0a60)
init virtio-scsi
found virtio-scsi at 00:03.0
pci dev 00:03.0 using legacy (0.9.5) virtio mode
virtio-scsi vendor='OpenBSD' product='VMM CD-ROM' rev='001' type=5 removable=1
Registering bootable: DVD/CD [virtio-scsi Drive OpenBSD VMM CD-ROM 001] (type:3 
prio: data:f0a20)
init serial
Found 1 serial ports
Scan for option roms
Registering bootable: Legacy option rom (type:129 prio: data:bf03)
Searching bootorder for: HALT
Mapping hd drive 0x000f0a60 to 0
drive 0x000f0a60: PCHS=0/0/0 translation=lba LCHS=522/255/63 s=8388608
Mapping cd drive 0x000f0a20
Running option rom at bf00:0003

Google, Inc.
Serial Graphics Adapter 11/27/17
SGABIOS 20100422 (_) Mon Nov 27 22:20:55 UTC 2017
Term: 0x87
4 0
malloc finalize
Space available for UMB: c-ee800, f-f09f0
Returned 245760 bytes of ZoneHigh
e820 map has 6 items:
  0:  - 0009f800 = 1 RAM
  1: 0009f800 - 000a = 2 RESERVED
  2: 000f - 0010 = 2 RESERVED
  3: 0010 - 7fffc000 = 1 RAM
  4: 7fffc000 - 8000 = 2 RESERVED
  5: fffc - 0001 = 2 RESERVED
locking shadow ram
Unable to lock ram - bridge not found
Jump to int19
enter handle_19:
  NULL
BBttiinngg  ffrroomm  HHaarrdd  DDiisskk..

Booting from :7c00
.
Use the ^ and v keys to change the selection.
...
  Fedora (4.13.9-300.fc27.x86_64) 27 (Cloud Edition)

   The selected entry will be started automatically in 1s.
   The selected entry will be started automatically in 0s.
...
unimplemented handle_15XX:330:

   a=ec00  b=0002  c=  d= ds=9000 es=9000 ss=9000
  si= di= bp= sp=8f70 cs=9000 ip=02fc  f=0003
unimplemented handle_16XX:224:
   a=0305  b=  c=  d= ds=9000 es=9000 ss=9000
  si= di= bp= sp=8f70 cs=9000 ip=02fc  f=0003
unimplemented handle_15XX:330:
   a=e980  b=  c=  d=4753494

Re: noob question: driver separation?

2018-02-19 Thread Otto Moerbeek
On Mon, Feb 19, 2018 at 09:19:27PM +0100, Hess THR wrote:

> I mean.. did it ever happened in the history that a microphone driver sent 
> its data via the network? 
> 
> if these attacks aren't very likely, then I was just loudly thinking..
> 
> wouldn't it be great to held some idea day for: "how to increase security? "
> 
> there would be ex.: 500 idiot ideas, but maybe 1 great, who knows. 

This is not a new idea and has been applied in microkernel systems.
These systems are very different from our kernel architecture, though.

-Otto



Re: noob question: driver separation?

2018-02-19 Thread Hess THR
I mean.. did it ever happened in the history that a microphone driver sent its 
data via the network? 

if these attacks aren't very likely, then I was just loudly thinking..

wouldn't it be great to held some idea day for: "how to increase security? "

there would be ex.: 500 idiot ideas, but maybe 1 great, who knows. 



> Sent: Monday, February 19, 2018 at 8:58 PM
> From: "Hess THR" 
> To: misc@OpenBSD.org
> Subject: Re: noob question: driver separation?
>
> Hello, 
> 
> nono, just in theory.. or it doesn't worth it? 
> 
> 
> > Sent: Monday, February 19, 2018 at 11:05 AM
> > From: "Boudewijn Dijkstra" 
> > To: misc@openbsd.org
> > Subject: Re: noob question: driver separation?
> >
> > Op Fri, 16 Feb 2018 21:51:12 +0100 schreef Hess THR  
> > :
> > > Hello,
> > >
> > > are there any (at least on plan or theoretical level) that drivers will  
> > > be/are/would be separated? ex.:
> > >
> > > - touchpad drivers shouldn't have to do anything with network access
> > > - wireless drivers shouldn't be able to touch anything from ex.: /home
> > > - graphics/wireless/sound/disk/etc. drivers shouldn't be able to get  
> > > anything from keyboards
> > > - and so on.
> > >
> > > or is this only a dream or bad concept that separation needed "inside  
> > > kernel level"?
> > 
> > Why do you think it is needed?  Did you see any dubious or sketchy OpenBSD  
> > driver code?
> > 
> > 
> > 
> > -- 
> > Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
> > 
> > 
> 
> 



Re: vmctl status shows vm as stopped although running

2018-02-19 Thread Robert Paschedag

On 02/19/18 20:22, Mike Larkin wrote:

On Mon, Feb 19, 2018 at 11:21:09AM -0800, Mike Larkin wrote:

On Mon, Feb 19, 2018 at 11:12:52AM -0800, Mike Larkin wrote:

On Mon, Feb 19, 2018 at 02:40:47PM +0100, Robert Paschedag wrote:

Hi misc,

I am running STABLE and just started testing running debian within vmd and
this works quite well right now.

Now I noticed, that vmctl status shows the vm as STOPPED, although it is
running.

I can connect to the console without problems. Is this status showing some
"other" status?

Thanks.
Robert



An OS can spent a large amount of time "doing nothing" - eg, in it's idle loop.



What horrible English. This was written before coffee. "spend" and "its" are, of
course, what I meant to type there.


gotta love Mondays when your correction itself is wrong. time for coffee.





What you are seeing is that your guest OS has executed a HLT instruction (likely
in that idle loop) and thus, vmd is not running at that precise instant in time
when you ran the command, because there is nothing to do.

I bet if you ran something that consumed guest CPU, and ran the same command,
you'd see something else.

-ml



Hi Mike,

thanks. It's exactly how to told me. So the "status" is just showing the 
current state of the guest CPUs.


I expected the "status" to show, if this specific vm is "powered on" or 
not, in case you have several vms defined.


But ok...now I know, what "status" shows me, I'm happy.

Robert



pasche@tux2:~$ vmctl status
ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
 1 10854 12.0G217M   ttyp2   pasche debian
pasche@tux2:~$ vmctl status 1
ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
 1 10854 12.0G217M   ttyp2   pasche debian
  VCPU:  0 STATE: STOPPED
pasche@tux2:~$ ps aux | grep vmd
_vmd 41407  0.0  0.0  1188  1756 ??  Ssp2:16PM0:00.01 vmd: vmm
(vmd)
root 79080  0.0  0.0  1112  1640 ??  Is 2:16PM0:00.01 vmd: priv
(vmd)
_vmd 51293  0.0  0.0  1184  1732 ??  Ssp2:16PM0:00.01 vmd:
control (vmd)
root 82177  0.0  0.0  1364  1672 ??  Ssp2:16PM0:00.01
/usr/sbin/vmd
_vmd 10854  0.0  0.4 2099748 64808 ??  Ip 2:16PM0:20.73 vmd:
debian (vmd)
pasche   24262  0.0  0.0   132   328 p1  R+/1   2:39PM0:00.00 grep vmd
pasche@tux2:~$ vmctl console 1
Connected to /dev/ttyp2 (speed 115200)

Debian GNU/Linux 9 debian-vm ttyS0

debian-vm login:
[EOT]
pasche@tux2:~$


OpenBSD 6.2 (GENERIC.MP) #5: Fri Feb  2 23:02:19 CET 2018

r...@syspatch-62-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16708087808 (15934MB)
avail mem = 16194699264 (15444MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9d000 (68 entries)
bios0: vendor LENOVO version "HEET34WW (1.15 )" date 07/02/2013
bios0: LENOVO 68852HG
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT SSDT ASF! HPET APIC MCFG FPDT SSDT SSDT UEFI
UEFI POAT UEFI DBG2
acpi0: wakeup devices P0P1(S4) EHC1(S3) EHC2(S3) XHC_(S3) HDEF(S3) PXSX(S4)
RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4)
RP05(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.51 MHz
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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 2594510480 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
cpu2: 
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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mai

Re: noob question: driver separation?

2018-02-19 Thread Hess THR
Hello, 

nono, just in theory.. or it doesn't worth it? 


> Sent: Monday, February 19, 2018 at 11:05 AM
> From: "Boudewijn Dijkstra" 
> To: misc@openbsd.org
> Subject: Re: noob question: driver separation?
>
> Op Fri, 16 Feb 2018 21:51:12 +0100 schreef Hess THR  
> :
> > Hello,
> >
> > are there any (at least on plan or theoretical level) that drivers will  
> > be/are/would be separated? ex.:
> >
> > - touchpad drivers shouldn't have to do anything with network access
> > - wireless drivers shouldn't be able to touch anything from ex.: /home
> > - graphics/wireless/sound/disk/etc. drivers shouldn't be able to get  
> > anything from keyboards
> > - and so on.
> >
> > or is this only a dream or bad concept that separation needed "inside  
> > kernel level"?
> 
> Why do you think it is needed?  Did you see any dubious or sketchy OpenBSD  
> driver code?
> 
> 
> 
> -- 
> Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
> 
> 



Re: vmctl status shows vm as stopped although running

2018-02-19 Thread Mike Larkin
On Mon, Feb 19, 2018 at 11:21:09AM -0800, Mike Larkin wrote:
> On Mon, Feb 19, 2018 at 11:12:52AM -0800, Mike Larkin wrote:
> > On Mon, Feb 19, 2018 at 02:40:47PM +0100, Robert Paschedag wrote:
> > > Hi misc,
> > > 
> > > I am running STABLE and just started testing running debian within vmd and
> > > this works quite well right now.
> > > 
> > > Now I noticed, that vmctl status shows the vm as STOPPED, although it is
> > > running.
> > > 
> > > I can connect to the console without problems. Is this status showing some
> > > "other" status?
> > > 
> > > Thanks.
> > > Robert
> > > 
> > 
> > An OS can spent a large amount of time "doing nothing" - eg, in it's idle 
> > loop.
> > 
> 
> What horrible English. This was written before coffee. "spend" and "its" are, 
> of
> course, what I meant to type there.

gotta love Mondays when your correction itself is wrong. time for coffee.


> 
> > What you are seeing is that your guest OS has executed a HLT instruction 
> > (likely
> > in that idle loop) and thus, vmd is not running at that precise instant in 
> > time
> > when you ran the command, because there is nothing to do.
> > 
> > I bet if you ran something that consumed guest CPU, and ran the same 
> > command,
> > you'd see something else.
> > 
> > -ml
> > 
> > > pasche@tux2:~$ vmctl status
> > >ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
> > > 1 10854 12.0G217M   ttyp2   pasche debian
> > > pasche@tux2:~$ vmctl status 1
> > >ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
> > > 1 10854 12.0G217M   ttyp2   pasche debian
> > >  VCPU:  0 STATE: STOPPED
> > > pasche@tux2:~$ ps aux | grep vmd
> > > _vmd 41407  0.0  0.0  1188  1756 ??  Ssp2:16PM0:00.01 vmd: vmm
> > > (vmd)
> > > root 79080  0.0  0.0  1112  1640 ??  Is 2:16PM0:00.01 vmd: 
> > > priv
> > > (vmd)
> > > _vmd 51293  0.0  0.0  1184  1732 ??  Ssp2:16PM0:00.01 vmd:
> > > control (vmd)
> > > root 82177  0.0  0.0  1364  1672 ??  Ssp2:16PM0:00.01
> > > /usr/sbin/vmd
> > > _vmd 10854  0.0  0.4 2099748 64808 ??  Ip 2:16PM0:20.73 vmd:
> > > debian (vmd)
> > > pasche   24262  0.0  0.0   132   328 p1  R+/1   2:39PM0:00.00 grep vmd
> > > pasche@tux2:~$ vmctl console 1
> > > Connected to /dev/ttyp2 (speed 115200)
> > > 
> > > Debian GNU/Linux 9 debian-vm ttyS0
> > > 
> > > debian-vm login:
> > > [EOT]
> > > pasche@tux2:~$
> > > 
> > > 
> > > OpenBSD 6.2 (GENERIC.MP) #5: Fri Feb  2 23:02:19 CET 2018
> > > 
> > > r...@syspatch-62-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > > real mem = 16708087808 (15934MB)
> > > avail mem = 16194699264 (15444MB)
> > > mpath0 at root
> > > scsibus0 at mpath0: 256 targets
> > > mainbus0 at root
> > > bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9d000 (68 entries)
> > > bios0: vendor LENOVO version "HEET34WW (1.15 )" date 07/02/2013
> > > bios0: LENOVO 68852HG
> > > acpi0 at bios0: rev 2
> > > acpi0: sleep states S0 S3 S4 S5
> > > acpi0: tables DSDT FACP SSDT SSDT ASF! HPET APIC MCFG FPDT SSDT SSDT UEFI
> > > UEFI POAT UEFI DBG2
> > > acpi0: wakeup devices P0P1(S4) EHC1(S3) EHC2(S3) XHC_(S3) HDEF(S3) 
> > > PXSX(S4)
> > > RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4)
> > > RP05(S4) PXSX(S4) [...]
> > > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > > acpihpet0 at acpi0: 14318179 Hz
> > > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> > > cpu0 at mainbus0: apid 0 (boot processor)
> > > cpu0: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.51 MHz
> > > 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> > > cpu0: 256KB 64b/line 8-way L2 cache
> > > cpu0: TSC frequency 2594510480 Hz
> > > cpu0: smt 0, core 0, package 0
> > > mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> > > cpu0: apic clock running at 99MHz
> > > cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
> > > cpu1 at mainbus0: apid 1 (application processor)
> > > cpu1: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
> > > 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> > > cpu1: 256KB 64b/line 8-way L2 cache
> > > cpu1: smt 1, core 0, package 0
> > > cpu2 at mainbus0: apid 2 (application processor)
> > > cpu2: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
> > > cpu2: 
> > > 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-C

Re: vmctl status shows vm as stopped although running

2018-02-19 Thread Mike Larkin
On Mon, Feb 19, 2018 at 11:12:52AM -0800, Mike Larkin wrote:
> On Mon, Feb 19, 2018 at 02:40:47PM +0100, Robert Paschedag wrote:
> > Hi misc,
> > 
> > I am running STABLE and just started testing running debian within vmd and
> > this works quite well right now.
> > 
> > Now I noticed, that vmctl status shows the vm as STOPPED, although it is
> > running.
> > 
> > I can connect to the console without problems. Is this status showing some
> > "other" status?
> > 
> > Thanks.
> > Robert
> > 
> 
> An OS can spent a large amount of time "doing nothing" - eg, in it's idle 
> loop.
> 

What horrible English. This was written before coffee. "spend" and "its" are, of
course, what I meant to type there.

> What you are seeing is that your guest OS has executed a HLT instruction 
> (likely
> in that idle loop) and thus, vmd is not running at that precise instant in 
> time
> when you ran the command, because there is nothing to do.
> 
> I bet if you ran something that consumed guest CPU, and ran the same command,
> you'd see something else.
> 
> -ml
> 
> > pasche@tux2:~$ vmctl status
> >ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
> > 1 10854 12.0G217M   ttyp2   pasche debian
> > pasche@tux2:~$ vmctl status 1
> >ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
> > 1 10854 12.0G217M   ttyp2   pasche debian
> >  VCPU:  0 STATE: STOPPED
> > pasche@tux2:~$ ps aux | grep vmd
> > _vmd 41407  0.0  0.0  1188  1756 ??  Ssp2:16PM0:00.01 vmd: vmm
> > (vmd)
> > root 79080  0.0  0.0  1112  1640 ??  Is 2:16PM0:00.01 vmd: priv
> > (vmd)
> > _vmd 51293  0.0  0.0  1184  1732 ??  Ssp2:16PM0:00.01 vmd:
> > control (vmd)
> > root 82177  0.0  0.0  1364  1672 ??  Ssp2:16PM0:00.01
> > /usr/sbin/vmd
> > _vmd 10854  0.0  0.4 2099748 64808 ??  Ip 2:16PM0:20.73 vmd:
> > debian (vmd)
> > pasche   24262  0.0  0.0   132   328 p1  R+/1   2:39PM0:00.00 grep vmd
> > pasche@tux2:~$ vmctl console 1
> > Connected to /dev/ttyp2 (speed 115200)
> > 
> > Debian GNU/Linux 9 debian-vm ttyS0
> > 
> > debian-vm login:
> > [EOT]
> > pasche@tux2:~$
> > 
> > 
> > OpenBSD 6.2 (GENERIC.MP) #5: Fri Feb  2 23:02:19 CET 2018
> > 
> > r...@syspatch-62-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > real mem = 16708087808 (15934MB)
> > avail mem = 16194699264 (15444MB)
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9d000 (68 entries)
> > bios0: vendor LENOVO version "HEET34WW (1.15 )" date 07/02/2013
> > bios0: LENOVO 68852HG
> > acpi0 at bios0: rev 2
> > acpi0: sleep states S0 S3 S4 S5
> > acpi0: tables DSDT FACP SSDT SSDT ASF! HPET APIC MCFG FPDT SSDT SSDT UEFI
> > UEFI POAT UEFI DBG2
> > acpi0: wakeup devices P0P1(S4) EHC1(S3) EHC2(S3) XHC_(S3) HDEF(S3) PXSX(S4)
> > RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4)
> > RP05(S4) PXSX(S4) [...]
> > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > acpihpet0 at acpi0: 14318179 Hz
> > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> > cpu0 at mainbus0: apid 0 (boot processor)
> > cpu0: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.51 MHz
> > 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> > cpu0: 256KB 64b/line 8-way L2 cache
> > cpu0: TSC frequency 2594510480 Hz
> > cpu0: smt 0, core 0, package 0
> > mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> > cpu0: apic clock running at 99MHz
> > cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
> > cpu1 at mainbus0: apid 1 (application processor)
> > cpu1: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
> > 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> > cpu1: 256KB 64b/line 8-way L2 cache
> > cpu1: smt 1, core 0, package 0
> > cpu2 at mainbus0: apid 2 (application processor)
> > cpu2: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
> > cpu2: 
> > 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> > cpu2: 256KB 64b/line 8-way L2 cache
> > cpu2: smt 0, core 1, package 0
> > cpu3 at mainbus0: apid 3 (application processor)
> > cpu3: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
> > cpu3: 
>

Re: vmctl status shows vm as stopped although running

2018-02-19 Thread Mike Larkin
On Mon, Feb 19, 2018 at 02:40:47PM +0100, Robert Paschedag wrote:
> Hi misc,
> 
> I am running STABLE and just started testing running debian within vmd and
> this works quite well right now.
> 
> Now I noticed, that vmctl status shows the vm as STOPPED, although it is
> running.
> 
> I can connect to the console without problems. Is this status showing some
> "other" status?
> 
> Thanks.
> Robert
> 

An OS can spent a large amount of time "doing nothing" - eg, in it's idle loop.

What you are seeing is that your guest OS has executed a HLT instruction (likely
in that idle loop) and thus, vmd is not running at that precise instant in time
when you ran the command, because there is nothing to do.

I bet if you ran something that consumed guest CPU, and ran the same command,
you'd see something else.

-ml

> pasche@tux2:~$ vmctl status
>ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
> 1 10854 12.0G217M   ttyp2   pasche debian
> pasche@tux2:~$ vmctl status 1
>ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
> 1 10854 12.0G217M   ttyp2   pasche debian
>  VCPU:  0 STATE: STOPPED
> pasche@tux2:~$ ps aux | grep vmd
> _vmd 41407  0.0  0.0  1188  1756 ??  Ssp2:16PM0:00.01 vmd: vmm
> (vmd)
> root 79080  0.0  0.0  1112  1640 ??  Is 2:16PM0:00.01 vmd: priv
> (vmd)
> _vmd 51293  0.0  0.0  1184  1732 ??  Ssp2:16PM0:00.01 vmd:
> control (vmd)
> root 82177  0.0  0.0  1364  1672 ??  Ssp2:16PM0:00.01
> /usr/sbin/vmd
> _vmd 10854  0.0  0.4 2099748 64808 ??  Ip 2:16PM0:20.73 vmd:
> debian (vmd)
> pasche   24262  0.0  0.0   132   328 p1  R+/1   2:39PM0:00.00 grep vmd
> pasche@tux2:~$ vmctl console 1
> Connected to /dev/ttyp2 (speed 115200)
> 
> Debian GNU/Linux 9 debian-vm ttyS0
> 
> debian-vm login:
> [EOT]
> pasche@tux2:~$
> 
> 
> OpenBSD 6.2 (GENERIC.MP) #5: Fri Feb  2 23:02:19 CET 2018
> 
> r...@syspatch-62-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 16708087808 (15934MB)
> avail mem = 16194699264 (15444MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9d000 (68 entries)
> bios0: vendor LENOVO version "HEET34WW (1.15 )" date 07/02/2013
> bios0: LENOVO 68852HG
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT SSDT ASF! HPET APIC MCFG FPDT SSDT SSDT UEFI
> UEFI POAT UEFI DBG2
> acpi0: wakeup devices P0P1(S4) EHC1(S3) EHC2(S3) XHC_(S3) HDEF(S3) PXSX(S4)
> RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4)
> RP05(S4) PXSX(S4) [...]
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.51 MHz
> 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> cpu0: 256KB 64b/line 8-way L2 cache
> cpu0: TSC frequency 2594510480 Hz
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
> 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> cpu1: 256KB 64b/line 8-way L2 cache
> cpu1: smt 1, core 0, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
> cpu2: 
> 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> cpu2: 256KB 64b/line 8-way L2 cache
> cpu2: smt 0, core 1, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
> cpu3: 
> 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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT
> cpu3: 256KB 64b/line 8-way L2 cache
> cpu3: smt 1, core 1, package 0
> ioapi

Notes about PCIe NVME SSD booting on less recent AMD64 hardware

2018-02-19 Thread Tinker
This is mostly extra notes to my recent separate threads about how
to UEFI-boot OpenBSD in various ways. The following OS-unrelated
factors added ambiguity when trying to figure how to UEFI-boot.

I started with a particular machine from 2013. Whatever I tried, it
would just not boot off a PCIe NVME SSD: I'd install the OS on the SSD,
and the installation process worked out perfectly, but it wouldn't
boot, neither in UEFI/GPT nor in legacy/MBR/BIOS mode.

I tried with using an USB memory stick with the OpenBSD boot loader on
it as trampoline for the boot process. Interestingly, the MBR boot
loader *would identify* the SSD *but could not read* from it.

The UEFI boot loader (BOOTX64.EFI) would both identify the SSD and
could read on it!

Hence we're seeing a system with weird one-quarter-support. How
unintuitive is that.


While figuring my way through that problem, I stumbled on mentionings
that at least two PCIe NVME SSD models apparently include legacy ROM:s
to provide AMD64 (and I think ARM64) BIOS legacy disk IO on a system
where the BIOS otherwise would have no PCIe NVME SSD support at all.
Primary models with legacy are Samsung 950 Pro [1] and Intel 750. This
could be useful for getting a higher-speed SSD on an older computer
for someone.

Samsung ditched the legacy ROM thing quickly though so Samsung 960 and
other newer SSD:s will not have it [2].

The drive I got going by the UEFI USB boot disk trick, is a Samsung
960.


For older machines, there may also be ways to patch UEFI firmware to
support PCIe NVME SSD:s [3], didn't try though.

Tinker

[1]
https://web.archive.org/web/20161027233731/http://www.samsung.com/semiconductor/minisite/ssd/downloads/document/Samsung_SSD_950_PRO_White_paper.pdf

[2]
https://us.community.samsung.com/t5/Memory-Storage/960-Pro-Evo-Boot-Support/td-p/66895

[3]
https://audiocricket.com/2016/12/31/booting-samsung-sm961-on-asus-p6t-se-mainboard/



Re: OBSD 6.2 AMD64 can't get keydisk crypto softraid boot going neither with UEFI (nor MBR), is it even supported yet?

2018-02-19 Thread Tinker
Hi misc@,

This is to sum up this previous thread:


Keydisk crypto softraid boot *works PERFECTLY well in UEFI* boot mode
with OpenBSD 6.2, and so does password crypto softraid.


The issue I had actually encountered was not softraid related, but
related to how to make an USB memory stick OpenBSD-UEFI-bootable, and I
got that clarified now and posted that separately to misc@ .


At the bottom of the previous post, I wrote three questions, and I can
answer those now:

>  1) Is the UEFI boot loader for USB keydisk crypto softraid really
> stable?
>
>  2) Is the UEFI boot loader good for any crypto softraid?

To 1) and 2): Yes it's stable.

>  3) Since this one is a big question, I'll make a separate email of it:
>
> If this machine's BIOS does not support NVME SSD boot, how can I
> create an OpenBSD USB boot disk that would boot OpenBSD from the
> NVME SSD-stored crypto softraid for me?
>
> This could be done either by
>
>  * The OpenBSD kernel being stored on the USB stick, loading from
>it, and then using the NVME SSD as both root disk, swap disk,
>and dump disk, or,

This was discussed with Stuart in a separate misc@ thread this month,
and he says it can be done but requires custom kernel compiletime
defines.

>  * The OpenBSD boot loader would load the OpenBSD kernel from the
>NVME SSD.

I just described this in the other thread.

Tinker


2018-02-01 17:42 GMT+08:00 :
>
> Hi,
>
> This is experiences from an upgrade from 6.0 to 6.2.
>
> I know MBR USB keydisk boot worked on 6.0. This is an attempt to
> upgrade to 6.2 with UEFI.
>
> A potential error source I have is that that I'm also switching boot
> medium from SATA to NVME. NVME as boot medium does not affect the
> OpenBSD installer, so within the scope of the OpenBSD installer, the
> switch to NVME is without impact, however yet the installer does
> complain, see below.
>
> The issue is that I don't get the machine to boot with a keydisk crypto
> softraid boot partition.
>
> Reproduction steps:
>
>  * Write install62.fs to a USB memory stick
>
>  * Set the machine to UEFI boot mode (machine has no safe boot setting)
>
>  * Boot machine from USB memory stick.
>
>OpenBSD kernel boots and the disks are sd0 = NVME SSD, sd1 = boot
>USB stick, sd2 = keydisk USB stick
>
>  * Go to the shell by using the (S) option.
>
>  * Reset sd0 and sd1 by:
>
> dd if=/dev/random of=/dev/sd0c bs=1M count=100
> dd if=/dev/random of=/dev/sd2c bs=1M count=100
> fdisk -igy -b 960 sd0
> fdisk -igy sd2
>
>  * To ensure that any previous BSD disklabel is properly forgotten by
>OpenBSD, reboot, and get back in the S option.
>
>  * Set up BSD disklabels:
>
> disklabel -E sd0
> a a (to add an "a" partition)
> (enter for the default offset)
> (enter to occupy all disk)
> RAID (to make a softraid)
> w
> q
>
> disklabel -E sd2
> a a (to add an "a" partition)
> 1024 (to start 512KB into disk)
> 1024 (to create an 512KB-sized partition)
> RAID (to create a softraid)
> w
> q
>
>  * Set up USB keydisk softraid:
>
> bioctl -C force -c C -l /dev/sd0a -k /dev/sd2a softraid0
>
>And its output is:
>
> sd3 at scsibus3 targ 1 lun 0:  SCSI2 0/direct fixed
> sd3: XXMB, 512 bytes/sector, XX sectors
>
>And so sd3 is the softraid.
>
>  * Proceed with OpenBSD installer via "/install".
>
>The interaction at the disk-related install steps is done as follows:
>
> Available disks are: sd0 sd1 sd2 sd3
> Which disk is the root disk? ('?' for details) [sd0] sd3
> No valid MBR or GPT.
> Use (W)hole disk MBR, whole disk (G)PT or (E)dit? [gpt]
> Setting OpenBSD GPT partition to whole sd3...done
> The allocated layout for sd3 is:
> # (SNIP)
> Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] c
> > a a (to add an "a" partition in the softraid)
> offset: [1024] (enter to use default offset)
> size: [XXX] (enter to fill all disk)
> FS type: (enter to make it a 4.2BSD filesystem)
> mount point: [none] / (to make it root partition)
> Rounding size to bsize (128 sectors): XX
> > w
> > q
>
>  * Following through the installer to completion.
>
>Unfortunately at completion the installer outputs this error
>message:
>
> Failed to install boot blocks.
> You will not be able to boot OpenBSD from sd3.
>
>This message is output by the install script when installboot
>returns failure.
>
>To fix this, I tried any of the following three:
>
> installboot -r /mnt sd0
>
> installboot sd0 /mnt/usr/mdec/biosboot /usr/mdec/boot
>
> installboot -r /mnt sd0 /mnt/usr/mdec/biosboot /usr/mdec/boot
>
>  * On some attempts here, I checked that the UEFI boot partition was
>correct by:
>
> mount /dev/sd0i /mnt2
> ls /mnt2/efi/boot
>
>And indeed bootia32.efi and bootx64.efi are there.
>
>  * Sync, reboot.
>
>
> Problems:
>
>  * The problem at reboot is that the BIOS not acknowledges any UEFI-
>bootable disks at all. The BIOS shows this by jumping into the BIOS
>menu at boot, and not list

Re: vmd - Unable to reboot Alpine guest

2018-02-19 Thread Aham Brahmasmi
> Sent: Monday, February 19, 2018 at 1:41 PM
> From: "Stuart Henderson" 
> To: misc@openbsd.org
> Subject: Re: vmd - Unable to reboot Alpine guest
>
> On 2018-02-19, Martijn van Duren  wrote:
> > Hello Aham,
> >
> > On 02/18/18 21:09, Aham Brahmasmi wrote:
> >> Hi Carlos,
> >> 
> >> Thank you for your response.
> >> 
> >> I have been learning and understanding OpenBSD for around one month now.
> >> As such, I had installed -release, and used syspatch to reach -stable.
> >> 
> >> I have spent some time right now trying to understand the mechanism to
> >> reach -current from -stable.
> >> 
> >>  From what I understand, I first need to upgrade to the latest snapshot.
> >>  From there, I need to use source build instructions at
> >> https://www.openbsd.org/faq/faq5.html#Bld to reach -current.
> >
> > There's no need to build from source, just upgrading via the latest
> > snapshot suffices.
> >> 
> >> I would like to do the above because I am also interested in the spamd
> >> and IPv6 diff that phessler@ has. But right now, I am quite a bit
> >> inexperienced, so you would have to be patient with me.
> >> 
> >>  From what I understand, to install snapshot I need to download
> >> https://ftp.openbsd.org/pub/OpenBSD/snapshots/amd64/bsd.rd, boot that
> >> at the boot prompt and then (U)pgrade from there.
> >> 
> > That is correct.
> > If you don't intent to work on the source, there's no need to build it
> > yourself.
> 
> Unless wanting to test a diff. However for that you typically don't need
> to rebuild the whole system.
> 
> 
> 

Thank you Dave, Mike, Martijn and Stuart for your helpful responses.

Based on what I have understood from this thread, upgrading to snapshot
should suffice to run -current, unless one intends to do development on
the source. For diffs, one does not need to rebuild the whole system.

@Carlos et al, I will now try to upgrade to snapshot from the URL - 
https://ftp.openbsd.org/pub/OpenBSD/snapshots/amd64/bsd.rd and report
back. Considering it has worked for Dave, I hope it will work for me as
well.

@Dave, Please do not apologize. I am myself unable to understand how to
reply most of the times. When you say "upgrade packages", I think you
refer to "pkg_add -u". When you say "clean out old dependencies", I am
unable to understand what would need to be done. Currently, I have not
installed any packages, since I am still learning the functionality in
the base.

Thanks.

Regards,
ab.
-|-|-|-|-|-|-|--



Re: Using OpenBSD on a thinkpad?

2018-02-19 Thread Daniel Baumgarten
Hey,

I successfully installed OpenBSD on a Libreboot X200.  Libreboot's
payload is Grub2, but they don't include the code for booting
OpenBSD, so it's necessary to chain load SeaBIOS from GRUB and boot
OpenBSD from there.  You would need to include SeaVGABIOS and disable
inteldrm* in the OpenBSD kernel.  And you would need a libreboot_grub.cfg
that looks something like this:

menuentry 'OpenBSD' {
multiboot (sda,ufs1)/bios.bin.elf
module (sda,ufs1)/vgabios.bin name=vgaroms/seavgabios.bin
}

However, since this is going to be your first OpenBSD machine, I
wouldn't recommend installing it on the Libreboot.  It gave me a
headache, and I have been using OpenBSD since version 3.9.  I think
it would leave a poor first impression of a system that's actually
pretty easy to install and use!

Best wishes,
Daniel



Re: vmctl status shows vm as stopped although running

2018-02-19 Thread Robert Paschedag

On 02/19/18 15:23, Carlos Cardenas wrote:

On Mon, Feb 19, 2018 at 02:40:47PM +0100, Robert Paschedag wrote:

Hi misc,

I am running STABLE and just started testing running debian within vmd and
this works quite well right now.

Now I noticed, that vmctl status shows the vm as STOPPED, although it is
running.

I can connect to the console without problems. Is this status showing some
"other" status?

Thanks.
Robert


Quite of few bug fixes and enhancements to vmd occurred after 6.2 was released.

Is it possible to run your host with 6.2-current?

+--+
Carlos



Hi Carlos,

right now, I'm not able to upgrade to current. Sorry.

For now, I can live with that, because I start the vm manually. So I 
know, it is running.


But I wanted to mention it. I'll try to upgrade when I have more time
left and will report.

Thanks.
Robert



Re: vmctl status shows vm as stopped although running

2018-02-19 Thread Carlos Cardenas
On Mon, Feb 19, 2018 at 02:40:47PM +0100, Robert Paschedag wrote:
> Hi misc,
> 
> I am running STABLE and just started testing running debian within vmd and
> this works quite well right now.
> 
> Now I noticed, that vmctl status shows the vm as STOPPED, although it is
> running.
> 
> I can connect to the console without problems. Is this status showing some
> "other" status?
> 
> Thanks.
> Robert

Quite of few bug fixes and enhancements to vmd occurred after 6.2 was released.

Is it possible to run your host with 6.2-current?

+--+
Carlos



vmctl status shows vm as stopped although running

2018-02-19 Thread Robert Paschedag

Hi misc,

I am running STABLE and just started testing running debian within vmd 
and this works quite well right now.


Now I noticed, that vmctl status shows the vm as STOPPED, although it is 
running.


I can connect to the console without problems. Is this status showing 
some "other" status?


Thanks.
Robert

pasche@tux2:~$ vmctl status
   ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
1 10854 12.0G217M   ttyp2   pasche debian
pasche@tux2:~$ vmctl status 1
   ID   PID VCPUS  MAXMEM  CURMEM TTYOWNER NAME
1 10854 12.0G217M   ttyp2   pasche debian
 VCPU:  0 STATE: STOPPED
pasche@tux2:~$ ps aux | grep vmd
_vmd 41407  0.0  0.0  1188  1756 ??  Ssp2:16PM0:00.01 vmd: 
vmm (vmd)
root 79080  0.0  0.0  1112  1640 ??  Is 2:16PM0:00.01 vmd: 
priv (vmd)
_vmd 51293  0.0  0.0  1184  1732 ??  Ssp2:16PM0:00.01 vmd: 
control (vmd)
root 82177  0.0  0.0  1364  1672 ??  Ssp2:16PM0:00.01 
/usr/sbin/vmd
_vmd 10854  0.0  0.4 2099748 64808 ??  Ip 2:16PM0:20.73 vmd: 
debian (vmd)

pasche   24262  0.0  0.0   132   328 p1  R+/1   2:39PM0:00.00 grep vmd
pasche@tux2:~$ vmctl console 1
Connected to /dev/ttyp2 (speed 115200)

Debian GNU/Linux 9 debian-vm ttyS0

debian-vm login:
[EOT]
pasche@tux2:~$


OpenBSD 6.2 (GENERIC.MP) #5: Fri Feb  2 23:02:19 CET 2018

r...@syspatch-62-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16708087808 (15934MB)
avail mem = 16194699264 (15444MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9d000 (68 entries)
bios0: vendor LENOVO version "HEET34WW (1.15 )" date 07/02/2013
bios0: LENOVO 68852HG
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT SSDT ASF! HPET APIC MCFG FPDT SSDT SSDT 
UEFI UEFI POAT UEFI DBG2
acpi0: wakeup devices P0P1(S4) EHC1(S3) EHC2(S3) XHC_(S3) HDEF(S3) 
PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) 
PXSX(S4) RP05(S4) PXSX(S4) [...]

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.51 MHz
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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT

cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 2594510480 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT

cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
cpu2: 
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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT

cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, 2594.10 MHz
cpu3: 
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,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,SENSOR,ARAT

cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf800, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 3 (RP01)
acpiprt3 at acpi0: bus 4 (RP02)
acpiprt4 at acpi0: bus -1 (RP03)
acpiprt5 at acpi0: bus 5 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus -1 (RP07)
acpiprt9 at acpi0: bus -1 (RP08)
acpiprt10 at acpi0: bus -1 (PEG0)
acpiprt11 at acpi0: bus -1 (PEG1)
acpiprt12 at acpi0: bus -1 (PEG2)
acpiprt13 at acpi0: bus -1 (PEG3)
acpiec0 at acpi0
acpicpu0 at acpi0: C3(200@87 mwait.1@0x30), C2(500@59 mwait.1

How to make an UEFI-bootable USB memory stick (hopefully exhaustive instructions)

2018-02-19 Thread Tinker
Hi misc@,

Learning how to make an UEFI-bootable USB memory stick took too much
time, like, 20 hours. I'll list the caveats below. It is simple.

At the time of writing this OpenBSD 6.2 is the latest release.

First, wipe the disk to lessen possible error source impact:

dd if=/dev/zero of=/dev/rsdNc bs=1M

(/dev/rsdNc is about 4-8x faster to write to than /dev/sdNc .)

Potentially double-check that the partitioning tables have really been
wiped, this one should say that the Primary GPT and Secondary GPT are
"Not Found" and list all-zero values for the MBR partitioning table:

fdisk -v sdN

Then, MBR-format the USB disk, and have fdisk(8) create the EFI
partition for you:

fdisk -iy -b 960 sdN

(It's beyond me why you would use MBR for an UEFI disk, however, I have
seen cases where having a GPT partitioning table but no MBR, has
*failed* to boot, and I have seen *no case* where having an MBR
partitioning table but no GPT *has not worked*. Therefore MBR is the
safe card to play.

OpenBSD's installNN.fs installer has an MBR partitioning table but no
GPT partitioning table.

OpenBSD's fdisk(8) will let you create either an MBR partitioning table
or a GPT partitioning table, it offers no hybrid mode. This should be
for some sensible reason, I'd guess.)

Create an MSDOS filesystem on sdNi, and copy in the EFI files:

newfs -t msdos sdNi
mount /dev/sdNi /mnt
mkdir -p /mnt/efi/boot
cp /usr/mdec/BOOT*.EFI /efi/boot/
umount /mnt
sync

The USB memory stick is now UEFI-bootable, as in, an AMD64 machine in
UEFI mode will show the boot console when booting off this USB memory
stick.

It will however attempt to boot from itself - BOOTX64.EFI will identify
the boot medium as "hd0" and it will attempt to boot off "hd0a" which
not exists. This will be the case even if there is no OpenBSD MBR
partition on the disk. There is some limited logic for resolving disk
(hd0a) to softraid (sr0a) but only applies for data disks.

You can make the USB memory stick boot off another system disk, by
creating an FFS partition sdNa with an /etc/boot.conf file with a line
"set device sr0a", "set device hd1a" etc. . I am not aware of any way
to specify device by DUID.

Hence to sum up: To make an USB memory stick bootable with OpenBSD's
EFI boot loader program, just completely wipe the stick, create an MBR
partitioning table on it, make one EFI partition of 480KB or more,
FAT32-format it, and copy in OpenBSD's /usr/mdec/BOOT*.EFI to the
/efi/boot/ directory on that partition.

The above has been successfully tested on three computers (2013 and
2017 models and one virtual machine).

The caveats in getting to this clarity were many:

 * An USB memory stick that previously was flashed to installNN.fs may
   leave the previous EFI partition there even after reinitializing the
   disk using "fdisk -igy -b 960 sdN" or "fdisk -iy -b 960 sdN", and
   this may create an impression that "fdisk -b" actually populates the
   EFI partition, but ***IT DOES NOT***.

   *You* need to populate the EFI partition (sdNi) yourself per the
   instructions above.

   It's easy to confuse yourself thinking that your EFI partition is
   properly populated but actually you're trying to recycle an
   inherited EFI partition from installNN.fs that's laying around and
   may be broken, I think I have seen examples when it looked like it's
   intact but the computer would not boot it. The only way to make sure
   it's correct is by populating itself from scratch via the
   instructions above.

   I think also the ordinary OpenBSD installer (the /install script in
   the installNN.fs image) will populate the destination disk's EFI
   partition, this is why populating the EFI partition is transparent
   to normal users when installing the OS on an SSD/HDD, hence the
   possibility of confusion when the responsibility to do this is
   transfered to the user.

 * I have gotten the impression that OpenBSD sometimes is caching an
   old BSD disklabel, so that /dev/sd* will give you the wrong thing
   or that fdisk or disklabel will give you the wrong thing, relative
   to your recent dd of=/dev/rsdNc or dd of=/dev/sdNc activity.

   I'm still not clear on this one, possibly also USB memory sticks can
   have write failures.

   (And of course never use USB 3 ports presently as the XHCI stack is
   unstable.)

   I base this on having a strong impression that i sometimes needed to
   repeat a step, for instance with reboots, multiple times before it
   "did what it should".

   Therefore at any indication of unexpected behavior, start over from
   the beginning.

 * It seems that a safe thing to do may be to reboot a system after
   wiping it and before creating a new disklabel. No disklabel is
   created in these instructions here however so there should be no
   need to reboot the system.

   Maybe unplugging and replugging the USB memory stick may have the
   same effect as a reboot would have.

   I have seen "disklabel -E" fail to write disklabel updates for
   OS-internal

Re: vmd - Unable to reboot Alpine guest

2018-02-19 Thread Stuart Henderson
On 2018-02-19, Martijn van Duren  wrote:
> Hello Aham,
>
> On 02/18/18 21:09, Aham Brahmasmi wrote:
>> Hi Carlos,
>> 
>> Thank you for your response.
>> 
>> I have been learning and understanding OpenBSD for around one month now.
>> As such, I had installed -release, and used syspatch to reach -stable.
>> 
>> I have spent some time right now trying to understand the mechanism to
>> reach -current from -stable.
>> 
>>  From what I understand, I first need to upgrade to the latest snapshot.
>>  From there, I need to use source build instructions at
>> https://www.openbsd.org/faq/faq5.html#Bld to reach -current.
>
> There's no need to build from source, just upgrading via the latest
> snapshot suffices.
>> 
>> I would like to do the above because I am also interested in the spamd
>> and IPv6 diff that phessler@ has. But right now, I am quite a bit
>> inexperienced, so you would have to be patient with me.
>> 
>>  From what I understand, to install snapshot I need to download
>> https://ftp.openbsd.org/pub/OpenBSD/snapshots/amd64/bsd.rd, boot that
>> at the boot prompt and then (U)pgrade from there.
>> 
> That is correct.
> If you don't intent to work on the source, there's no need to build it
> yourself.

Unless wanting to test a diff. However for that you typically don't need
to rebuild the whole system.




Re: noob question: driver separation?

2018-02-19 Thread Boudewijn Dijkstra
Op Fri, 16 Feb 2018 21:51:12 +0100 schreef Hess THR  
:

Hello,

are there any (at least on plan or theoretical level) that drivers will  
be/are/would be separated? ex.:


- touchpad drivers shouldn't have to do anything with network access
- wireless drivers shouldn't be able to touch anything from ex.: /home
- graphics/wireless/sound/disk/etc. drivers shouldn't be able to get  
anything from keyboards

- and so on.

or is this only a dream or bad concept that separation needed "inside  
kernel level"?


Why do you think it is needed?  Did you see any dubious or sketchy OpenBSD  
driver code?




--
Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/



Re: Using OpenBSD on a thinkpad?

2018-02-19 Thread Peter N. M. Hansteen
On Mon, Feb 19, 2018 at 08:00:30PM +1100, crimeangot...@nigge.rs wrote:
> 
> Hey everyone, I am pretty stupid when it comes to less user friendly 
> operating systems. I currently use slackware/windows and am thinking of using 
> OpenBSD on either my thinkpad e420 or my libreboot t400. Are either 
> supported(or at least possible to install on?

Thinkpads in general are well supported. Part of the reason is that quite a few
of the developes have a strong preference for the machines.

That said, the is always a non-zero risk of some variant being odder than 
others,
but a brief glance on the specifications for the models you mention do not raise
any obvious red flags here.

- Peter
-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: Using OpenBSD on a thinkpad?

2018-02-19 Thread Jeffrey Joshua Rollin
I have an X230i and an E550, and as of 6.2, Open BSD works fine on both.

I'm not sure how kindly Open BSD and libreboot would take to  each other 
though, so if it was me I'd avoid using that one.

Jeff

⁣Sent from Blue ​

On 19 Feb 2018, 09:01, at 09:01, crimeangot...@nigge.rs wrote:
>
>Hey everyone, I am pretty stupid when it comes to less user friendly
>operating systems. I currently use slackware/windows and am thinking of
>using OpenBSD on either my thinkpad e420 or my libreboot t400. Are
>either supported(or at least possible to install on?) I’m sorry if this
>question has already been asked but I can’t really find any answers and
>the mailing list archive is barren as well. 
>Thanks!


Re: Using OpenBSD on a thinkpad?

2018-02-19 Thread Felix Maschek

Hi,

Thinkpads are in general a good choice for OpenBSD. I have OpenBSD 
installed and running on my T510 and T400.


:q! Felix

On 19.02.2018 10:00, crimeangot...@nigge.rs wrote:

Hey everyone, I am pretty stupid when it comes to less user friendly
operating systems. I currently use slackware/windows and am thinking
of using OpenBSD on either my thinkpad e420 or my libreboot t400. Are
either supported(or at least possible to install on?) I’m sorry if
this question has already been asked but I can’t really find any
answers and the mailing list archive is barren as well.
Thanks!




Re: vmd - Unable to reboot Alpine guest

2018-02-19 Thread Martijn van Duren

Hello Aham,

On 02/18/18 21:09, Aham Brahmasmi wrote:

Hi Carlos,

Thank you for your response.

I have been learning and understanding OpenBSD for around one month now.
As such, I had installed -release, and used syspatch to reach -stable.

I have spent some time right now trying to understand the mechanism to
reach -current from -stable.

 From what I understand, I first need to upgrade to the latest snapshot.
 From there, I need to use source build instructions at
https://www.openbsd.org/faq/faq5.html#Bld to reach -current.


There's no need to build from source, just upgrading via the latest
snapshot suffices.


I would like to do the above because I am also interested in the spamd
and IPv6 diff that phessler@ has. But right now, I am quite a bit
inexperienced, so you would have to be patient with me.

 From what I understand, to install snapshot I need to download
https://ftp.openbsd.org/pub/OpenBSD/snapshots/amd64/bsd.rd, boot that
at the boot prompt and then (U)pgrade from there.


That is correct.
If you don't intent to work on the source, there's no need to build it
yourself.

martijn@



Using OpenBSD on a thinkpad?

2018-02-19 Thread crimeangothic

Hey everyone, I am pretty stupid when it comes to less user friendly operating 
systems. I currently use slackware/windows and am thinking of using OpenBSD on 
either my thinkpad e420 or my libreboot t400. Are either supported(or at least 
possible to install on?) I’m sorry if this question has already been asked but 
I can’t really find any answers and the mailing list archive is barren as well. 
Thanks!