Re: Dual booting - can't boot OpenBSD from Windows 10 bootloader

2016-09-26 Thread yra ten
Thank you again for all your suggestions and answers. I finally made
it to work. I first shrunk windows partition to be below 256 GB. Then
as it says in this thread:
https://marc.info/?l=openbsd-misc&m=138477729520448&w=2
I changed BOOTBIOS_MAXSEC in sys/arch/amd64/include/biosvar.h from ((1
<< 28) - 1) to ((1 << 29) - 1), and rebuilt the system follwoing
release(8), copied installboot binary to /usr/sbin overwriting the old
one and successfully installed biosboot. I can finally boot OpenBSD
directly from windows bootloader without using grub.


2016-09-26 12:48 GMT+02:00 Oriol Demaria :
> I have OpenBSD booting correctly along Windows 10 in UEFI mode. I
> installed a minimal Ubuntu to get grub2 installed, as it does it
> without detecting the Windows OS. Then I copied the BOOTX64.EFI file
> from OpenBSD to the EFI partition. With this custom entry in the grub
> configuration works perfectly:
>
> menuentry "OpenBSD" {
> insmod part_gpt
> insmod search_fs_uuid
> insmod chain
> chainloader (hd0,gpt1)/EFI/openbsd/BOOTX64.EFI
> }
>
> I assume that you can figure out if you want to make OpenBSD the
> default, as I do, and also where did I copied the file. Works perfectly
> for me.
>
> Regards,
> --
> Oriol Demaria
> 0x1FEF5D72
> 24 de septiembre del 2016 20:12, "yra ten" 
escribió:
>> Thank you all for your asnwers. I cannot use grub or lilo as some of
>> you pointed out beaceuse grub is i386 only and lilo isn't even in
>> ports, and I don't have linux installed. I don't want to use quemu,
>> vmm/vmd or any virtualization if at all possible as that would degrade
>> performance, that isn't that great to begin with on lowe power i5(U)
>> especially using Windows and Xilinx. Unfortunately I think my model of
>> Thinkpad doesn't have space for another drive as it's middle range L
>> series not higher end T seris. Also I wouldn't be able tu justify that
>> expense beacuse $80 or so is much for me especially considering the
>> fact I just spend all my savings on this very laptop.
>>
>> 2016-09-23 21:56 GMT+02:00 Karel Gardas :
>>
>>> On Fri, Sep 23, 2016 at 9:50 PM, Fred  wrote:
 Or run it all on OpenBSD and run Windows and Linux in qemu from ports.

 Works for me ;~)
>>>
>>> How is it looking with performance difference of such combo host
>>> versus guest? OP would like to run Xilinx ISE which is CPU/RAM hog
>>> enough even on the fastest machines so running this in Qemu, hmm...



openiked + rc.conf.local

2016-09-26 Thread Infoomatic
Hi,
I am trying to get an sit-to-site ipsec tunnel to work with openiked.
The configuration seems quite easy, testing also works.
The iked.conf is:
ikev2 "test" esp \
from 192.168.1.1 to 192.168.3.1 \
from 192.168.1.0/24 to 192.168.3.0/24 \
local 192.168.1.1 peer 192.168.3.1 \
psk thisisjustatest

The other endpoint is the passive one. 
/sbin/iked -f /etc/iked.conf -dvv
just works and shows the connection established.

However, rc.conf.local containing
iked_flags=
just keeps the box hanging:
"starting early daemons: syslogd pflogd ntpd iked"

and there is no timeout, the box cannot be reached via ssh any more.
iked_flags="-v" does not give me any information, iked_flags=YES delivers
the same behavior. Do I need some additional configuration in ipsec.conf?
"rcctl get iked" shows an "iked_timeout=30", I guess that should be the
timeout on startup, but I did not find any exact info on that.

ipsec=YES in rc.conf.local does not change anything, and appending
"ikelifetime 60" to iked.conf neither.

