Re: Is there a fix for stock vi's bug-for-bug compatible ESC-equals-return feature?

2019-02-20 Thread Sijmen J. Mulder
Op di feb 19 2019, om 21:33 schreef Ted Unangst:
> I think the answer is, you want traditional vi, you get traditional vi. If you
> want something else, try ports.

Can't we improve vi? The proposed change isn't feature bloat.

Even though it 's the classical behaviour it does feel like a bug to me (or a 
rather unfriendly feature). I too prefer the simplicity of nvi but have been 
bitten by ":w".

Sijmen



Re: How to print nicely formatted man pages?

2019-02-07 Thread Sijmen J. Mulder
Op do feb 7 2019, om 14:33 schreef Ingo Schwarze:
> But please, if you can, always provide complete, working, tested
> command invocations to users, in this case:

Apologies - I was on mobile which but that's no excuse.



Re: How to print nicely formatted man pages?

2019-02-07 Thread Sijmen J. Mulder
> Op 7 feb. 2019 om 08:29 heeft Anne Wainwright  het 
> volgende geschreven:
> 
> I can print out nicely formatted man pages in linux, thus:
> 
> $ man -t ls | lpr -P hp_laserjet
> 
> But find that the -t option is not present in bsd.
> 
> Have really dug around but can find no hints, where should I be looking?

man supports mandoc’s -T option, e.g.:

man -T ps | ...

There’s a little note about it at the end of the option list in man’s man page. 
See mandoc’s man page for the formats and such.

Cheers,
Sijmen



No panic output in dmesg, and using sendbug?

2018-10-13 Thread Sijmen J. Mulder
Hi,

My vintage Dell Inspiron 510m laptop experiences panics with recent
snapshots and fails to boot the latest with a core dump.

I've read the following:

https://www.openbsd.org/report.html
https://man.openbsd.org/crash

But I can't figure out how to make this work. Questions:

 1. Neither the ddb output of the panics of the running system nor the
boot time end up in dmesg. How do I get them?

 2. I don't have experience with email admin, but can I trust smtpd to
succeed delivering my email without further set up considering I'm
on a residential connection and and not using a regular SMTP server?
Should I use -P instead and use my regular email client?

Sijmen



/dev/efi driver

2018-09-17 Thread Sijmen J. Mulder
Hi all,

I'm working on a small EFI boot entry mangement utiltiy[1] which works
by querying and setting EFI variables (Boot, BootOrder, NextBoot).
It appears that OpenBSD does not expose an EFI variable interface.

Are there objections against such a driver on principle, e.g. security?
If not, FreeBSD's efidev[2] may be a suitable starting point. It's an
ioctl interface rather than Linux' efivars virtual file system.

If the FreeBSD design is appropriate I'd like to attempt to port it (if
no one more experienced will).

Sijmen

[1] https://github.com/sjmulder/bootto
[2] https://svnweb.freebsd.org/base/head/sys/dev/efidev/efidev.c?view=markup



Re: "acpi0: SSDT checksum error" on bsd.rd snapshot

2018-09-16 Thread Sijmen J. Mulder
On Sun, 16 Sep 2018 17:02:05 +0200
Omar Polo  wrote:

> I'm having a similar problem with the snapshot dated 15-Sep-2018. I've
> verified the hash and with signify and it seems to be not corrupted,
> but I'm unable to boot from it.

I'm still seeing the issue with the Sep 15 snapshot also.

Sijmen



"acpi0: SSDT checksum error" on bsd.rd snapshot

2018-09-15 Thread Sijmen J. Mulder
Hi all,

I downloaded https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/bsd.rd
dated 14-Sep-2018 23:01 and verified its hash:

SHA256 (/bsd.rd) = 
e362a4faff40decf0a1cc336a4cace03dadc4e8e43fa27492439ca9370a73625

When I boot it, the system reboots almost immediately. This is what
dmesg has to say:

OpenBSD 6.4-beta (RAMDISK_CD) #281: Fri Sep 14 22:59:57 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 17032818688 (16243MB)
avail mem = 16512819200 (15747MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xa7ed9000 (88 entries)
bios0: vendor American Megatrends Inc. version "0311" date 08/31/2015
bios0: ASUSTeK COMPUTER INC. B150M-A
acpi0 at bios0: rev 2
acpi0: SSDT checksum error
acpi0: SSDT checksum error

I should perhaps note that I've seen warnings about ACPI table failures
on Linux too.

For the next (regular) boot:

OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17032818688 (16243MB)
avail mem = 16509534208 (15744MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xa7ed9000 (88 entries)
bios0: vendor American Megatrends Inc. version "0311" date 08/31/2015
bios0: ASUSTeK COMPUTER INC. B150M-A
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT MCFG HPET SSDT LPIT SSDT SSDT SSDT DBGP 
DBG2 SSDT SSDT UEFI SSDT ASF!
acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) 
UAR1(S4) PS2K(S3) PS2M(S3) PXSX(S4) RP09(S4) PXSX(S4) RP10(S4) PXSX(S4) 
RP11(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz, 3292.92 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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz, 3291.86 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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz, 3291.86 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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz, 3291.86 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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 120 pins
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 2399 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 4 (RP09)
acpiprt5 at acpi0: bus -1 (RP10)
acpiprt6 at acpi0: bus -1 (RP11)
acpiprt7 at acpi0: bus 5 (RP12)
acpiprt8 at acpi0: bus -1 (RP13)
acpiprt9 at acpi0: bus -1 (RP01)
acpiprt10 at acpi0: bus -1 (RP02)
acpiprt11 at acpi0: bus -1 (RP03)
acpiprt12 at acpi0: bus -1 (RP04)
acpiprt13 at acpi0: bus 2 (RP05)
acpiprt14 at acpi0: bus -1 (RP06)
acpiprt15 at acpi0: bus -1 

Re: "Missing operating system" after i386 dual boot install

2018-08-05 Thread Sijmen J. Mulder
Success!

> Did you read the FAQ on multi-booting where they talk about
> creating the> openbsd.pbr file and using bcdedit? In running dual-boot with
> Win7/OpenBSD on one system, and Win10/OpenBSD on another, and the
> procedure in the FAQ has worked well for me.
> https://www.openbsd.org/faq/faq4.html#Multibooting

Unfortunately NT4 predates the BCD but I managed to do something
similar by adding the following line to C:\boot.ini:

  C:\openbsd.pbr="OpenBSD"

I still wonder why it wouldn't boot from the partition directly but at
least it works and I'm happy to report that OpenBSD performs remarkablywell on 
this old hardware (PIII 800 MHz, 128 MB RAM).

Sijmen


"Missing operating system" after i386 dual boot install

2018-08-04 Thread Sijmen J. Mulder
Hi all,

I've installed OpenBSD 6.3 on a Pentium III machine alongside existing
installations of Windows 95 and Windows NT 4 by manually setting up a
partition in the fdisk step and using the suggested disklabel
configuration. As recommended in INSTALL.i386, I've emarked the OpenBSD
partition as active.

After booting the PC pauses for a few seconds before displaying "Missing
operating system".

What I've tried:
 - "boot hd0a:/bsd" from the installation CD: works
 - mark partition 0 active: works, brings up NT's bootloader
 - "installboot -v wd0": no change

Any ideas?

Output of "fdisk wd0", "disklabel wd0", and "installboot -nv wd0"
reproduced below.

Thanks,
Sijmen J. Mulder


--> fdisk wd0

  Disk: wd0 geometry: 4998/255/63 [80293248 Sectors]
  Offset: 0 Signature: 0xAA55
  Starting Ending LBA Info:
   #: id  C   H   S -  C   H   S [   start:size ]
  
---
   0: 06  0   1   1 -260 254  63 [  63: 4192902 ] FAT16B
  
   1: 05261   0   1 -   1023 254  63 [ 4192965:12257595 ] Extended 
DOS
  *2: A6   1024   0   1 -   3071 254  63 [16450560:32901120 ] OpenBSD   
  
   3: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
  
  Disk: wd0 geometry: 4998/255/63 [80293248 Sectors]
  Offset: 4192965   Signature: 0xAA55
  Starting Ending LBA Info:
   #: id  C   H   S -  C   H   S [   start:size ]
  
---
   0: 07261   1   1 -521 254  63 [ 4193028: 4192902 ] NTFS  
  
   1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
  
   2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
  
   3: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
  


--> disklabel wd0

  # /dev/rwd0c:
  type: ESDI
  disk: ESDI/IDE disk
  label: Maxtor 6K040L0  
  duid: bcc4a547f3b61211
  flags:
  bytes/sector: 512
  sectors/track: 63
  tracks/cylinder: 255
  sectors/cylinder: 16065
  cylinders: 4998
  total sectors: 80293248
  boundstart: 16450560
  boundend: 49351680
  drivedata: 0 
  
  16 partitions:
  #size   offset  fstype [fsize bsize   cpg]
a:  1075232 16450560  4.2BSD   2048 16384  8366 # /
b:  1045744 17525792swap# none
c: 802932480  unused
d:  1474592 18571552  4.2BSD   2048 16384 11474 # /tmp
e:  2160704 20046144  4.2BSD   2048 16384 12958 # /var
f:  2611232 22206848  4.2BSD   2048 16384 12958 # /usr
g:  1247232 24818080  4.2BSD   2048 16384  9744 # /usr/X11R6
h:  4401248 26065312  4.2BSD   2048 16384 12958 # /usr/local
i:  4192902   63   MSDOS
j:  4192902  4193028NTFS
k:  2969600 30466560  4.2BSD   2048 16384 12958 # /usr/src
l:  6905856 33436160  4.2BSD   2048 16384 12958 # /usr/obj
m:  9009664 40342016  4.2BSD   2048 16384 12958 # /home


--> installboot -nv wd0

  Using / as root
  would install bootstrap on /dev/rwd0c
  using first-stage /usr/mdec/biosboot, second-stage /usr/mdec/boot
  would copy /usr/mdec/boot to /boot
  /boot is 6 blocks x 16384 bytes
  fs block shift 2; part offset 16450560; inode block 104, offset 2472
  master boot record (MBR) at sector 0
partition 0: type 0x06 offset 63 size 4192902
partition 1: type 0x05 offset 4192965 size 12257595
partition 2: type 0xA6 offset 16450560 size 32901120
  /usr/mdec/biosboot will be written at sector 16450560



Coming from FreeBSD, lower networking performance

2018-07-13 Thread Sijmen J. Mulder
Hi all,

After migrating a VPS from FreeBSD to OpenBSD I noticed reduced networking 
performance. Both incoming and outgoing traffic seems to be 2-3 times slower on 
average. By testing 100MB file transfers I've mostly eliminated the following 
factors:

 - Protocol and ciphers (tested SCP, SFTP, FTP+TLS, HTTP, HTTPS)
 - Client software
 - Peer host
 - VM provider/platform

The easiest way to show and test this difference is as such:

 1. Install either FreeBSD 11.2 or OpenBSD 6.3 on a machine or VM
 2. Install curl, then `time curl -O 
http://download.thinkbroadband.com/100MB.zip`

On both my VPS provider and my own PC with VirtualBox VMs the difference is 
about 3x for the above test. Similar results happen when scp-ing a file to the 
machine.

Any ideas on the cause of this? Any additional tests or tweaks I could try?

Sijmen