PF is configured to pass everything, nothing else is configured. The network
is configured with a bridge0 containing 2 interfaces of which the
external one has the (simulated) external ip address and the internal
interface has an internal ip addres, both only ipv4.
The system is Openbsd 6.0 -stable including the patches until (and
including) 006.

I am quite sure this is just a minor detail I have overseen, however,
I would really appreciate your help! Thanks!

infoomatic



Re: openiked + rc.conf.local

2016-09-26 Thread Stefan Sperling
On Mon, Sep 26, 2016 at 01:56:20PM +0200, Infoomatic wrote:
> ipsec=YES in rc.conf.local does not change anything, and appending
> "ikelifetime 60" to iked.conf neither.

ipsec=YES and /etc/ipsec.conf are for use with isakmpd.

iked does not use ipsec.conf. 

> I am quite sure this is just a minor detail I have overseen, however,
> I would really appreciate your help! Thanks!

I don't see anything obviously wrong based on what you describe.
Perhaps someone else will.

It seems you came to this list before gathering actual evidence of
what's going on. So I'd suggest you run tcpdump on your interfaces
to figure out what's going on with the IKE session when it's in that
non-working state, based on packets being passed around.
You could also enable verbose mode at the other end and check the
logs there to obtain more information.



Re: openiked + rc.conf.local

2016-09-26 Thread Infoomatic
> On Mon, Sep 26, 2016 at 01:56:20PM +0200, Infoomatic wrote:
> > ipsec=YES in rc.conf.local does not change anything, and appending
> > "ikelifetime 60" to iked.conf neither.
> 
> ipsec=YES and /etc/ipsec.conf are for use with isakmpd.
> 
> iked does not use ipsec.conf. 

that's what I thought, but wasn't quite sure so I just tried the
ipsec=YES in rc.conf.local

> It seems you came to this list before gathering actual evidence of
> what's going on. So I'd suggest you run tcpdump on your interfaces
> to figure out what's going on with the IKE session when it's in that
> non-working state, based on packets being passed around.
> You could also enable verbose mode at the other end and check the
> logs there to obtain more information.

I also tried with "-v" flags which did not write anything to
/var/log/daemon, also, the already running endpoint did not receive any
packets.



Re: openiked + rc.conf.local

2016-09-26 Thread Stefan Sperling
On Mon, Sep 26, 2016 at 02:17:35PM +0200, Infoomatic wrote:
> also, the already running endpoint did not receive any packets.

Nobody on this list can run ifconfig, route, and tcpdump on *your* box
to figure out where you're losing packets...



Re: openiked + rc.conf.local

2016-09-26 Thread Infoomatic
> On Mon, Sep 26, 2016 at 02:17:35PM +0200, Infoomatic wrote:
> > also, the already running endpoint did not receive any packets.
> 
> Nobody on this list can run ifconfig, route, and tcpdump on *your* box
> to figure out where you're losing packets...

this is not a connectivity issue.
To clarify: when I start the daemon manually as mentioned in my first mail, 
everything is fine.

However, when I try to start it automatically via rc.conf.local it just 
interrupts the boot sequence and further daemons like ssh are not started, I 
cannot even login on terminal locally. 
The same happens when I try to do a "rcctl -f start iked" (I need -f since I 
cannot use it with rc.conf.local because this leaves me with an unusable 
system)- it hangs and "ctrl+c"/ SIGNAL 15 does not give me my terminal back, I 
have to kill -9 the iked to use the terminal again where I tried to start iked 
via rcctl. 
When using iked_flags="-v", and doing "rcctl start iked" the same happens, but 
opposite to my expection I did not get _any_ logs to /var/log/daemon.

There really seems something wrong here ... this should not happen in any way.



dmesg for Lenovo Thinkpad x200 w/Libreboot

2016-09-26 Thread Scott Bonds

I have a Lenovo ThinkPad x200 running OpenBSD 6.0 with an unencrypted
drive. I flashed it to use Libreboot and then booted it up by running
this on the GRUB2 command line:

# kopenbsd -r sd0a (ahci0,openbsd1)/bsd
# boot

I haven't tested it extensively, but at first blush things seem to be
working just fine. Wifi works, X works, apmd works, brightness keys
don't seem to work. I think I need to boot to linux to update the grub
config and add OpenBSD to the boot menu, I haven't figured out a way to
do that from OpenBSD.

I'm going to try swapping in an encrypted drive from another machine and
see if I can get that booting up. Maybe I need to chain the OpenBSD
bootloader instead of using kopenbsd, we'll see. Or perhaps I can get
the install process working of a USB drive. Anyway, I'll let y'all know
once I've tried a few more things, but I thought I'd share what I have
so far.

bcced dmesg@

Here's the dmesg and sensor output:

OpenBSD 6.0 (GENERIC.MP) #2319: Tue Jul 26 13:00:43 MDT 2016
   dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4004118528 (3818MB)
avail mem = 3879006208 (3699MB)
warning: no entropy supplied by boot loader
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xbfaa0020 (9 entries)
bios0: vendor coreboot version "CBET4000 a02e567-dirty" date 08/18/2016
bios0: LENOVO 745434U
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT MCFG TCPA APIC DMAR HPET
acpi0: wakeup devices HDEF(S4) USB1(S4) USB2(S4) USB3(S4) EHC1(S4) USB4(S4) 
USB5(S4) USB6(S4) EHC2(S4) SLT1(S4) SLT2(S4) SLT3(S4) SLT6(S4) LANC(S3) 
LANR(S3) SLPB(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0 addr 0xf000, bus 0-63
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU P8700 @ 2.53GHz, 1600.33 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 3MB 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 266MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU P8700 @ 2.53GHz, 1600.06 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 3MB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEGP)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 3 (RP03)
acpiprt5 at acpi0: bus 4 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus 5 (PCIB)
acpiec0 at acpi0
acpicpu0 at acpi0
C1: bogo buffer
C2: bogo buffer
C3: bogo buffer: C1(@1 halt!), PSS
acpicpu1 at acpi0
C1: bogo buffer
C2: bogo buffer
C3: bogo buffer: C1(@1 halt!), PSS
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 99 degC
acpithinkpad0 at acpi0
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "COMPATIBLE" serial 18729 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 not present
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: LID_
"PNP0303" at acpi0 not configured
"PNP0F13" at acpi0 not configured
"WACF004" at acpi0 not configured
acpidock0 at acpi0: DOCK not docked (0)
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: LCD0
cpu0: Enhanced SpeedStep 1600 MHz: speeds: 2534, 2533, 1600, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
inteldrm0 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
drm0 at inteldrm0
intagp0 at inteldrm0
agp0 at intagp0: aperture at 0xd000, size 0x1000
inteldrm0: msi
inteldrm0: 1280x800
error: [drm:pid0:intel_pipe_config_compare] *ERROR* mismatch in 
adjusted_mode.flags(DRM_MODE_FLAG_PHSYNC) (expected 0, found 1)
pipe state doesn't match!
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M" rev 0x03: msi, address 
00:1f:16:2c:e0:df
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 2 int 16
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 17
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 2 int 18
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 2 int 18
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.0

Re: openiked + rc.conf.local

2016-09-26 Thread Stuart Henderson
On 2016-09-26, Infoomatic  wrote:
>> On Mon, Sep 26, 2016 at 02:17:35PM +0200, Infoomatic wrote:
>> > also, the already running endpoint did not receive any packets.
>> 
>> Nobody on this list can run ifconfig, route, and tcpdump on *your* box
>> to figure out where you're losing packets...
>
> this is not a connectivity issue.
> To clarify: when I start the daemon manually as mentioned in my first mail, 
> everything is fine.
>
> However, when I try to start it automatically via rc.conf.local it just 
> interrupts the boot sequence and further daemons like ssh are not started, I 
> cannot even login on terminal locally. 
> The same happens when I try to do a "rcctl -f start iked" (I need -f since I 
> cannot use it with rc.conf.local because this leaves me with an unusable 
> system)- it hangs and "ctrl+c"/ SIGNAL 15 does not give me my terminal back, 
> I have to kill -9 the iked to use the terminal again where I tried to start 
> iked via rcctl. 
> When using iked_flags="-v", and doing "rcctl start iked" the same happens, 
> but opposite to my expection I did not get _any_ logs to /var/log/daemon.
>
> There really seems something wrong here ... this should not happen in any way.
>
>

Do you get any more output if you do "rcctl -f -d start iked"?

What happens if you press ^T to get status (assuming common
shell setup)? Or if you don't get anything useful there, what
is shown in the WAIT column in top for iked? ("top -g iked" if
you have lots running and need to cut it down)

It might be useful to include your config file (obviously masking
anything sensitive, but try to avoid hiding anything that might be
important..).



Re: Displaying System Uptime via CGI script: not displayed when script is run under chroot.

2016-09-26 Thread Stuart Henderson
On 2016-09-25, Kihaguru Gathura  wrote:
> Thank you for ongoing suggestions, The web server in use is OpenBSD httpd
> and on a private network environment in perspective of security concerns.

Raul's suggestion, "A simple workaround might be to create a cron script
which writes uptime to a file once a minute", seems far saner from a
security point of view than letting anyone who can hit port 80 execute
a program.



LLVM license change

2016-09-26 Thread kbenjamin Coplon
What does the OpenBSD community think about the LLVM proposal to move to
the Apache license?

http://lists.llvm.org/pipermail/llvm-dev/2016-September/104778.html

Thank you
Benjamin Sauerhaft Coplon



Re: openiked + rc.conf.local

2016-09-26 Thread Infoomatic
> Do you get any more output if you do "rcctl -f -d start iked"?
the output is:
doing _rc_parse_conf
doing _rc_quirks
iked_flags empty, using default ><
doing _rc_parse_conf /var/run/rc.d/iked
doing _rc_quirks
doing rc_check
iked
doing rc_pre
configuration OK

and then the terminal is blocked again

> What happens if you press ^T to get status (assuming common
> shell setup)? Or if you don't get anything useful there, what
> is shown in the WAIT column in top for iked? ("top -g iked" if
> you have lots running and need to cut it down)
^T does not do anything (standard installation without further config),
top lists 4 processes, one running as root (parent) with "wait" and the other 
three processes (control, ca, ikev2) with "kqread" in the wait-column.

> It might be useful to include your config file (obviously masking
> anything sensitive, but try to avoid hiding anything that might be
> important..).
the exact configuration (does not matter if active or passive):
ikev2 "test" active esp \
from 10.85.0.0/24 to 10.86.0.0/24 \
local 10.85.0.2 peer 10.86.0.2 \
psk thisisjustatestpassword

sysctl is not touched except:
net.inet.ip.forwarding=1

Thanks in advance!



Re: openiked + rc.conf.local

2016-09-26 Thread Matt Behrens
On Sep 26, 2016, at 2:26 PM, Infoomatic  wrote:

>> Do you get any more output if you do "rcctl -f -d start iked"?

> the output is:
> doing _rc_parse_conf
> doing _rc_quirks
> iked_flags empty, using default ><
> doing _rc_parse_conf /var/run/rc.d/iked
> doing _rc_quirks
> doing rc_check
> iked
> doing rc_pre
> configuration OK
>
> and then the terminal is blocked again

This looks similar to a problem I filed a bug on; see
https://marc.info/?l=openbsd-bugs&m=147463700507932&w=2


My workaround for now is to edit /etc/rc.d/iked and uncomment the `return 0`.
The line with `${daemon} -n ${daemon_flags}` has iked do a config test, which
appears to not exit cleanly.



Re: dmesg for Lenovo Thinkpad x200 w/Libreboot

2016-09-26 Thread Scott Bonds

I'm able to boot to OpenBSD on a CDROM (well, technically an Isostick)
and install from there. I haven't had any luck with booting an OpenBSD
install where I setup full disk encryption. First I tried a whole disk
MBR install, then I tried creating an EFI volume plus an encrypted
volume. The installs went fine, I just haven't figured out how to bend
Libreboot's Grub2 to my will. Whatever I try with chainloader, I always
get the same error message: "error: unrecognised payload type."

With whole disk I tried grub commands like:

grub> chainloader (ahci0,msdos1)+1

With my EFI setup I tried:

grub> chainloader (ahci0,openbsd1)/efi/boot/bootx64.efi

I'm really just taking mostly blind stabs in the dark, as the Grub2 docs
don't have much to say, as far as I've been able to find, on
chainloader. I've read the OpenBSD FAQ on booting amd64 but didn't find
anything that switched on a light in my head as yet. I'll keep reading
docs and poking around to see if I can get it to boot. It seems so
close, having installed 'successfully' and knowing that it runs ok on an
unencrypted volume.

Someone else posted an (unanswered) question about the error message I'm
running into, implying that chainloader command might be broken for
Libreboot.  So there's that.

On 09/26, Scott Bonds wrote:

I have a Lenovo ThinkPad x200 running OpenBSD 6.0 with an unencrypted
drive. I flashed it to use Libreboot and then booted it up by running
this on the GRUB2 command line:

# kopenbsd -r sd0a (ahci0,openbsd1)/bsd
# boot

I haven't tested it extensively, but at first blush things seem to be
working just fine. Wifi works, X works, apmd works, brightness keys
don't seem to work. I think I need to boot to linux to update the grub
config and add OpenBSD to the boot menu, I haven't figured out a way to
do that from OpenBSD.

I'm going to try swapping in an encrypted drive from another machine and
see if I can get that booting up. Maybe I need to chain the OpenBSD
bootloader instead of using kopenbsd, we'll see. Or perhaps I can get
the install process working of a USB drive. Anyway, I'll let y'all know
once I've tried a few more things, but I thought I'd share what I have
so far.

bcced dmesg@

Here's the dmesg and sensor output:

OpenBSD 6.0 (GENERIC.MP) #2319: Tue Jul 26 13:00:43 MDT 2016
  dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4004118528 (3818MB)
avail mem = 3879006208 (3699MB)
warning: no entropy supplied by boot loader
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xbfaa0020 (9 entries)
bios0: vendor coreboot version "CBET4000 a02e567-dirty" date 08/18/2016
bios0: LENOVO 745434U
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT MCFG TCPA APIC DMAR HPET
acpi0: wakeup devices HDEF(S4) USB1(S4) USB2(S4) USB3(S4) EHC1(S4) USB4(S4) 
USB5(S4) USB6(S4) EHC2(S4) SLT1(S4) SLT2(S4) SLT3(S4) SLT6(S4) LANC(S3) 
LANR(S3) SLPB(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0 addr 0xf000, bus 0-63
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU P8700 @ 2.53GHz, 1600.33 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 3MB 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 266MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU P8700 @ 2.53GHz, 1600.06 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,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 3MB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEGP)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 3 (RP03)
acpiprt5 at acpi0: bus 4 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus 5 (PCIB)
acpiec0 at acpi0
acpicpu0 at acpi0
C1: bogo buffer
C2: bogo buffer
C3: bogo buffer: C1(@1 halt!), PSS
acpicpu1 at acpi0
C1: bogo buffer
C2: bogo buffer
C3: bogo buffer: C1(@1 halt!), PSS
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 99 degC
acpithinkpad0 at acpi0
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "COMPATIBLE" serial 18729 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 not present
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: LID_
"PNP0303" at acpi0 not configured
"PNP0F13" at acpi0 

missing punctuation in hifn.4 and hardclock.9

2016-09-26 Thread Rob Pierce
Stumbled across these in my travels.

Rob

Index: man4/hifn.4
===
RCS file: /cvs/src/share/man/man4/hifn.4,v
retrieving revision 1.50
diff -u -p -r1.50 hifn.4
--- man4/hifn.4 10 Dec 2015 21:00:51 -  1.50
+++ man4/hifn.4 27 Sep 2016 04:27:25 -
@@ -36,7 +36,7 @@
 The
 .Nm
 driver supports various cards containing the Hifn 7751, Hifn 7811, Hifn 7951,
-Hifn 7955, Hifn 7956, or Hifn 9751 chipsets, such as
+Hifn 7955, Hifn 7956, or Hifn 9751 chipsets, such as:
 .Bl -tag -width namenamenamena -offset indent
 .It Invertex AEON
 Comes as 128KB SRAM model, or 2MB DRAM model.

Index: man9/hardclock.9
===
RCS file: /cvs/src/share/man/man9/hardclock.9,v
retrieving revision 1.11
diff -u -p -r1.11 hardclock.9
--- man9/hardclock.93 Apr 2016 06:43:59 -   1.11
+++ man9/hardclock.927 Sep 2016 04:27:39 -
@@ -47,7 +47,7 @@ is an opaque, machine dependent structur
 previous machine state.
 .Pp
 .Fn hardclock
-performs a variety of time related housekeeping tasks, such as
+performs a variety of time related housekeeping tasks, such as:
 .Bl -bullet -offset indent
 .It
 If the current process has virtual or profiling interval



No free discspace after deleting files

2016-09-26 Thread Marco Prause
Hi all,

I met an interesting problem while deleting files that makes me curious.

After deleting two files for preparing an update in a flashrd-setup
(openbsd.vnd + bsd) I would have expected the ~1,2 GB beeing freed.

The files are gone - so far so good, but the disc space is not free.

I know this behaviour, if a process is still sitting on the file, but
with fstat I can't see any process or open file handler.

Now I'm just curious if I miss something and probably I just need a bit
more coffee ;-)


# df -h
Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/rd0a  1.8M1.4M419K77%/
/dev/sd0a  1.8G872M878M50%/flash
/dev/vnd0e15.4M5.0M   10.3M32%/etc
/dev/vnd0f42.1M   14.6M   27.0M35%/sbin
/dev/vnd0a48.3M6.0K   47.8M 0%/root
/dev/vnd0d16.4M5.8M   10.4M36%/bin
/dev/vnd0g 1.1G735M347M68%/usr
tmpfs 64.0M   61.5M2.5M96%/var
tmpfs 50.0M4.0K   50.0M 0%/home
tmpfs 16.0M4.0K   16.0M 0%/tmp
/dev/sd0d 10.9G616M9.7G 6%/data
#
# du -hs /flash/
68.9M   /flash/
#
# mount
/dev/rd0a on / type ffs (local)
/dev/sd0a on /flash type ffs (local, noatime, nodev, nosuid)
/dev/vnd0e on /etc type ffs (local, noatime, nodev, nosuid, read-only)
/dev/vnd0f on /sbin type ffs (local, noatime, nodev, read-only)
/dev/vnd0a on /root type ffs (local, noatime, nodev, nosuid, read-only)
/dev/vnd0d on /bin type ffs (local, noatime, nodev, nosuid, read-only)
/dev/vnd0g on /usr type ffs (local, noatime, nodev, read-only)
tmpfs on /var type tmpfs (local, noatime, nodev, nosuid)
tmpfs on /home type tmpfs (local, noatime, nodev, nosuid)
tmpfs on /tmp type tmpfs (local, noatime, nodev, nosuid)
/dev/sd0d on /data type ffs (local)
#
# iostat 1 10
  tty  sd0   rd0   sd1
sd2 cpu
 tin tout  KB/t  t/s  MB/s   KB/t  t/s  MB/s   KB/t  t/s  MB/s   KB/t
t/s  MB/s  us ni sy in id
   01 15.280  0.00   0.000  0.00   6.090  0.00   0.00
0  0.00   0  0  1  1 98
   0  294  0.000  0.00   0.000  0.00   0.000  0.00   0.00
0  0.00   0  0  1  3 96
   0   97  0.000  0.00   0.000  0.00   0.000  0.00   0.00
0  0.00   0  0  2  3 95
   0   97  0.000  0.00   0.000  0.00   0.000  0.00   0.00
0  0.00   0  0  1  1 98
   0   98  0.000  0.00   0.000  0.00   0.000  0.00   0.00
0  0.00   0  0  0  0100
   0   96  0.000  0.00   0.000  0.00   0.000  0.00   0.00
0  0.00   1  0  1  2 96
   0   98  0.000  0.00   0.000  0.00   0.000  0.00   0.00
0  0.00   0  0  0  1 99
   0   97  0.000  0.00   0.000  0.00   0.000  0.00   0.00
0  0.00   0  0  2  1 97
   0   97  0.000  0.00   0.000  0.00   0.000  0.00   0.00
0  0.00   0  0  0  1 99
   0   96  0.000  0.00   0.000  0.00   0.000  0.00   0.00
0  0.00   2  0  0  3 95
#
# uname -a

OpenBSD gw.idst 5.9 FLASHRD.MP#2 amd64
#
# dmesg

OpenBSD 5.9-stable (FLASHRD.MP) #2: Wed Aug 17 17:48:07 CEST 2016

r...@openbsd-59-amd64-build.my.domain:/usr/src/sys/arch/amd64/compile/FLASHRD.MP
real mem = 2098520064 (2001MB)
avail mem = 2028883968 (1934MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7e16d820 (6 entries)
bios0: vendor coreboot version "SageBios_PCEngines_APU-45" date 04/05/2014
bios0: PC Engines APU
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP SPCR HPET APIC HEST SSDT SSDT SSDT
acpi0: wakeup devices AGPB(S4) HDMI(S4) PBR4(S4) PBR5(S4) PBR6(S4)
PBR7(S4) PE20(S4) PE21(S4) PE22(S4) PE23(S4) PIBR(S4) UOH1(S3) UOH2(S3)
UOH3(S3) UOH4(S3) UOH5(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD G-T40E Processor, 1000.13 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,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 16-way L2 cache
cpu0: 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD G-T40E Processor, 1000.00 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
64b/line 16-way L2 cache
cpu1: 8 4MB entries fully as

Re: No free discspace after deleting files

2016-09-26 Thread Raul Miller
Do any processes have those files open? Did you have any hard links to
those files from other names?

The disk space cannot be removed until all references to those files
are removed.

-- 
Raul

On Tue, Sep 27, 2016 at 2:24 AM, Marco Prause  wrote:
> Hi all,
>
> I met an interesting problem while deleting files that makes me curious.
>
> After deleting two files for preparing an update in a flashrd-setup
> (openbsd.vnd + bsd) I would have expected the ~1,2 GB beeing freed.
>
> The files are gone - so far so good, but the disc space is not free.
>
> I know this behaviour, if a process is still sitting on the file, but
> with fstat I can't see any process or open file handler.
>
> Now I'm just curious if I miss something and probably I just need a bit
> more coffee ;-)
>
>
> # df -h
> Filesystem SizeUsed   Avail Capacity  Mounted on
> /dev/rd0a  1.8M1.4M419K77%/
> /dev/sd0a  1.8G872M878M50%/flash
> /dev/vnd0e15.4M5.0M   10.3M32%/etc
> /dev/vnd0f42.1M   14.6M   27.0M35%/sbin
> /dev/vnd0a48.3M6.0K   47.8M 0%/root
> /dev/vnd0d16.4M5.8M   10.4M36%/bin
> /dev/vnd0g 1.1G735M347M68%/usr
> tmpfs 64.0M   61.5M2.5M96%/var
> tmpfs 50.0M4.0K   50.0M 0%/home
> tmpfs 16.0M4.0K   16.0M 0%/tmp
> /dev/sd0d 10.9G616M9.7G 6%/data
> #
> # du -hs /flash/
> 68.9M   /flash/
> #
> # mount
> /dev/rd0a on / type ffs (local)
> /dev/sd0a on /flash type ffs (local, noatime, nodev, nosuid)
> /dev/vnd0e on /etc type ffs (local, noatime, nodev, nosuid, read-only)
> /dev/vnd0f on /sbin type ffs (local, noatime, nodev, read-only)
> /dev/vnd0a on /root type ffs (local, noatime, nodev, nosuid, read-only)
> /dev/vnd0d on /bin type ffs (local, noatime, nodev, nosuid, read-only)
> /dev/vnd0g on /usr type ffs (local, noatime, nodev, read-only)
> tmpfs on /var type tmpfs (local, noatime, nodev, nosuid)
> tmpfs on /home type tmpfs (local, noatime, nodev, nosuid)
> tmpfs on /tmp type tmpfs (local, noatime, nodev, nosuid)
> /dev/sd0d on /data type ffs (local)
> #
> # iostat 1 10
>   tty  sd0   rd0   sd1
> sd2 cpu
>  tin tout  KB/t  t/s  MB/s   KB/t  t/s  MB/s   KB/t  t/s  MB/s   KB/t
> t/s  MB/s  us ni sy in id
>01 15.280  0.00   0.000  0.00   6.090  0.00   0.00
> 0  0.00   0  0  1  1 98
>0  294  0.000  0.00   0.000  0.00   0.000  0.00   0.00
> 0  0.00   0  0  1  3 96
>0   97  0.000  0.00   0.000  0.00   0.000  0.00   0.00
> 0  0.00   0  0  2  3 95
>0   97  0.000  0.00   0.000  0.00   0.000  0.00   0.00
> 0  0.00   0  0  1  1 98
>0   98  0.000  0.00   0.000  0.00   0.000  0.00   0.00
> 0  0.00   0  0  0  0100
>0   96  0.000  0.00   0.000  0.00   0.000  0.00   0.00
> 0  0.00   1  0  1  2 96
>0   98  0.000  0.00   0.000  0.00   0.000  0.00   0.00
> 0  0.00   0  0  0  1 99
>0   97  0.000  0.00   0.000  0.00   0.000  0.00   0.00
> 0  0.00   0  0  2  1 97
>0   97  0.000  0.00   0.000  0.00   0.000  0.00   0.00
> 0  0.00   0  0  0  1 99
>0   96  0.000  0.00   0.000  0.00   0.000  0.00   0.00
> 0  0.00   2  0  0  3 95
> #
> # uname -a
>
> OpenBSD gw.idst 5.9 FLASHRD.MP#2 amd64
> #
> # dmesg
>
> OpenBSD 5.9-stable (FLASHRD.MP) #2: Wed Aug 17 17:48:07 CEST 2016
>
> r...@openbsd-59-amd64-build.my.domain:/usr/src/sys/arch/amd64/compile/FLASHRD.MP
> real mem = 2098520064 (2001MB)
> avail mem = 2028883968 (1934MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7e16d820 (6 entries)
> bios0: vendor coreboot version "SageBios_PCEngines_APU-45" date 04/05/2014
> bios0: PC Engines APU
> acpi0 at bios0: rev 0
> acpi0: sleep states S0 S1 S3 S4 S5
> acpi0: tables DSDT FACP SPCR HPET APIC HEST SSDT SSDT SSDT
> acpi0: wakeup devices AGPB(S4) HDMI(S4) PBR4(S4) PBR5(S4) PBR6(S4)
> PBR7(S4) PE20(S4) PE21(S4) PE22(S4) PE23(S4) PIBR(S4) UOH1(S3) UOH2(S3)
> UOH3(S3) UOH4(S3) UOH5(S3) [...]
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpihpet0 at acpi0: 14318180 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD G-T40E Processor, 1000.13 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,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
> cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 512KB
> 64b/line 16-way L2 cache
> cpu0: 8 4MB entries fully associative
> cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 199MHz
> cpu0: mwait min=64