Re: disklabel and df -h don't show same size

2024-03-03 Thread Erling Westenvik
On Sun, Mar 03, 2024 at 12:14:14PM -, beecdadd...@danwin1210.de wrote:
> On Sun, March 3, 2024 12:07 pm, Otto Moerbeek wrote:
> > On Sun, Mar 03, 2024 at 12:01:12PM -, beecdadd...@danwin1210.de
> > wrote:
> >
> >
> >> oh okay reserved for root? I ran those commands as root, or you mean
> >> something else? I didn't know overhead was that big.. so this is okay,
> >> then? thanks for very fast reply
> >
> > 3.5G meta data overhead is less than 1.5% of your partition. Not that
> > high, I'd say.
> 
> 235-223 is 8G, not 3.5G?
> 
> > Only root processes can write crossing the reserved space limit. The
> > disk will than show a Capacity number larger than 100%.
> 
> so root process, not root user? ok
> 
> > Non-root proceses will see failed writes.
> >
> >
> > You can change that 5% by using tunefs, or when doing newfs from the
> > start).
> >
> > -Otto
> 
> newfs from the start? I did newfs from the start?
> https://www.openbsd.org/faq/faq14.html#softraidcrypto
> is this not what you mean by newfs from the start?

No. He means by specifying the -m option when running newfs(8). See the
man page for newfs(8).
(You probably don't want to DO that (give non-root processes access to
fill up every last free sector of your disk) but you CAN..)

Also, by running disklabel and df with the -h option, you get sizes in
"human readable format" which doesn't neccessarily give you an accurate
understandig of your disks and partitions.
The "real" or "underlying" unit is sectors, which you will see if you
run df(1) and disklabel(8) without -f.

Regards,

Erling

> 
> >
> >>
> >> On Sun, March 3, 2024 11:57 am, Otto Moerbeek wrote:
> >>
> >>> On Sun, Mar 03, 2024 at 11:48:01AM -, beecdadd...@danwin1210.de
> >>> wrote:
> >>>
> >>>
> >>>
> 
>  disklabel -h sd3 shows this
> 
>  # /dev/rsd3c:
>  type: SCSI
>  disk: SCSI disk
>  label: SR CRYPTO
>  duid: some-number
>  flags:
>  bytes/sector: 512
>  sectors/track: 63
>  tracks/cylinder: 255
>  sectors/cylinder: 16065
>  cylinders: 31130
>  total sectors: 500117600 # total bytes: 238.5G boundstart: 64
>  boundend: 500117600
> 
> 
> 
>  16 partitions:
>  #size   offset  fstype [fsize bsize   cpg]
>  c:   238.5G0  unused
>  i:   238.5G   64  4.2BSD   4096 32768 26062 #
>  /mnt/extssd
> 
> 
> 
>  but df -h shows that sd3i is of size 235G but only 223G is
>  available, and the Used space is 4.0k.. SSD is new and I followed
> 
> >>>
> >>> A fileystem has meta data overhead. That space is not avalailable for
> >>>  user files. Also, by default 5% of available space is reserved for
> >>> root only. That fraction is represented in available space. See
> >>> newfs(8).
> >>>
> >>> -Otto
> >>>
> >>>
> >>>
> >>
> >>
> >
> 
> 



Re: HP EliteDesk 800 G5 Mini compatibility

2023-12-29 Thread Erling Westenvik
On Thu, Dec 28, 2023 at 03:07:21PM +0100, Nowarez Market wrote:
> Hello,
> 
> I have less than an half possibility to buy an HP EliteDesk 800 G5 Mini ( i5 
> 9500T ) at some good conditions.

I have a 800 G4 at a co-location setup as a server. Neat little box with
i5 8500T and 32GB RAM.

A really cool thing is that it sports two PCIe slots for two 2280 NVMe
disks in RAID 1, AND a SATA-connector for a 2.5" SSD. Thats three disks
in a very little space!

And there's a third PCIe slot for lets say a WiFi-card. (Antenna wires are
already in place.) Perhaps even a tiny fourth SSD/NVMe?

Can't say know how it will work as a desktop computer though. But
inteldrm graphics and azalia sound is usually straightforward anyway.

Dmesg below.

Cheers

Erling


OpenBSD 7.2 (GENERIC.MP) #6: Sat Jan 21 01:03:04 MST 2023

r...@syspatch-72-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 34097733632 (32518MB)
avail mem = 33046937600 (31516MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.1 @ 0xc381c000 (63 entries)
bios0: vendor HP version "Q21 Ver. 02.21.00" date 09/16/2022
bios0: HP HP EliteDesk 800 G4 DM 35W (TAA)
acpi0 at bios0: ACPI 6.1
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT SSDT SSDT HPET APIC MCFG MSDM SLIC WSMT SSDT SSDT 
SSDT LPIT WSMT SSDT SSDT TPM2 UEFI OEML SSDT DMAR SSDT SSDT SSDT ASF! FPDT BGRT
acpi0: wakeup devices GLAN(S4) XHC_(S3) XDCI(S4) HDAS(S4) RP01(S4) PXSX(S4) 
RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) 
RP06(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 2399 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-8500T CPU @ 2.10GHz, 1995.35 MHz, 06-9e-0a
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,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 
4-way L2 cache, 9MB 64b/line 12-way L3 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.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-8500T CPU @ 2.10GHz, 1995.35 MHz, 06-9e-0a
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,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 
4-way L2 cache, 9MB 64b/line 12-way L3 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5-8500T CPU @ 2.10GHz, 1995.35 MHz, 06-9e-0a
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,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu2: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 
4-way L2 cache, 9MB 64b/line 12-way L3 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i5-8500T CPU @ 2.10GHz, 1995.35 MHz, 06-9e-0a
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,TSC_ADJUST,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu3: 32KB 64b/line 8-way D-cache, 

dhclient/autoconf in singleuser vs. ramdisk kernel

2023-03-07 Thread Erling Westenvik
Hi,

When booting bsd.rd I can do:

# ifconfig  inet autoconf

and it will negotiate a working IP and gateway setup from my DHCP
server.

However, when booting 'boot -s' (singleuser) the only way to have a
working IP and gateway setup is to specify it manually by entering the
specific relevant values, like:

# ifconfig  12.34.56.78 0xff00
# route add default 12.34.56.1

Neither 'dhclient ' or 'ifconfig  inet autoconf' works.

What am I missing?

(The DHCP server assigns IP adresses based on MAC adresses. Not having
to "invent"/remember IP adresses for various machines would be
convenient)

Regards,

Erling



[Solved] Re: How to produce statically linked sshd binary

2023-02-28 Thread Erling Westenvik
Thanks everyone,

After some friendly advice off-list I was able to solve the problem. It
was very simple really.
However, since it is dubious practice at best, and runs contrary to the
OpenBSD project goals, it feels wrong to share the "solution" here.
Anyone interested may contact me off-list.

Best Regards,

Erling

On Tue, Feb 28, 2023 at 04:42:53AM +0100, Erling Westenvik wrote:
> Hi!
> In the past, at least into several 6.x releases, I was able to produce a
> statically linked sshd(8) binary like this:
> 
> # cd /usr/src/usr.bin/ssh
> # make clean
> # make LDSTATIC=-static lib sshd
> # strip /usr/src/usr.bin/ssh/sshd/sshd
> 
> On a fresh 7.2 install however, the above won't do anymore.
> 
> (It stops dead complaining about the "lib"-part in LDSTATIC=. When
> trying without "lib" it goes on for a while but ends with complaints
> about malloc-something. As you probabley understand by now, I'm not
> exactly a wizard.. : )
> 
> Anyone up for outlining a simple "how-to"?
> 
> Kind regards,
> 
> Erling



Re: How to produce statically linked sshd binary

2023-02-28 Thread Erling Westenvik
Thanks. And I "know"..

Use case: sshd in single user on quasi FDE-encrypted servers on co-location not
accessible via KVM/AMT. I've done this on many machines since 2014.

I acknowledge that it isn't recommended practice (and definitely not
supported!) but if anyone should want to help out, feel free to contact me
off-list!

Best regards

Erling

On Mon, Feb 27, 2023 at 09:09:02PM -0700, Theo de Raadt wrote:
> Oh my god, don't do that!
> 
> Your program will have a single aspect of randomness.
> 
> If you leave it as it is, it has 6 .so's with independent random placement,
> and 4 of them (sshd, ld.so, libc.so, and libcrypto.so) are randomly linked
> at boot.
> 
> These independent randomness are an incomplete but strong mitigation
> against ROP attack methods.
> 
> What you are trying to do is counter productive.
>
> Erling Westenvik  wrote:
> 
> > Hi!
> > In the past, at least into several 6.x releases, I was able to produce a
> > statically linked sshd(8) binary like this:
> > 
> > # cd /usr/src/usr.bin/ssh
> > # make clean
> > # make LDSTATIC=-static lib sshd
> > # strip /usr/src/usr.bin/ssh/sshd/sshd
> > 
> > On a fresh 7.2 install however, the above won't do anymore.
> > 
> > (It stops dead complaining about the "lib"-part in LDSTATIC=. When
> > trying without "lib" it goes on for a while but ends with complaints
> > about malloc-something. As you probabley understand by now, I'm not
> > exactly a wizard.. : )
> > 
> > Anyone up for outlining a simple "how-to"?
> > 
> > Kind regards,
> > 
> > Erling
> > 



How to produce statically linked sshd binary

2023-02-27 Thread Erling Westenvik
Hi!
In the past, at least into several 6.x releases, I was able to produce a
statically linked sshd(8) binary like this:

# cd /usr/src/usr.bin/ssh
# make clean
# make LDSTATIC=-static lib sshd
# strip /usr/src/usr.bin/ssh/sshd/sshd

On a fresh 7.2 install however, the above won't do anymore.

(It stops dead complaining about the "lib"-part in LDSTATIC=. When
trying without "lib" it goes on for a while but ends with complaints
about malloc-something. As you probabley understand by now, I'm not
exactly a wizard.. : )

Anyone up for outlining a simple "how-to"?

Kind regards,

Erling



Re: Lightweight Web browser

2022-12-28 Thread Erling Westenvik
On Mon, Dec 26, 2022 at 07:50:26AM +, Rodrigo Readi wrote:
> Can someone recommend a lightweight Browser that support javascript?
> In which I can use gmail?

I'm occasionally using vimb(1) in ports/packages for this. Been a while
since my last gmail session but I tested it now and it works great.

As for «lightweight» it is WebKit and running multiple instances will
use resources accordingly, but for the ad-hoc session it is a great
alternative to launching a fully fledged chrome/firefox session that
spawns multiple windows with the hundred of tabs you left open the last
time you used it.

> Otter browser hangs and even make core dumping with gmail.
> Also with chromium I get core dumping sometimes.

Vimb hangs now and then (most things do on OpenBSD..) but I think core
dumps are seldom.

Kind regards,

Erling

> There is no port for elinks to test it.
> 
> I need such a think till I get alpine 2.26 working in OpenBSD.
> It does not compile with libssl, it compiles with openssl, but cert
> verification fails.
> 



Re: Broken softraid0

2022-09-08 Thread Erling Westenvik
On Wed, Sep 07, 2022 at 09:13:12PM +0200, Danny Koenig wrote:
> 
> 
> On Wed, 2022-09-07 at 19:24 +0200, Danny Koenig wrote:
> > On Wed, 2022-09-07 at 18:18 +0100, Zé Loff wrote:
> > > 
> > > On Wed, Sep 07, 2022 at 06:14:59PM +0100, Zé Loff wrote:
> > > > On Wed, Sep 07, 2022 at 06:42:54PM +0200, Danny König wrote:
> > > > > Hi,
> > > > >  
> > > > > first time I need your support regarding a broken softraid0.
> > > > > After a
> > > > > normal reboot the softraid0 (RAID 1, two disks sd0 and sd1,
> > > > > softraid0
> > > > > as sd5) was broken what means no mounts, no nothing.
> > > > > 
> > > > >  
> > > > > root@core-fs:~ => disklabel -p g /dev/sd0c 
> > > > > # /dev/sd0c: 
> > > > > type: SCSI 
> > > > > disk: SCSI disk 
> > > > > label: ST16000NM003G-2K 
> > > > > duid: b1c256d6dc122fa7 
> > > > > flags: 
> > > > > bytes/sector: 512 
> > > > > sectors/track: 63 
> > > > > tracks/cylinder: 255 
> > > > > sectors/cylinder: 16065 
> > > > > cylinders: 1945332 
> > > > > total sectors: 31251759104 # total bytes: 14902.0G 
> > > > > boundstart: 0 
> > > > > boundend: 31251759104 
> > > > > drivedata: 0
> > > > > 16 partitions: 
> > > > > # size offset fstype [fsize bsize cpg] 
> > > > > a: 14902.0G 0 RAID 
> > > > > c: 14902.0G 0 unused
> > > > > 
> > > > > 
> > > > > 
> > > > > root@core-fs:~ => disklabel -p g /dev/sd1c 
> > > > > # /dev/sd1c: 
> > > > > type: SCSI 
> > > > > disk: SCSI disk 
> > > > > label: ST16000NM003G-2K 
> > > > > duid: acedcb2d1684fb18 
> > > > > flags: 
> > > > > bytes/sector: 512 
> > > > > sectors/track: 63 
> > > > > tracks/cylinder: 255 
> > > > > sectors/cylinder: 16065 
> > > > > cylinders: 1945332 
> > > > > total sectors: 31251759104 # total bytes: 14902.0G 
> > > > > boundstart: 0 
> > > > > boundend: 31251759104 
> > > > > drivedata: 0
> > > > > 16 partitions: 
> > > > > # size offset fstype [fsize bsize cpg] 
> > > > > a: 14902.0G 0 RAID 
> > > > > c: 14902.0G 0 unused 
> > > > > 
> > > > > 
> > > > > 
> > > > > root@core-fs:~ => disklabel -p g /dev/sd5c 
> > > > > # /dev/sd5c:
> > > > > type: SCSI
> > > > > disk: SCSI disk
> > > > > label: SR RAID 1
> > > > > duid: 
> > > > > flags:
> > > > > bytes/sector: 512
> > > > > sectors/track: 255
> > > > > tracks/cylinder: 511
> > > > > sectors/cylinder: 130305
> > > > > cylinders: 239835
> > > > > total sectors: 31251758576 # total bytes: 14902.0G
> > > > > boundstart: 0
> > > > > boundend: 31251758576
> > > > > drivedata: 0 
> > > > > 
> > > > > 16 partitions:
> > > > > #    size   offset  fstype [fsize bsize  
> > > > > cpg]
> > > > >   c: 14902.0G    0  unused
> > > > > 
> > > > > 
> > > > > 
> > > > >  
> > > > > root@core-fs:~ => bioctl softraid0 
> > > > > Volume Status Size Device 
> > > > > softraid0 0 Online 16000900390912 sd5 RAID1 
> > > > > 0 Online 16000900390912 0:0.0 noencl  
> > > > > 1 Online 16000900390912 0:1.0 noencl 
> > > > > 
> > > > > 
> > > > >  
> > > > > Thats what we got, but no mounts are possible.
> > > > >  
> > > > > Any ideas how to become the data back available?
> > > > >  
> > > > > Thank you very much.
> > > > >  
> > > > > Regards,
> > > > > Danny
> > > > > 
> > > > 
> > > > sd5's disklabel looks pretty empty (duid included), but you
> > > > already
> > > > know
> > > > that...
> > > > Do you have a backup disklabel, e.g., in /var/backups?
> > 
> > 
> > Yes, that's the output:
> > 
> > # /dev/rsd5c:
> > type: SCSI
> > disk: SCSI disk
> > label: SR RAID 1C
> > duid: 1c318a61d9aa3255
> > flags:
> > bytes/sector: 512
> > sectors/track: 63
> > tracks/cylinder: 255
> > sectors/cylinder: 16065
> > cylinders: 1945331
> > total sectors: 31251758576
> > boundstart: 0
> > boundend: 31251758576
> > drivedata: 0 
> > 
> > 16 partitions:
> > #    size   offset  fstype [fsize bsize   cpg]
> >   c:  31251758576    0  4.2BSD   2048 16384 12960
> > 
> 
> Restored from /var/backups/disklabel.sd5.current by using "disklabel -e
> sd5" as recommended. Sadly this didn't changed anything. Still can't
> mount.
> 
> Current state:
> 
> root@core-fs:~ => disklabel sd5c  
> # /dev/rsd5c:
> type: SCSI
> disk: SCSI disk
> label: SR RAID 1C
> duid: 2765b6ceb44e92fb
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 1945331
> total sectors: 31251758576
> boundstart: 0
> boundend: 31251758576
> drivedata: 0 
> 
> 16 partitions:
> #size   offset  fstype [fsize bsize   cpg]
>   c:  312517585760  4.2BSD   2048 16384 12960
> 
> 
> Any suggestions?
> 
> Just wondering about the size of 32 TB. Can this be correct? It should
> be RAID 1, two disks with each a size of 16 TB.
> 

It is correct. Those are sectors, not bytes. See the "total sectors"-line
in your disklabel output. If you run

# disklabel -p t sd5

it should report 14.55 TB (which equals 16 TiB).

(The option "-p t" means "print disklabel using unit t(erabyte)".)


Swap on SSD's (with softraid 1+C)

2022-09-07 Thread Erling Westenvik
Hello,

I'm making the transition from SATA to SSD. A late bloomer.. My setup
for years have been a semi-FDE softraid on two physical disks, sd0 and
sd1, where the sd0a and sd1a chunks make up a RAID 1 volume sd2. sd2
contains an unencrypted root partition, sd2a, and the remainder of the
filesystems reside in sd2p -- a CRYPTO partition that decrypts to sd3
and where sd3b constitutes swap (sysctl vm.swapencrypt.enable=0).

(I don't encrypt root because I need to be able to reboot and decrypt
the machine from remote locations but lack any sort of KVM, thus I have
a somewhat elaborous setup involving a statically compiled sshd "daemon"
that is invoked from /etc/rc.)

My question is: Should I let swap be outside RAID altogether? Like
"directly" on the physical disks as in sd0b and sd1b? I mean, why have
softraid waste CPU cycles making swap content (if any) redundant? What
do you people do?

(Follow up question as for swap sizing: In the age of 32+ GB RAM, do
you people really follow the recommendations on having swap at least
twice the amount of RAM? I'm hoping for 72GB RAM and that would steal
144GB of my 525GB disks, something that seems ridiculous.)

Kind regards

Erling



Re: Is OpenBSD suited for old Dell Precision T5500 (Dual Xeon X5675, 72GB RAM)

2022-09-07 Thread Erling Westenvik
On Wed, Sep 07, 2022 at 01:16:50PM +0100, Tom Smyth wrote:
> Hi Erling,
> 
> it depends do you mean soft raid, that will be either  AHCI  using intel
> driver or LSI  Raid emulation (where you can onfigure the raid in the
> option rom (after POST  just before the OS Boots)  it depneds on the
> chipset setup ...

Thanksn. And good question. I meant (and specified) softraid. The
machine has RAID options in BIOS but I have simply "standardized" on
using softraid on all hardware over the years.  

Are there gains (performance- or stability wise) in letting the hardware
do the RAID 1 mirroring instead of softraid?

Erling


> Dell may put  the LIS as a PERC,  it also may be a separate card or i/o
> module to the onboard sata ...
> Hope this helps
> 
> 
> On Wed, 7 Sept 2022 at 12:19, Erling Westenvik 
> wrote:
> 
> > On Wed, Sep 07, 2022 at 11:41:49AM +0100, Tom Smyth wrote:
> > > hi
> > >
> > > i would check bios / firmware settings
> > >
> > > try disabling memory mapped i/o in bios
> > >
> > > check processor settings enable vt-d disable hyper threading ensure
> > execute
> > > disable is enabled
> > >
> > > update the bios as it will update cpu microcode ...
> >
> > Great. Thanks, Tom.
> >
> > > dell alow you to select the emulation of sata
> > > ahci vs raid vs sata vs legacy
> >
> > For 2 x 525GB SSD's in RAID (softraid) 1, that setting would be...?
> >
> > Erling
> >
> > >
> > > On Wed 7 Sep 2022, 03:02 Erling Westenvik, 
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > A friend donated an old Dell Precision T5500 workstation, a heavy
> > > > bastard with dual Xeon X5675 and 72GB RAM which still packs a punch I
> > > > believe. At least it does for me. I would like it to replace my old i7
> > > > 3770k. However, I'm starting to have doubts:
> > > >
> > > > 1) On initial boot (with 7.1 release, on a usb stick) it more or less
> > > > immediately panicked into ddb when I tried to pipe dmesg into a file on
> > > > the usb stick. I took out the NVMe-card, and whether or not that was
> > the
> > > > problem the machine anyhow behaved better long enough for me to get
> > > > network and do a fw_update.
> > > >
> > > > 2) After fw_update the radeondrm was detected and I got a nice
> > 2560x1600
> > > > console. However, before it would give me a login prompt the machine
> > got
> > > > stuck with repeating complaints about "ehci_device_clear_toggle: queue
> > > > active". So – USB related, right?  Very well! Out with the usb stick,
> > in
> > > > with an old SSD with OpenBSD 6.7.
> > > >
> > > > 3) The machine behaves better, xenodm starts fine with cwm, but it
> > won't
> > > > resume after suspend (zzz).
> > > >
> > > > Some or all of the above problems may have solutions, trivial or not,
> > > > but more problems may perhaps lurk under the surface..?
> > > >
> > > > So I guess my question is if someone knows whether these Dell machines
> > > > are known to be error prone in general, or problematic with OpenBSD in
> > > > particular, and if I should stop before wasting time!?
> > > >
> > > > Sincerely,
> > > >
> > > > Erling
> > > >
> > > > OpenBSD 7.1 (GENERIC.MP) #465: Mon Apr 11 18:03:57 MDT 2022
> > > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/
> > GENERIC.MP
> > > > real mem = 77290508288 (73709MB)
> > > > avail mem = 74930786304 (71459MB)
> > > > random: good seed from bootblocks
> > > > mpath0 at root
> > > > scsibus0 at mpath0: 256 targets
> > > > mainbus0 at root
> > > > bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xf0450 (102 entries)
> > > > bios0: vendor Dell Inc. version "A18" date 10/15/2018
> > > > bios0: Dell Inc. Precision WorkStation T5500
> > > > acpi0 at bios0: ACPI 3.0
> > > > acpi0: sleep states S0 S3 S4 S5
> > > > acpi0: tables DSDT FACP SSDT APIC BOOT ASF! MCFG HPET TCPA  _RAT
> > SLIC
> > > > SSDT
> > > > acpi0: wakeup devices VBTN(S4) PCI0(S5) PCI1(S5) PCI2(S5) PCI3(S5)
> > > > PCI5(S5) PCI6(S5) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3)
> > > > PCI8(S5) PCIA(S5) PCIB(S5)
> > > > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> >

Re: Is OpenBSD suited for old Dell Precision T5500 (Dual Xeon X5675, 72GB RAM)

2022-09-07 Thread Erling Westenvik
On Wed, Sep 07, 2022 at 11:41:49AM +0100, Tom Smyth wrote:
> hi
> 
> i would check bios / firmware settings
> 
> try disabling memory mapped i/o in bios
> 
> check processor settings enable vt-d disable hyper threading ensure execute
> disable is enabled
> 
> update the bios as it will update cpu microcode ...

Great. Thanks, Tom.

> dell alow you to select the emulation of sata
> ahci vs raid vs sata vs legacy

For 2 x 525GB SSD's in RAID (softraid) 1, that setting would be...?

Erling

> 
> On Wed 7 Sep 2022, 03:02 Erling Westenvik, 
> wrote:
> 
> > Hello,
> >
> > A friend donated an old Dell Precision T5500 workstation, a heavy
> > bastard with dual Xeon X5675 and 72GB RAM which still packs a punch I
> > believe. At least it does for me. I would like it to replace my old i7
> > 3770k. However, I'm starting to have doubts:
> >
> > 1) On initial boot (with 7.1 release, on a usb stick) it more or less
> > immediately panicked into ddb when I tried to pipe dmesg into a file on
> > the usb stick. I took out the NVMe-card, and whether or not that was the
> > problem the machine anyhow behaved better long enough for me to get
> > network and do a fw_update.
> >
> > 2) After fw_update the radeondrm was detected and I got a nice 2560x1600
> > console. However, before it would give me a login prompt the machine got
> > stuck with repeating complaints about "ehci_device_clear_toggle: queue
> > active". So – USB related, right?  Very well! Out with the usb stick, in
> > with an old SSD with OpenBSD 6.7.
> >
> > 3) The machine behaves better, xenodm starts fine with cwm, but it won't
> > resume after suspend (zzz).
> >
> > Some or all of the above problems may have solutions, trivial or not,
> > but more problems may perhaps lurk under the surface..?
> >
> > So I guess my question is if someone knows whether these Dell machines
> > are known to be error prone in general, or problematic with OpenBSD in
> > particular, and if I should stop before wasting time!?
> >
> > Sincerely,
> >
> > Erling
> >
> > OpenBSD 7.1 (GENERIC.MP) #465: Mon Apr 11 18:03:57 MDT 2022
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > real mem = 77290508288 (73709MB)
> > avail mem = 74930786304 (71459MB)
> > random: good seed from bootblocks
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xf0450 (102 entries)
> > bios0: vendor Dell Inc. version "A18" date 10/15/2018
> > bios0: Dell Inc. Precision WorkStation T5500
> > acpi0 at bios0: ACPI 3.0
> > acpi0: sleep states S0 S3 S4 S5
> > acpi0: tables DSDT FACP SSDT APIC BOOT ASF! MCFG HPET TCPA  _RAT SLIC
> > SSDT
> > acpi0: wakeup devices VBTN(S4) PCI0(S5) PCI1(S5) PCI2(S5) PCI3(S5)
> > PCI5(S5) PCI6(S5) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3)
> > PCI8(S5) PCIA(S5) PCIB(S5)
> > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> > cpu0 at mainbus0: apid 32 (boot processor)
> > cpu0: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz, 3325.54 MHz, 06-2c-02
> > 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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
> > cpu0: 256KB 64b/line 8-way L2 cache
> > cpu0: smt 0, core 0, package 1
> > mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> > cpu0: apic clock running at 132MHz
> > cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> > cpu1 at mainbus0: apid 34 (application processor)
> > cpu1: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz, 3325.01 MHz, 06-2c-02
> > 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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
> > cpu1: 256KB 64b/line 8-way L2 cache
> > cpu1: smt 0, core 1, package 1
> > cpu2 at mainbus0: apid 36 (application processor)
> > cpu2: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz, 3325.01 MHz, 06-2c-02
> > 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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4

Re: Is OpenBSD suited for old Dell Precision T5500 (Dual Xeon X5675, 72GB RAM)

2022-09-07 Thread Erling Westenvik
On Wed, Sep 07, 2022 at 09:08:32AM -, Stuart Henderson wrote:
> On 2022-09-07, Erling Westenvik  wrote:
> > Hello,
> >
> > A friend donated an old Dell Precision T5500 workstation, a heavy
> > bastard with dual Xeon X5675 and 72GB RAM which still packs a punch I
> > believe. At least it does for me. I would like it to replace my old i7
> > 3770k. However, I'm starting to have doubts:
> 
> Looks like rather an expensive machine to run, power-wise. Got to be
> in the 200W region with dual xeon X series and fully loaded on RAM
> (and presumably not low-voltage RAM given the choice of cpu). 

Good point.

> 
> > 1) On initial boot (with 7.1 release, on a usb stick) it more or less
> > immediately panicked into ddb when I tried to pipe dmesg into a file on
> > the usb stick. I took out the NVMe-card, and whether or not that was the
> > problem the machine anyhow behaved better long enough for me to get
> > network and do a fw_update.
> 
> https://www.openbsd.org/report.html "If OpenBSD panics with a particular
> error, say which"...

Duly noted.

> 
> > 2) After fw_update the radeondrm was detected and I got a nice 2560x1600
> > console. However, before it would give me a login prompt the machine got
> > stuck with repeating complaints about "ehci_device_clear_toggle: queue
> > active". So – USB related, right?  Very well! Out with the usb stick, in
> > with an old SSD with OpenBSD 6.7.
> >
> > 3) The machine behaves better, xenodm starts fine with cwm, but it won't
> > resume after suspend (zzz). 
> >
> > Some or all of the above problems may have solutions, trivial or not,
> > but more problems may perhaps lurk under the surface..?
> >
> > So I guess my question is if someone knows whether these Dell machines
> > are known to be error prone in general, or problematic with OpenBSD in
> > particular, and if I should stop before wasting time!?
> 
> I don't know specifically about workstations, but I'd expect them to be
> fairly similar to PowerEdge servers which are generally known to work
> well. However they are rarely suspended so there's probably not much
> knowledge of how well that works.
> 

Thanks. Sorry for being vague or not having done my research. Every now
and then a particular machine/model "just won't work" and I just wanted
to see if anyone knew some damning details that would save me wasting
hours. I recently lost several disks and is still in the process of
rebuilding a couple of machines, so I'm simply a bit stressed.

Since Nick Holland says he's using a similar T5500 I've decided to give
it a serious try. At least it supports SpeedStep, and I could always be
better at shutting down workstations (and laptops) when they're not in
use.

Erling

> 
> 
> >
> > OpenBSD 7.1 (GENERIC.MP) #465: Mon Apr 11 18:03:57 MDT 2022
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > real mem = 77290508288 (73709MB)
> > avail mem = 74930786304 (71459MB)
> > random: good seed from bootblocks
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xf0450 (102 entries)
> > bios0: vendor Dell Inc. version "A18" date 10/15/2018
> > bios0: Dell Inc. Precision WorkStation T5500
> > acpi0 at bios0: ACPI 3.0
> > acpi0: sleep states S0 S3 S4 S5
> > acpi0: tables DSDT FACP SSDT APIC BOOT ASF! MCFG HPET TCPA  _RAT SLIC 
> > SSDT
> > acpi0: wakeup devices VBTN(S4) PCI0(S5) PCI1(S5) PCI2(S5) PCI3(S5) PCI5(S5) 
> > PCI6(S5) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) PCI8(S5) 
> > PCIA(S5) PCIB(S5)
> > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> > cpu0 at mainbus0: apid 32 (boot processor)
> > cpu0: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz, 3325.54 MHz, 06-2c-02
> > 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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
> > cpu0: 256KB 64b/line 8-way L2 cache
> > cpu0: smt 0, core 0, package 1
> > mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> > cpu0: apic clock running at 132MHz
> > cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> > cpu1 at mainbus0: apid 34 (application processor)
> > cpu1: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz, 3325.01 MHz, 06-2c-02
> > cpu1: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFL

Re: Is OpenBSD suited for old Dell Precision T5500 (Dual Xeon X5675, 72GB RAM)

2022-09-07 Thread Erling Westenvik
On Tue, Sep 06, 2022 at 11:19:12PM -0400, Nick Holland wrote:
> On 9/6/22 21:52, Erling Westenvik wrote:
> > Hello,
> > 
> > A friend donated an old Dell Precision T5500 workstation, a heavy
> > bastard with dual Xeon X5675 and 72GB RAM which still packs a punch I
> > believe. At least it does for me. I would like it to replace my old i7
> > 3770k. However, I'm starting to have doubts:
> > 
> > 1) On initial boot (with 7.1 release, on a usb stick) it more or less
> > immediately panicked into ddb when I tried to pipe dmesg into a file on
> > the usb stick. I took out the NVMe-card, and whether or not that was the
> > problem the machine anyhow behaved better long enough for me to get
> > network and do a fw_update.
> 
> sure sounds like it could be a bad USB stick.
> Very common.  For important things, I have learned to write zeros over
> the entire USB stick before expecting it to actually work.  Nothing to
> do with the T5500.

Right. It's a general purpuse stick I use to boot up different machines
for diagnostics etc. No problems on other machines but I'll keep your
advice in mind.

> 
> NVMe??  don't think I have that in mine...But then, I probably wasn't
> looking.
> 
> This an add-on board?  I'd certainly strip it down as much as possible.

Yes. Add-on card. Poor grammar on my part. Should've read "a NVMe-card" and
not "the" I guess. Probably not the culprit anyway but I'll follow your
advice and strip it down.

> 
> > 2) After fw_update the radeondrm was detected and I got a nice 2560x1600
> > console. However, before it would give me a login prompt the machine got
> > stuck with repeating complaints about "ehci_device_clear_toggle: queue
> > active". So – USB related, right?  Very well! Out with the usb stick, in
> > with an old SSD with OpenBSD 6.7.
> > 
> > 3) The machine behaves better, xenodm starts fine with cwm, but it won't
> > resume after suspend (zzz).
> 
> haven't tried suspending.  Thing has been on pretty much 24x7 for five+
> years.

I see. As Stuart mentions, the machine is a potential resource hog.
(Electricity has always been very cheap here in Norway. That is, until
last autumn when the grid became part of the EU/ACER trading pool and
the energy bills skyrocketed to 20 times what they used to be. It has
caused quite a political scandal. Ongoing as we speak..)

> > Some or all of the above problems may have solutions, trivial or not,
> > but more problems may perhaps lurk under the surface..?
> > 
> > So I guess my question is if someone knows whether these Dell machines
> > are known to be error prone in general, or problematic with OpenBSD in
> > particular, and if I should stop before wasting time!?
> 
> well, I have one, looks very similar to yours.  I've been using it for
> quite a few years, this message is being composed on it, in fact.  Like
> it enough that when a friend of mine told me he had another one, I got
> it as a spare.
> 
> In short: you have a potentially good machine.  I have no idea of the
> condition that yours is actually in, but "Run OpenBSD on a T5500? Yes".

Thanks. That answers my question and I'll give it a chance and put some
effort into it.

(I guess subject should've been the other way around: "Is an old Dell
Precision T5500 suited for OpenBSD". Insult not intended! : )

Erling

> 
> Nick.
> 
> OpenBSD 7.2-beta (GENERIC.MP) #702: Sun Aug 21 00:29:07 MDT 2022
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 34340835328 (32749MB)
> avail mem = 33282695168 (31740MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xf0450 (102 entries)
> bios0: vendor Dell Inc. version "A16" date 05/28/2013
> bios0: Dell Inc. Precision WorkStation T5500
> acpi0 at bios0: ACPI 3.0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT APIC BOOT ASF! MCFG HPET TCPA DMAR _RAT SLIC SSDT
> acpi0: wakeup devices VBTN(S4) PCI0(S5) PCI1(S5) PCI2(S5) PCI3(S5) PCI5(S5) 
> PCI6(S5) KBD_(S3) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) 
> PCI8(S5) PCIA(S5) [...]
> 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) Xeon(R) CPU X5670 @ 2.93GHz, 3192.40 MHz, 06-2c-02
> 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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTD

Is OpenBSD suited for old Dell Precision T5500 (Dual Xeon X5675, 72GB RAM)

2022-09-06 Thread Erling Westenvik
Hello,

A friend donated an old Dell Precision T5500 workstation, a heavy
bastard with dual Xeon X5675 and 72GB RAM which still packs a punch I
believe. At least it does for me. I would like it to replace my old i7
3770k. However, I'm starting to have doubts:

1) On initial boot (with 7.1 release, on a usb stick) it more or less
immediately panicked into ddb when I tried to pipe dmesg into a file on
the usb stick. I took out the NVMe-card, and whether or not that was the
problem the machine anyhow behaved better long enough for me to get
network and do a fw_update.

2) After fw_update the radeondrm was detected and I got a nice 2560x1600
console. However, before it would give me a login prompt the machine got
stuck with repeating complaints about "ehci_device_clear_toggle: queue
active". So – USB related, right?  Very well! Out with the usb stick, in
with an old SSD with OpenBSD 6.7.

3) The machine behaves better, xenodm starts fine with cwm, but it won't
resume after suspend (zzz). 

Some or all of the above problems may have solutions, trivial or not,
but more problems may perhaps lurk under the surface..?

So I guess my question is if someone knows whether these Dell machines
are known to be error prone in general, or problematic with OpenBSD in
particular, and if I should stop before wasting time!?

Sincerely,

Erling

OpenBSD 7.1 (GENERIC.MP) #465: Mon Apr 11 18:03:57 MDT 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 77290508288 (73709MB)
avail mem = 74930786304 (71459MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xf0450 (102 entries)
bios0: vendor Dell Inc. version "A18" date 10/15/2018
bios0: Dell Inc. Precision WorkStation T5500
acpi0 at bios0: ACPI 3.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT APIC BOOT ASF! MCFG HPET TCPA  _RAT SLIC SSDT
acpi0: wakeup devices VBTN(S4) PCI0(S5) PCI1(S5) PCI2(S5) PCI3(S5) PCI5(S5) 
PCI6(S5) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) PCI8(S5) 
PCIA(S5) PCIB(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 32 (boot processor)
cpu0: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz, 3325.54 MHz, 06-2c-02
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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 1
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 132MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 34 (application processor)
cpu1: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz, 3325.01 MHz, 06-2c-02
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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 1
cpu2 at mainbus0: apid 36 (application processor)
cpu2: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz, 3325.01 MHz, 06-2c-02
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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 1
cpu3 at mainbus0: apid 48 (application processor)
cpu3: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz, 3325.01 MHz, 06-2c-02
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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 8, package 1
cpu4 at mainbus0: apid 50 (application processor)
cpu4: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz, 3325.01 MHz, 06-2c-02
cpu4: 
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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
cpu4: 256KB 64b/line 8-way L2 cache
cpu4: smt 0, core 9, package 1
cpu5 at mainbus0: apid 52 (application processor)
cpu5: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz, 3325.01 MHz, 06-2c-02
cpu5: 

Re: "cdio cddbinfo" broken?

2022-07-25 Thread Erling Westenvik
On Mon, Jul 25, 2022 at 11:40:30AM -0400, Nick Holland wrote:
> I noticed that the cdio(1) cddbinfo command seem to no longer
> work.  I don't think this is a snapshot breakage -- I upgraded
> a May 8 snapshot to Jul 23 snapshot, but I am pretty sure I
> had a failure on the May 8 snap just before upgrading, and
> I appear to have used it successfully on June 23.
> 
> For some CDs, it returns an accurate title:
>   $ cdio cddbinfo
>   Van Halen / Van Halen II (rock)
> 
> but not the track listing it used to show.
> 
> Other CDs, it shows nothing at all.  No error code or
> message is returned.  So far, in all my samples that I know had
> worked are giving me a title.
> 
> Can anyone confirm/refute?

Can confirm. Out of three CD's only one returned the title and none
returned track listing. Testet on two snapshots:

1) OpenBSD 7.1-current (GENERIC.MP) #577: Sat Jun 11 11:39:36 MDT 2022
2) OpenBSD 7.0-beta (GENERIC.MP) #195: Mon Aug 23 23:41:21 MDT 2021

As for Geogg Steckel's answer I cannot reach the URI:
http://ftp.freedb.org/pub/freedb/misc/freedb_CDDB_protcoldoc.zip

Erling

> 
> Nick.
> 
> OpenBSD 7.2-beta (GENERIC.MP) #644: Sat Jul 23 19:59:20 MDT 2022
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 34340835328 (32749MB)
> avail mem = 33282711552 (31740MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xf0450 (102 entries)
> bios0: vendor Dell Inc. version "A16" date 05/28/2013
> bios0: Dell Inc. Precision WorkStation T5500
> acpi0 at bios0: ACPI 3.0
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT APIC BOOT ASF! MCFG HPET TCPA DMAR _RAT SLIC SSDT
> acpi0: wakeup devices VBTN(S4) PCI0(S5) PCI1(S5) PCI2(S5) PCI3(S5) PCI5(S5) 
> PCI6(S5) KBD_(S3) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) 
> PCI8(S5) PCIA(S5) [...]
> 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) Xeon(R) CPU X5670 @ 2.93GHz, 3192.46 MHz, 06-2c-02
> 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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
> cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 4-way I-cache, 256KB 
> 64b/line 8-way L2 cache, 12MB 64b/line 16-way L3 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
> cpu0: apic clock running at 133MHz
> cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
> cpu1 at mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Xeon(R) CPU X5670 @ 2.93GHz, 3192.02 MHz, 06-2c-02
> 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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
> cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 4-way I-cache, 256KB 
> 64b/line 8-way L2 cache, 12MB 64b/line 16-way L3 cache
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 4 (application processor)
> cpu2: Intel(R) Xeon(R) CPU X5670 @ 2.93GHz, 3192.02 MHz, 06-2c-02
> 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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
> cpu2: 32KB 64b/line 8-way D-cache, 32KB 64b/line 4-way I-cache, 256KB 
> 64b/line 8-way L2 cache, 12MB 64b/line 16-way L3 cache
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 16 (application processor)
> cpu3: Intel(R) Xeon(R) CPU X5670 @ 2.93GHz, 3192.02 MHz, 06-2c-02
> 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,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AES,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
> cpu3: 32KB 64b/line 8-way D-cache, 32KB 64b/line 4-way I-cache, 256KB 
> 64b/line 8-way L2 cache, 12MB 64b/line 16-way L3 cache
> cpu3: smt 0, core 8, package 0
> cpu4 at mainbus0: apid 18 (application processor)
> cpu4: Intel(R) Xeon(R) CPU X5670 @ 2.93GHz, 3192.02 MHz, 06-2c-02
> cpu4: 
> 

Re: Wrong opacity in picom

2021-12-25 Thread Erling Westenvik
On Sat, Dec 25, 2021 at 08:32:28PM +0200, Samarul Meu wrote:
> I am trying to customize my cwm using picom for some tweakings.
> The problem is when I try to setup opacity for active and inactive windows.
> 
> This is my relevant config section:
> 
> inactive-opacity = .5;
> inactive-opacity-override = false;
> active-opacity = .9;
> inactive-dim = 0.0;
> 
> I am using Xterm, but only the active windows behaves normally with .9
> opacity, the inactive ones are just not transparent, like inactive-opacity
> = 1. Is just like they act oppositely as they suppose to.
> 
> I even tried to use some rules I found on an arch wiki
> 
> opacity-rule = [
>   "90:class_g = 'Xterm' && focused", "60:class_g = 'XTerm' &&
   ^^ ^^
There's a capitalization discrepancy between the two rules. Try changing
"Xterm" to "XTerm" for the first rule (or the other way around for the
second, though "XTerm" should be correct -- at least that's what I have
in my ~/.config/picom.conf).

Regards,
Erling

> !focused"
>  ];
> 
> but nothing works.
> 
> I am using OpenBSD 7.0 stable.
> 
> Thank you for your help!



Re: Accessing LAN behind gateway from Road Warrior on wg(4) based tunnel

2021-08-31 Thread Erling Westenvik
On Mon, Aug 30, 2021 at 07:42:43AM -, Stuart Henderson wrote:
> On 2021-08-29, Erling Westenvik  wrote:
> > On Fri, Aug 27, 2021 at 07:36:21PM -, Stuart Henderson wrote:
> >> 
> >> Make sure you have set wgaip to allow traffic from the machines on the
> >> subnet on the other side of the tunnel.
> >
> > That was it. Thank you so much. Not directly intuitive to me that
> > "access" to a remote subnet must be specified on the connecting client,
> > but I think I understand the mechanisms a little better now.
> >
> > I can now access my home/office LAN which was my primary goal but I just
> > found out that traffic to everything else leaves egress untunneled.
> > However - trying something like:
> >
> > route change default 10.0.0.1
> >
> > leaves the laptop dead in the water. Again a routing problem of some
> > kind I guess. Any hints on where to start digging?
> 
> Changing the default route means that wg won't be able to reach the
> endpoint because the route to it is over the wg interface itself. If you
> want to tunnel all traffic, the easiest way is:
> 
> - set your physical interface in a different routing domain, e.g.
> add "rdomain 2" to hostname.em0
> 
> - set wg to use the route table associated with that routing domain
> when sending the encapsulated packets, e.g. add "wgrtable 2" to the wg
> interface itself.
> 
> - set your physical interface in a different routing domain, e.g.
> add "rdomain 2" to hostname.em0
> 
> - set wg to use the route table assocoated with that routing domain
> when sending the encapsulated packets, e.g. add "wgrtable 2" to
> hostname.wg0
> 
> - on the machine you're connecting wg to, unless you use externally
> routable IPs directly on the wg interface, you'll probably want
> something like "match out on em0 received-on wg0 nat-to (em0)"
> 
> - and because now you'll be receiving traffic from anywhere over the
> wg interface you'll need wgaip 0.0.0.0/0
> 
> I think that covers everything but if not then tcpdump on various
> interfaces and both wg endpoints to figure out where packets are
> getting to, and that they have the expected address.

Thanks again. I'll look into that information and compare and combine it
with Matthieu Herrb's page "Setting up a WireGuard client with routing
domains on OpenBSD" at https://codimd.laas.fr/s/NMc3qt5PQ#. (My father
passed away the day after my initial post which was motivated by the
need to access my LAN while watching over him at the nursery home.
Thanks for putting time and effort into your answers despite my late
replies.)

Erling

> 
> -- 
> Please keep replies on the mailing list.
> 



Re: Accessing LAN behind gateway from Road Warrior on wg(4) based tunnel

2021-08-29 Thread Erling Westenvik
On Fri, Aug 27, 2021 at 07:36:21PM -, Stuart Henderson wrote:
> On 2021-08-27, Erling Westenvik  wrote:
> > On Fri, Aug 27, 2021 at 02:20:29PM +0100, Zé Loff wrote:
> >> 
> >> On Fri, Aug 27, 2021 at 03:03:36PM +0200, Erling Westenvik wrote:
> >> > Hello all,
> >> > I have successfully set up a wg(4) based VPN tunnel from my laptop
> >> > (current) to my home/office gateway (6.9) but have problems
> >> > understanding how to access the LAN behind the gateway.
> >> > 
> >> > [Laptop]
> >> > - wg0 (10.0.0.42)
> >> > - egress (trunk0 {em0 iwn0} dhcp)
> >> > [Internet]
> >> > [Gateway]
> >> > - egress (em0 dhcp)
> >> > - wg0 (10.0.0.1)
> >> > - bridge0 {em1, (vether0 192.168.3.1 dhcpd)}
> >> > [LAN]
> >> > - various 192.168.3.0/24
> >> > 
> >> > I can ping/ssh between wg(4) endpoints (10.0.0.1 to 10.0.0.42 and vica
> >> > versa) and also from LAN clients (192.168.3.0/24) to gateway wg(4)
> >> > endpoint (10.0.0.1), but the laptop (10.0.0.42) can only reach the
> >> > gateway (10.0.0.1).
> >> > 
> >> > Is it as easy as defining some routes? If so, where? There's a ton of
> >> > more or less relevant and/or updated howto's out there but I have not
> >> > found anyone dealing with a similar scenario. Any hints are appreciated.
> >> 
> >> I added something like
> >> 
> >> !route add 192.168.3.0/24 10.0.0.1
> >> 
> >> to /etc/hostname.wg0.
> >
> > Thanks. I did too, I just forgot to mention it.
> > It doesn't work in my case though.
> > At least your answer tells me that what I try to achieve, to access the
> > LAN behind a wg(4) endpoint, is possible, right?
> >
> >> Of course this _might_ be messy if by any chance your laptop's local
> >> network is also 192.168.3.0/24 or a subset of this range.
> >
> > When connected to the LAN it of course is, but there should not be any
> > traces of that range after a reboot or two.
> >
> > Guess I'm up for debugging, testing of pf rules, and tcpdumping..
> > Any ideas where to begin is appreciated.
> >
> > Erling
> >
> >
> >> > 
> >> > (My wg(4) setup is based on:
> >> > https://www.tumfatig.net/20201202/a-mesh-vpn-using-openbsd-and-wireguard/)
> >> > 
> >> > Best regards,
> >> > 
> >> > Erling
> >> > 
> >> 
> >> -- 
> >>  
> >
> >
> 
> Make sure you have set wgaip to allow traffic from the machines on the
> subnet on the other side of the tunnel.

That was it. Thank you so much. Not directly intuitive to me that
"access" to a remote subnet must be specified on the connecting client,
but I think I understand the mechanisms a little better now.

I can now access my home/office LAN which was my primary goal but I just
found out that traffic to everything else leaves egress untunneled.
However - trying something like:

route change default 10.0.0.1

leaves the laptop dead in the water. Again a routing problem of some
kind I guess. Any hints on where to start digging?

Erling

> If that's not it, please show some config, ifconfig wg0 output
> from both sides (run as root so it includes more info; make sure
> any masking is done consistently i.e. search-and-replace),
> netstat -rn output.
> 
> When you get connectivity working you may find you get TCP stalls
> when connecting to/from machines on the subnet behind the gateway
> (initial connect is ok but stalling after larger data transfer) -
> if so then you might need some "match ... scrub (max-mss 1380)"
> or maybe a bit smaller depending on your internet connection.
> 
> 
> -- 
> Please keep replies on the mailing list.
> 



Re: Accessing LAN behind gateway from Road Warrior on wg(4) based tunnel

2021-08-27 Thread Erling Westenvik
On Fri, Aug 27, 2021 at 02:20:29PM +0100, Zé Loff wrote:
> 
> On Fri, Aug 27, 2021 at 03:03:36PM +0200, Erling Westenvik wrote:
> > Hello all,
> > I have successfully set up a wg(4) based VPN tunnel from my laptop
> > (current) to my home/office gateway (6.9) but have problems
> > understanding how to access the LAN behind the gateway.
> > 
> > [Laptop]
> > - wg0 (10.0.0.42)
> > - egress (trunk0 {em0 iwn0} dhcp)
> > [Internet]
> > [Gateway]
> > - egress (em0 dhcp)
> > - wg0 (10.0.0.1)
> > - bridge0 {em1, (vether0 192.168.3.1 dhcpd)}
> > [LAN]
> > - various 192.168.3.0/24
> > 
> > I can ping/ssh between wg(4) endpoints (10.0.0.1 to 10.0.0.42 and vica
> > versa) and also from LAN clients (192.168.3.0/24) to gateway wg(4)
> > endpoint (10.0.0.1), but the laptop (10.0.0.42) can only reach the
> > gateway (10.0.0.1).
> > 
> > Is it as easy as defining some routes? If so, where? There's a ton of
> > more or less relevant and/or updated howto's out there but I have not
> > found anyone dealing with a similar scenario. Any hints are appreciated.
> 
> I added something like
> 
> !route add 192.168.3.0/24 10.0.0.1
> 
> to /etc/hostname.wg0.

Thanks. I did too, I just forgot to mention it.
It doesn't work in my case though.
At least your answer tells me that what I try to achieve, to access the
LAN behind a wg(4) endpoint, is possible, right?

> Of course this _might_ be messy if by any chance your laptop's local
> network is also 192.168.3.0/24 or a subset of this range.

When connected to the LAN it of course is, but there should not be any
traces of that range after a reboot or two.

Guess I'm up for debugging, testing of pf rules, and tcpdumping..
Any ideas where to begin is appreciated.

Erling


> > 
> > (My wg(4) setup is based on:
> > https://www.tumfatig.net/20201202/a-mesh-vpn-using-openbsd-and-wireguard/)
> > 
> > Best regards,
> > 
> > Erling
> > 
> 
> -- 
>  



Accessing LAN behind gateway from Road Warrior on wg(4) based tunnel

2021-08-27 Thread Erling Westenvik
Hello all,
I have successfully set up a wg(4) based VPN tunnel from my laptop
(current) to my home/office gateway (6.9) but have problems
understanding how to access the LAN behind the gateway.

[Laptop]
- wg0 (10.0.0.42)
- egress (trunk0 {em0 iwn0} dhcp)
[Internet]
[Gateway]
- egress (em0 dhcp)
- wg0 (10.0.0.1)
- bridge0 {em1, (vether0 192.168.3.1 dhcpd)}
[LAN]
- various 192.168.3.0/24

I can ping/ssh between wg(4) endpoints (10.0.0.1 to 10.0.0.42 and vica
versa) and also from LAN clients (192.168.3.0/24) to gateway wg(4)
endpoint (10.0.0.1), but the laptop (10.0.0.42) can only reach the
gateway (10.0.0.1).

Is it as easy as defining some routes? If so, where? There's a ton of
more or less relevant and/or updated howto's out there but I have not
found anyone dealing with a similar scenario. Any hints are appreciated.

(My wg(4) setup is based on:
https://www.tumfatig.net/20201202/a-mesh-vpn-using-openbsd-and-wireguard/)

Best regards,

Erling



Re: Hot to use speakers from one sound card an mic from another?

2021-05-02 Thread Erling Westenvik
On Sun, May 02, 2021 at 08:55:27AM +0200, Federico Giannici wrote:
> SHORT VERSION: How can I make Chromium to use the speakers from the internal
> soundcard and the the microphone from an USB card?

According to this thread on @misc from 2020, you cannot. Not yet at
least. See the answers from Alexandre Ratchov.

http://openbsd-archive.7691.n7.nabble.com/Using-a-C310-Logitech-webcam-mic-with-internal-speakers-td388783.html

Erling

> LONG VERSION:
> I'd like to use my OpenBSD 6.9 amd64 PC for videoconferencing using Google
> Meets in Chromium. The problem is that I have the speakers connected to the
> internal motherboard's soundcard, while the microphone is in an USB card
> (the webcam).
> 
> This second card connect as audio1:
> 
> uaudio0 at uhub0 port 1 configuration 1 interface 3 "Logitech Webcam C310"
> rev 2.00/0.12 addr 2
> uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
> audio1 at uaudio0
> 
> I was able to make Chromium use that second card (with "rcctl set sndiod
> flags -f rsnd/0 -F rsnd/1"), and in this way the microphone works, but than
> I cannot hear anyting!
> 
> So, how can I make Chromium (or any other program in the PC) use the
> speakers from one card  and the microphone from another one?
> 
> Thanks.



Re: pf on bridge interface not working

2021-02-21 Thread Erling Westenvik
On Sat, Feb 20, 2021 at 04:17:11PM -0600, Eric Zylstra wrote:
> -But- 
> make one simple change to filter on the bridge0 interface— 
> 
> pf.conf: 
> filtered = "{ bridge0 }”
> not_filtered = "{ lo, dc0, em0, em1 }” 
> block log on $filtered 
> set skip on $not_filtered 
> 
> `doas pfctl -sr`
> block drop log on bridge0 all
> 
> traffic is NOT blocked and everything flows right on through. (!?) 
> `tcpdump -nettti pflog0` shows no packets being filtered.
> 
> Am I overlooking something?

Perhaps this from bridge(4):

--8<--
NOTES
Bridged packets pass through pf(4) filters once as input on the receiving
interface and once as output on all interfaces on which they are
forwarded.  In order to pass through the bridge packets must pass any in
rules on the input and any out rules on the output interface.  Packets
may be blocked either entering or leaving the bridge.
-->8--

I partly recall a phrasing that I cannot find again now, unsure whether
it was from a manpage or from the FAQ; Something along: "Due to the
nature of bridged interfaces [...] you really have to understand this
very well to do [packet filtering] right".

Erling



Re: Help with ssh(1) between OpenBSD and iSH/Alpine on iOS

2021-02-08 Thread Erling Westenvik
On Sun, Feb 07, 2021 at 11:18:31AM +0100, Stefan Hagen wrote:
> Christian Weisgerber wrote:
> > Erling Westenvik:
> >> I can ssh FROM any OpenBSD box INTO iSH on my iPhone, and once
> >> authenticated I can ssh back from there to the OpenBSD box or to any
> >> other OpenBSD or Linux box, but! -- From iSH itself (ie. "directly" from
> >> my iPhone) I can only successfully ssh to Linux boxes; if I ssh from the
> >> phone itself to any OpenBSD box I'm getting authenticated and receive a
> >> full shell prompt
> >
> > Right here, I'd start ktrace(1)-ing the login shell on the OpenBSD
> > box to see...
> >
> >> but the moment I hit Enter the client drops the connection.
> >
> >... what this looks like at the OpenBSD end.
> >
> >> I guess there must be something obvious I'm missing but for the life
> >> of me I cannot figure out what. Any help is appreciated.
> >
> > I don't think it's anything obvious.  Smells like an interop problem
> > at a level above SSH to me.
> 
> I tried iSH and I can successfully ssh to my OpenBSD-current box and do 
> stuff there without a disconnect.
> 
> Instead of going through ktracing the shell, you could set your login
> shell to /bin/sh for a test and try again. If this works, you know that
> your shell is causing the trouble.

Thank you Stefan. I tried your suggestion but to no avail. However, I
started elaborating on your assumption that it may be shell related and
when trying:

---
iPhone:~# ssh erling@12.34.56.78 ksh -i
ksh: No controlling tty (open /dev/tty: Device not configured)
ksh: Can't find tty file descriptor
ksh: Warning: won't have full job control
OpenBSD$ ls
...
OpenBSD$ █
---

the client didn't disconnect as soon as I entered my first command. Not
very useful though, since the missing controlling tty won't let me do
anything useful except running ls(1) and cat(1) and such.

This is still an OpenBSD spesific issue as far as it only happens when
trying to initiate a ssh from iSH into OpenBSD boxes (five different,
ranging from current to newest release to older releases) while I can
successfully initiate a ssh from iSH to any Linux box (three different
so far).

However: Since I can successfully initiate a ssh session from OpenBSD to
the iPhone, and then successfully BACK to any OpenBSD machine, I suspect
there may be some ENV-issues? Something that is set correctly when
initiating the ssh session from OpenBSD, but not when initiating from
iSH (but which still gets accepted by Linux)?

Erling

> Best Regards,
> Stefan



Help with ssh(1) between OpenBSD and iSH/Alpine on iOS

2021-02-06 Thread Erling Westenvik
Hi,
Last year I discovered the iSH app, "The Linux shell for iOS"
(https:/ish.app), "a project to get a Linux shell environment running
locally on your iOS device, using a usermode x86 emulator". It's an
Alpine Linux distribution with the Almquist shell (ash) as default.
Nice, fun -- and useful! -- but one thing puzzles me and prevents me
from utilizing the full potential of the app:

I can ssh FROM any OpenBSD box INTO iSH on my iPhone, and once
authenticated I can ssh back from there to the OpenBSD box or to any
other OpenBSD or Linux box, but! -- From iSH itself (ie. "directly" from
my iPhone) I can only successfully ssh to Linux boxes; if I ssh from the
phone itself to any OpenBSD box I'm getting authenticated and receive a
full shell prompt but the moment I hit Enter the client drops the
connection.

Summarized:

ssh FAILS from iSH > to OpenBSD
ssh WORKS from iSH > to Linux
ssh WORKS from OpenBSD > to iSH (and from iSH (back) to Linux/OpenBSD)

I guess there must be something obvious I'm missing but for the life of
me I cannot figure out what. Any help is appreciated.

Not sure what logs, if any, I should supply. Running ssh -v[vv]
(verbose) doesnt yield any difference between working and non-working
connections, and it's the same with /var/log/auth.log as far as I can
see.

Cheers,
Erling



Re: Managed to mess up the system encrypted disk. I can no longer boot.

2021-01-27 Thread Erling Westenvik
On Wed, Jan 27, 2021 at 05:50:07PM +0200, Samarul Meu wrote:
> I was playing with some script trying to create an encrypted image and
> accidentally I did bioctl -d sd0 where sd0 is the disk with my OpenBSD
> install. Of course the system hanged. When I tried to reboot it no longer
> ask me for my passphrase.
> [...]
> Using a usb drive with *FuguIta* I managed to do a fsck on all partitions
> (some errors appeared, but I cleaned them).
> 
> I was even able to mount them and everything seems fine, I recovered what I
> was working on, but I have no luck in booting. Again and again the above
> error.

> I am a little puzzled that there is no failsafe mechanism for commands like
> bioctl or fdisk on the already mounted disk. For me the obvious think was
> that the system complains when trying bioctl -d sd0.

Perhaps. But that would require not-trivial WORK, maybe a LOT, which
someone would have to DO, probably for FREE.

I suspect detaching a running encrypted root disk is somewhat uncharted
territory. In a perfect world the same command might've offered a
"failsafe" mechanism and performed logout, shutdown, umount and sync and
whatnot in the case of an affirmative response, but not in ours. Such a
perfect world might not even be preferable given how much added code
complexity and size such "failsafe" mechanisms could involve.

For now, consider yourself lucky to have recovered your data. That is
the most important thing and I'm happy on your behalf to hear that you
managed so.
 
Regards



Re: Can't cron sct.

2020-10-30 Thread Erling Westenvik
On Thu, Oct 29, 2020 at 11:04:59PM +0100, avv. Nicola Dell'Uomo wrote:
> I tried to pass DISPLAY env to cron without success: how is it done?

35 19 * * * export DISPLAY=:0; /usr/local/bin/sct 5000

> sctd is not a viable answer as it works just with fixed increments or
> decrements; and from man sct:
> 
>  "sct samples the color ramp in interval steps of 500 with temp values
>  between steps being interpolated."
> 
> So I doubt decrements of two every minute would guarantee white balance
> quality...

Have you had a look at redshift(1) in ports/packages?

Cheers
Erling

> On 29/10/20 16:53, Joerg Jung wrote:
> > > On 27. Oct 2020, at 16:10, avv. Nicola Dell'Uomo 
> > >  wrote:
> > > 
> > > maybe I'm missing something trivial, but I can't figure out how to cron 
> > > sct(1)
> > > 
> > > My user cron config works and cron log reports sct was executed, but 
> > > screen temp doesn't change ...
> > > 
> > > Here's my user crontab:
> > > 
> > > #   $OpenBSD: crontab,v 1.28 2020/04/18 17:22:43 jmc Exp $
> > > #
> > > # SHELL=/bin/sh
> > > PATH=/bin:/sbin:/usr/bin:/usr/sbin
> > > HOME=/var/log
> > > #
> > > #minute hourmdaymonth   wday[flags] command
> > > #
> > > # rotate log files every hour, if necessary
> > > # 3519   *   *   *  touch /home/nicola/sct
> > > 
> > > 3519   *   *   *  /usr/local/bin/sct  5000
> > > 
> > > # touch /home/nicola/sct was a test in order to verify I had not 
> > > misconfigured crontab.
> > > # cron was tested with SHELL variable defined and then commented out and 
> > > the result was the same.
> > FYI, there is a small sctd in the sct package, which probably
> > does exactly what you try to achieve manually here.



Re: bioctl -cC -l /dev/sd1a softraid0 for encryption two disks RAID1 mirrored

2020-10-19 Thread Erling Westenvik
On Mon, Oct 19, 2020 at 06:28:50PM +, Martin wrote:
> I'd like to have two encrypted 1TB disks in RAID 1 mirror mode (no hardware 
> RAID installed). Is it possible to use bioctl for that purpose or do I need 
> to use HW RAID and encrypt mirrored disks with bioctl -cC -l /dev/sd1a 
> softraid0 ?
> Please advice.

Yes, it's possible, and quite common I guess. OpenBSD cannot boot from
an encrypted softraid(4) RAID 1+CRYPTO though, so true RAID 1+CRYPTO FDE
is not achieveable. (You'll have to leave an unencrypted partition for
root so that the system can boot into singleuser. When not finding the
remaining of fstab(5) mounts, rc(8) will complain and stop and give you
the option to drop to a prompt where you can manually bioctl(8) the
CRYPTO partition before continue booting. Kinda cumbersome since every
(re)boot will have to be performed attended, so you should carefully
consider whether your data is truly so important as to justify the added
troubles.)

Cheers,
Erling



Re: OpenBSD 6.8 Relase Time

2020-10-16 Thread Erling Westenvik
On Fri, Oct 16, 2020 at 01:52:14PM +, Valdrin Muja wrote:
> On OpenBSD 6.8 page, `Released Oct XXX` is writing..
> When will it be released?

Octobris 0x1e scilicet!














(Just kidding. No one knows for sure. It just arrives in due time when ready.)

Erling



Re: ncmpcpp dumps core when fetching lyrics

2020-09-11 Thread Erling Westenvik
On Fri, Sep 11, 2020 at 09:09:39AM -, Stuart Henderson wrote:
> On 2020-09-10, Ashlen  wrote:
> > doesn't do anything to fix the issue, so it doesn't seem to be
> > a problem caused by my configs.

Been like that for years on all installations here. Never taken time to
investigate, so thanks for the initiative.

> First thing to look for when there's a core dump is to see if you can
> get a useful backtrace. How does the output look from this?
> 
> pkg_add gdb
> egdb ncmpcpp ncmpcpp.core
> bt

(gdb) bt
#0  _libc_pthread_mutex_unlock (mutexp=) at 
/usr/src/lib/libc/thread/rthread_mutex.c:246
#1  0x0ea982e20277 in std::__1::__libcpp_mutex_unlock (__m=0xea9c55edb98) 
at /usr/src/lib/libcxx/include/__threading_support:266
#2  std::__1::mutex::unlock (this=0xea9c55edb98) at 
/usr/src/lib/libcxx/src/mutex.cpp:45
#3  0x0ea77d9fb21d in ?? ()
#4  0x0ea77da587b5 in ?? ()
#5  0x0ea77db3e808 in ?? ()
#6  0x0ea77daafdf3 in ?? ()
#7  0x0ea77db140d0 in ?? ()
#8  0x0ea77d9b9a21 in ?? ()
#9  0x in ?? ()
(gdb)

> If the lines output from "bt" don't have function names in,
> rebuild ncmpcpp with "make clean; DEBUG=-g make repackage reinstall"
> and try again.

Does rebuild suggestion still apply based on gdb output above?

Erling



Re: FireFox Browser 'Open File' error

2020-08-25 Thread Erling Westenvik
On Tue, Aug 25, 2020 at 07:24:20PM +0100, Tom Smyth wrote:

> as Bob Beck once said,
> "I want to be able to surf the web but I dont want my browser accessing my
> ssh keys..."

I think there's a Firefox extension for that. Themeable. Very modern.

Ew



Re: Recommendations for USB Barcode Scanner and Thermal Receipt Printer

2020-07-25 Thread Erling Westenvik
On Sat, Jul 25, 2020 at 08:47:48PM +0200, Rubén Llorente wrote:
> Anybody in the list has good (or bad) experiences with USB Barcode
> Scanners? Which models with?

I have a working barcode scanner, Symbol Technologies LS2208, that
shows up in dmesg as:

uhidev4 at uhub3 port 6 configuration 1 interface 0 "?Symbol
Technologies, Inc, 2002 Symbol Bar Code Scanner" rev 2.00/2.01 addr 4
uhidev4: iclass 3/1
ukbd1 at uhidev4: 8 variable keys, 6 key codes, country code 33
wskbd2 at ukbd1 mux 1
wskbd2: connecting to wsdisplay0

It's an old model, manufactured in 2005, and I can't say that I've used
it extensively, but it seems to work well with at least "normal"
barcodes typically found on groceries, books (ISBN), receipts and so on.
There are barcodes that it cannot read but I have not investigated the
matter. The manufacturer still exists.

Good luck!

Erling



Re: More than 16 partitions

2020-04-23 Thread Erling Westenvik
On Thu, Apr 23, 2020 at 08:14:25PM +0200, Jan Betlach wrote:
> For a non-native English speaker like myself, it is very difficult to read
> your mestuff…

One may practice by reading Gollum/Smeagol-passages..



Re: sndioctl and USB HID keyboard

2020-04-20 Thread Erling Westenvik
On Mon, Apr 20, 2020 at 11:07:38PM +0200, Alexandre Ratchov wrote:
> On Mon, Apr 20, 2020 at 08:00:05PM +0200, Alessandro De Laurenzis wrote:
> > Hello Alexandre,
> > 
> > On 20/04/2020 - 19:50, Alexandre Ratchov wrote:
> > > On Mon, Apr 20, 2020 at 07:35:03PM +0200, Alessandro De Laurenzis wrote:
> > > > Hello Alexandre,
> > > > 
> > > > Thanks for your prompt feedback.
> > > > 
> > > > On 20/04/2020 - 18:00, Alexandre Ratchov wrote:
> > > > [...]
> > > > >
> > > > > This is the right way of doing it except that the user-id running
> > > > > sndioctl is probably not authorized to use the server while you're
> > > > > using.
> > > > >
> > > > > You could try to prefix the command with "doas -u "
> > > > >
> > > > > -- Alexandre
> > > > >
> > > > 
> > > > Yes, that's the root cause and prefixing the sndioctl command with doas
> > > > makes the trick. Unfortunately, this solution isn't applicable to my
> > > > use-case, since there are several users that can log in this machine...
> > > > 
> > > > Are there any alternatives?
> > > 
> > > mixerctl still works for root.
> > > 
> > 
> > I'm a bit confused now... so why the previous usbhidaction configuration
> > (which was aligned to the manpage suggestions and worked flawlessly for
> > years) doesn't work anymore?
> 
> Sorry, few weeks ago mixerctl was changed to use /dev/audioctlN
> instead of /dev/mixerN (which was just removed), but the
> usbhidaction(1) man page was not updated. Now it's fixed.
> 
> The sample invocation line should read:
> 
> usbhidaction -f /dev/uhid1 -c conf /dev/audioctl0
> 
> Tested on my setup, let me know if it works for you.

I'm puzzled. This is -current as of yesterday (April 20th).

>From /etc/rc.conf.local:
usbhidaction_flags=-f /dev/uhid0 -c /etc/usbhidaction.conf 
/dev/audioctl0

My /etc/usbhidaction.conf:
Consumer:Play/Pause 1
echo 'cycle pause' | socat - /tmp/mpvsocket
Consumer:Volume_Decrement 1
sndioctl output.level=-0.1
#mixerctl outputs.master=-8
Consumer:Volume_Increment 1
sndioctl output.level=+0.1
#mixerctl outputs.master=+8
Consumer:Mute 1
sndioctl output.mute=!
#mixerctl outputs.master.mute=toggle

But alas, nothing happens when I press the respective buttons on my
keyboard. 
Running from command line works, but not as root/doas..

Running with doas: $ doas sndioctl output.level=+0.1
default: can't open control device

Running as myself: $ sndioctl output.level=+0.1
output.level=0.6

Regards,
Erling



Re: List a package's dependencies

2020-04-19 Thread Erling Westenvik
On Sun, Apr 19, 2020 at 01:34:28PM +0100, Chris Rawnsley wrote:
> I am looking for a way to show a package's dependencies. The output
> might look similar to how -R looks in pkg_info(1), e.g.:
> 
> Information for inst:python-3.7.4
> 
> Directly depends on:
> bzip2-1.0.8
> gettext-runtime-0.20.1p0
> libffi-3.2.1p5
> sqlite3-3.29.0
> xz-5.2.4
> 
> Transitively depends on:
> libiconv-1.16p0
> 
> Does such a command such as this already exist?

Way out of my league here, but perhaps:

$ pkg_info -S python-3.7.6p1 | tail -n 2 | tr ',' '\n' | grep @
@bzip2-1.0.8
@gettext-runtime-0.20.1p1
@libffi-3.3
@sqlite3-3.31.1p0
@xz-5.2.4p0

Cheers,
Erling

> I guessed that the
> pkg_* tools would have this covered but I was not able to find it
> in the manpages.
> 
> In making the above example, I created a proof of concept shell
> script that demonstrates the desired behaviour. It has limitations
> on what package names it can accept, it only works locally and
> probably has numerous other problems :). It is inlined below.
> 
> --
> Chris Rawnsley
> 
> 
> #!/bin/sh
> 
> bin=$(basename "$0")
> 
> usage() {
>   cat < usage: ${bin} pkg-name
> EOF
> }
> 
> PKG_DBDIR=${PKG_DBDIR:-/var/db/pkg}
> direct_deps=$(mktemp -t "${bin}.direct_deps.XX")
> temp_deps=$(mktemp -t "${bin}.temp_deps.XX")
> all_deps=$(mktemp -t "${bin}.all_deps.XX")
> 
> cleanup() {
>   rm -f "${direct_deps}" "${temp_deps}" "${all_deps}"
> }
> trap cleanup INT TERM QUIT
> 
> if ! touch "${direct_deps}" "${temp_deps}" "${all_deps}" 2>/dev/null; then
>   printf '%s\n' "${bin}: Unable to make temporary files:"
>   cleanup; exit 1
> fi
> 
> # Does not account for categories, variants or versions...
> pkg_unresolved=$1
> pkg_dir=$(find "${PKG_DBDIR}" -type d -iname "${pkg_unresolved}-*" -print | 
> head -1)
> 
> if [ -z "${pkg_dir}" ]; then
>   printf '%s\n' "${bin}: unable to find package"
>   cleanup; exit 1
> fi
> 
> pkg=$(basename "${pkg_dir}")
> 
> pkg_requiring="${pkg_dir}/+REQUIRING"
> if [ -s "${pkg_requiring}" ]; then
>   sort "${pkg_requiring}" | tee "${temp_deps}" >"${direct_deps}"
> fi
> 
> while deps=$(comm -23 "${temp_deps}" "${all_deps}" | grep .); do
>   printf '%s\n' ${deps} >>"${all_deps}"
>   for d in ${deps}; do
>   cat "${PKG_DBDIR}/$d/+REQUIRING" >>"${temp_deps}" 2>/dev/null
>   done
>   sort -uo "${all_deps}" "${all_deps}"
>   sort -uo "${temp_deps}" "${temp_deps}"
> done
> 
> printf 'Information for inst:%s\n\n' "${pkg}"
> 
> printf 'Directly depends on:\n'
> printf '%s\n' $(cat ${direct_deps})
> 
> printf '\n'
> 
> printf 'Transitively depends on:\n'
>   
> printf '%s\n' $(comm -23 "${all_deps}" "${direct_deps}")
> 
> cleanup
> 



Re: Iridium vs Chromium

2020-04-12 Thread Erling Westenvik
On Sun, Apr 12, 2020 at 10:18:13PM +0100, Patrick Harper wrote:
> My understanding of -current is that it is meant for testing, not usage.

On the contrary. Or at least: for testing, BY usage!

Cheers,
Erling

> -- 
>   Patrick Harper
>   paia...@fastmail.com
> 
> On Sun, 12 Apr 2020, at 21:38, Kevin Chadwick wrote:
> > On April 12, 2020 7:07:01 PM UTC, Patrick Harper  
> > wrote:
> > >The effort to support Chromium and Firefox (sans ESR) on OpenBSD akin
> > >to Windows/macOS/'Linux' has not happened.
> > 
> > On atleast current as Theo showed, Chromium is just as well if not 
> > better supported on OpenBSD than on Linux, these days.
> > 
> > I assume you are judging by a while ago. Or perhaps you mean Chrome 
> > where pre-built binaries for Linux are released by Google? I used to 
> > install chrome on debian/ubuntu to get the extra days.



Re: secure MTA

2020-04-09 Thread Erling Westenvik
On Thu, Apr 09, 2020 at 04:24:34PM +0100, Kevin Chadwick wrote:
> 
> > Now this whole debate boils down to "how much effort is someone willing to 
> > invest
> > into hacking Cord's computers?", and that's something I can't answer. 
> 
> And how competent Cord is at defending his computer because they may not be 
> able
> to if he is competent enough, which is my point; It is not just about "how 
> much
> effort an attacker is willing to invest". However, at the end of the day, like
> it says in the faq. If black suits in helcopters come and demand your 
> password,
> it almost certainly doesn't matter if your computer is secure!

In fact we must assume that Cords computer is already hacked without him
being aware of it at all. The emails that APPEAR to come from him is
actually the hackers trying to hack into OUR computers by having us
revealing whether we're running some not-guaranteed unhackable servers
of any kind.

https://dilbert.com/strip/1995-09-17



Re: Faking the same LAN over the Internet

2020-03-31 Thread Erling Westenvik
On Tue, Mar 31, 2020 at 10:34:39AM +0100, Chris Rawnsley wrote:
> In the period of The Great Isolation, a friend and I wish to play
> a game that has LAN-only multiplayer. We, however, live in different
> locations and, more importantly, different LANs. An often cited
> approach to solving this is to set up a VPN and connect the two
> devices to it. This requires that both devices run a VPN client
> that connects to the third device that manages the connection. And
> then, hey presto! You have a "LAN".
> 
> The complication I have found is that we are both using a Nintendo
> Switch (NinSw) and this device comes without a VPN client. Initially,
> I thought it would be possible to use a VPN client on a computer
> which was wired in over Ethernet and then share the wireless to the
> NinSw. This setup would be mirrored on the other side. The diagram
> below tries to make this clearer. Search for "Where my thinking"
> to skip over this.
> 
> 
>   ||
>   ||   ..
>   ||   ) ) )  |:|  |:|
>   ||   `'
>  .---/::\[NinSw]
>  |   [laptop]
>  |
>[VPN] 
>  |
>  |  \/
>  |  _\__/_
>  `-| ...  |[uplink]// mirrored on the other side
> ``
>  [gateway]
> 
> 
> Where my thinking comes stuck is how the wired connection is shared
> to the NinSw over wireless. The laptop, running MacOS in the case
> of my friend, will setup its own NAT to isolate the wireless
> connections from the uplink. The NinSw is then unable to receive
> an IP from the VPN and therefore not appear as part of the same
> network.
> 
> Ignoring the particular case of how "Internet Connection Sharing"
> works on MacOS, would it be possible to setup some "VPN bridge"
> (yes, I made that up) on OpenBSD where it handles the details of
> the VPN connection but forwards the IP address to another device?
> 
> If anyone has more insight into this and can point me in the right
> direction I would be grateful. Similarly if there's been a mistake
> in my thinking please point it out as that could help too.

I'm using OpenBSD IPSec to connect two LAN's (at two locations, with
different ISP's). Have a look at this article:

https://openbsd.fandom.com/wiki/OpenBSD_IPSec_made_easy

This setup has worked flawlessly for me for years now, only occasionally
broken whenever one or both of the ISP's decide to change my dynamically
assigned IP's, upon which I'll have to manually rename one file and
restart the IPSec service. (It happens so seldom that I haven't bothered
looking into how to automate it.)

This setup may require both you and your friend to have an internet
facing OpenBSD gateway situated at/in front of [uplink].

Nice ASCII btw. 

Cheers,

Erling


> 
> --
> Chris Rawnsley
> 
> P.S. the game in question is Civilization 6 and, yes, they very
> annoyingly restricted it to LAN-only multiplayer...



Regarding multiple reports on "display flickering"

2019-10-22 Thread Erling Westenvik
I'd say something fishy is going on and believe it to be drm(4) related.
I don't run xfce but cwm(1) and with compton(1) as compositor since the
latter allows me to have blurred transparent backgrounds in xterm.
This setup hasn't worked for quite some time now (perhaps months?) but I
haven't had time to investigate and just stopped using compton(1) while
awaiting the problem to go away by itself in upcoming snapshots.
However, yesterday I found out that running:

# chmod go+rw /etc/drm0

let me run compton(1) and brings all my eyecandy back. After upgrading
to todays snapshot the mode for /dev/drm0 was set back to 0600:
---
# stat /dev/drm0
1056 51983 crw--- 1 ** ** 22272 0 "Oct 23 00:58:44 2019" "Oct 23 
00:58:44 2019" "Oct 23 01:11:33 2019" 65536 0 0 /dev/drm0

and when attempting to run compton(1) when /dev/drm0 is in this
"default" state, the display will flicker violently, and the terminal
from which I launch compton(1) will output numerous lines containing:
---
radeon: The kernel rejected CS, see dmesg for more information (-22).

while at the same time dmesg(8) gets filled up with:
---
drm:pid35204:evergreen_surface_check_2d *WARNING* 
evergreen_surface_check_2d:282 texture pitch 480 invalid must be aligned with 64
drm:pid35204:evergreen_cs_track_validate_texture *WARNING* 
evergreen_cs_track_validate_texture:832 texture invalid 0x077c0ec1 0x4081 
0x0a0a 0x 0x8000 0x8003045a
[drm] *ERROR* Invalid command stream !

Setting /dev/drm0 to 0666 makes it work again. I guess it's very wrong to set
such permissions so I won't promote it as a solution.

Regards,

Erling


$ cat /var/run/dmesg.boot
OpenBSD 6.6-current (GENERIC.MP) #389: Tue Oct 22 12:01:19 MDT 2019
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 12867665920 (12271MB)
avail mem = 12464975872 (11887MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xfcdf0 (57 entries)
bios0: vendor American Megatrends Inc. version "V1.15" date 03/04/2011
bios0: MICRO-STAR INTERNATIONAL CO.,LTD MS-7599
acpi0 at bios0: ACPI 1.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB SRAT HPET SSDT
acpi0: wakeup devices PCE2(S4) PCE3(S4) PCE4(S4) PCE5(S4) PCE6(S4) PCE7(S4) 
PCE9(S4) PCEA(S4) PCEB(S4) PCEC(S4) SBAZ(S4) P0PC(S4) UHC1(S4) UHC2(S4) 
UHC3(S4) USB4(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Athlon(tm) II X4 635 Processor, 2907.78 MHz, 10-05-03
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,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu0: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu0: AMD erratum 721 detected and fixed
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 200MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Athlon(tm) II X4 635 Processor, 2907.35 MHz, 10-05-03
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,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu1: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu1: AMD erratum 721 detected and fixed
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD Athlon(tm) II X4 635 Processor, 2907.35 MHz, 10-05-03
cpu2: 
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,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu2: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu2: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu2: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu2: AMD erratum 721 detected and fixed
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD Athlon(tm) II X4 635 Processor, 2907.35 MHz, 10-05-03
cpu3: 

Re: Multi media keys on wired USB keyboard not responding

2019-10-05 Thread Erling Westenvik
Stupid me. The keyboard is working! For some reason I don't yet
understand, the usbhidaction(1) config file I created was set to "dos"
by vim(1) early in the process. Perhaps I copied in something I found on
the web. Anyway; hidden ^M's prevented mixerctl command executions, and
moreover; when Anatoli suggested I echo values into a dumpfile
/tmp/uhid_debug, I touch(1)ed that file before proceding, but then
usbhidaction created /tmp/uhid_debug^M instead and put its things in
there while I was busy looking at "tail -f /tmp/uhid_debug)"..
After changing filetype to "unix" everything works as expected. (Except
for my Print Screen key, but that was not covered by my OP anyway.)

Sorry for the noise! (..?! Curiously enough I discovered the "hidden"
debug file while testing noice(1)..)

Regards,

Erling

On Fri, Oct 04, 2019 at 04:39:18PM +0200, Erling Westenvik wrote:
> On Thu, Oct 03, 2019 at 03:08:54PM -0300, Anatoli wrote:
> > Hi Erling,
> Hi Anatoli, sorry for the late reply. Your answer somehow ended up in
> in Gmail spam.
>  
> > Your problem is probably with the page name. Check it with usbhidctl -r
> > -f /dev/uhid0 (the value you're interested in is what is shown for
> > "Collection page").
> 
> $ usbhidctl -r -f /dev/uhid0
> Report descriptor:
> Collection page=Consumer usage=Consumer_Control
> Input   size=16 count=1 Array page=Consumer usage=Unassigned..0x03ff, logical 
> range 0..1023
> Input   size=8 count=1 Array page=Keyboard usage=No_Event..0x00ff, logical 
> range 0..255
> Input   size=1 count=1 page=Microsoft usage=0xfe03, logical range 0..1
> Input   size=1 count=1 page=Microsoft usage=0xfe04, logical range 0..1
> Input   size=5 count=1 page=Microsoft usage=0xff05, logical range 0..31
> Input   size=8 count=1 page=Microsoft usage=0xff02, logical range 0..255
> End collection
> Total   input size 7 bytes
> Total  output size 0 bytes
> Total feature size 0 bytes
> > 
> > Also, it's probably required for the actions to go on new lines in the
> > action config.
> 
> They do in my config. I just joined the lines in my original email
> before sending. For no really good reason I admit.
> 
> >And for dubugging I'd use something like `echo 1 >>
> > /tmp/uhid_debug` so you know that it's working, e.g.:
> > Consumer:Volume_Decrement 1
> > echo 1 >> /tmp/uhid_debug
> 
> Absolutely no output. It's like the keys don't exist no matter what I
> try. Are there ways to test for keyboard input at a lower level – like
> in single user mode, before the USB driver potentially gets clogged by
> other devices/processes?
> 
> > On the other hand, I'm working on a new driver that would make all this
> > usbhid* operations unnecessary, the keys would work natively.
> 
> I'm looking forward to that! Please feel free to contact me for testing
> diffs.
> 
> Regards,
> Erling
> 
> > 
> > Regards,
> > Anatoli
> > 
> > On 2/10/19 09:54, Erling Westenvik wrote:
> > > Hi,
> > > I am unable to get the four multimedia keys (Play/Pause, Volume
> > > Decrement/Increment, Mute) on my old'ish USB Microsoft Wired Keyboard
> > > 600 to respond.
> > > I have tried to do my homework by reading man pages, like
> > > usbhidaction(1) and usbhidctl(1), and I've been looking at how-tos on
> > > the net [1], but to no prevail and I've decided to reach out to misc@
> > > for guidance. dmesg(1) below [2].
> > > 
> > > This is what I have tried:
> > > 
> > > 1. Identifying key strokes:
> > > 
> > >$ usbhidctl -l -f /dev/uhid0
> > >Consumer_Control.Play/Pause=1
> > >Consumer_Control.No_Event=1
> > >Consumer_Control.0xfe03=0
> > >Consumer_Control.0xfe04=0
> > >Consumer_Control.0xff05=0
> > >Consumer_Control.0xff02=0
> > >
> > >Consumer_Control.Unassigned=1
> > >Consumer_Control.No_Event=1
> > >Consumer_Control.0xfe03=0
> > >Consumer_Control.0xfe04=0
> > >Consumer_Control.0xff05=0
> > >Consumer_Control.0xff02=0
> > >
> > >[...identical output (except for name) for the other four keys...]
> > > 
> > > 2. usbhidaction(1) configuration file:
> > > 
> > >$ cat ~/.usbhidaction.conf
> > >Consumer:Play/Pause 1 mixerctl outputs.master.mute=toggle
> > >Consumer:Volume_Decrement 1 mixerctl outputs.master=-8
> > >Consumer:Volume_Increment 1 mixerctl outputs.master=+8
> > >Consumer:Mute 1 mixerctl outputs.master.mute=toggle
> > > 
> > >

Re: Multi media keys on wired USB keyboard not responding

2019-10-04 Thread Erling Westenvik
On Thu, Oct 03, 2019 at 03:08:54PM -0300, Anatoli wrote:
> Hi Erling,
Hi Anatoli, sorry for the late reply. Your answer somehow ended up in
in Gmail spam.
 
> Your problem is probably with the page name. Check it with usbhidctl -r
> -f /dev/uhid0 (the value you're interested in is what is shown for
> "Collection page").

$ usbhidctl -r -f /dev/uhid0
Report descriptor:
Collection page=Consumer usage=Consumer_Control
Input   size=16 count=1 Array page=Consumer usage=Unassigned..0x03ff, logical 
range 0..1023
Input   size=8 count=1 Array page=Keyboard usage=No_Event..0x00ff, logical 
range 0..255
Input   size=1 count=1 page=Microsoft usage=0xfe03, logical range 0..1
Input   size=1 count=1 page=Microsoft usage=0xfe04, logical range 0..1
Input   size=5 count=1 page=Microsoft usage=0xff05, logical range 0..31
Input   size=8 count=1 page=Microsoft usage=0xff02, logical range 0..255
End collection
Total   input size 7 bytes
Total  output size 0 bytes
Total feature size 0 bytes
> 
> Also, it's probably required for the actions to go on new lines in the
> action config.

They do in my config. I just joined the lines in my original email
before sending. For no really good reason I admit.

>And for dubugging I'd use something like `echo 1 >>
> /tmp/uhid_debug` so you know that it's working, e.g.:
> Consumer:Volume_Decrement 1
>   echo 1 >> /tmp/uhid_debug

Absolutely no output. It's like the keys don't exist no matter what I
try. Are there ways to test for keyboard input at a lower level – like
in single user mode, before the USB driver potentially gets clogged by
other devices/processes?

> On the other hand, I'm working on a new driver that would make all this
> usbhid* operations unnecessary, the keys would work natively.

I'm looking forward to that! Please feel free to contact me for testing
diffs.

Regards,
Erling

> 
> Regards,
> Anatoli
> 
> On 2/10/19 09:54, Erling Westenvik wrote:
> > Hi,
> > I am unable to get the four multimedia keys (Play/Pause, Volume
> > Decrement/Increment, Mute) on my old'ish USB Microsoft Wired Keyboard
> > 600 to respond.
> > I have tried to do my homework by reading man pages, like
> > usbhidaction(1) and usbhidctl(1), and I've been looking at how-tos on
> > the net [1], but to no prevail and I've decided to reach out to misc@
> > for guidance. dmesg(1) below [2].
> > 
> > This is what I have tried:
> > 
> > 1. Identifying key strokes:
> > 
> >$ usbhidctl -l -f /dev/uhid0
> >Consumer_Control.Play/Pause=1
> >Consumer_Control.No_Event=1
> >Consumer_Control.0xfe03=0
> >Consumer_Control.0xfe04=0
> >Consumer_Control.0xff05=0
> >Consumer_Control.0xff02=0
> >
> >Consumer_Control.Unassigned=1
> >Consumer_Control.No_Event=1
> >Consumer_Control.0xfe03=0
> >Consumer_Control.0xfe04=0
> >Consumer_Control.0xff05=0
> >Consumer_Control.0xff02=0
> >
> >[...identical output (except for name) for the other four keys...]
> > 
> > 2. usbhidaction(1) configuration file:
> > 
> >$ cat ~/.usbhidaction.conf
> >Consumer:Play/Pause 1 mixerctl outputs.master.mute=toggle
> >Consumer:Volume_Decrement 1 mixerctl outputs.master=-8
> >Consumer:Volume_Increment 1 mixerctl outputs.master=+8
> >Consumer:Mute 1 mixerctl outputs.master.mute=toggle
> > 
> > 3. Executing usbhidaction during xsession or from xterm..
> > 
> >$ usbhidaction -c ~/.usbhidaction.conf -f /dev/uhid0
> > 
> >..exits without errors but keys are not responding.
> > 
> > Bwt:
> > - I used to have a PS/2 keyboard with multi media keys and it was
> >   working well with the machine in question.
> > - The current USB keyboard is tested and fully functional on another
> >   machine running Windows 7.
> > - None of the multi media keys gets detected by xev(1).
> > 
> > 
> > Regards,
> > 
> > Erling
> > 
> > ---
> > [1] https://www.bsdhowto.ch/extrakeys.html
> > [2] $ dmesg
> > OpenBSD 6.6-beta (GENERIC.MP) #314: Mon Sep 16 19:13:24 MDT 2019
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > real mem = 12867665920 (12271MB)
> > avail mem = 12464992256 (11887MB)
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xfcdf0 (57 entries)
> > bios0: vendor American Megatrends Inc. version "V1.15" date 03/04/2011
> > bios0: MICRO-STAR INTERNATIONAL CO.,LTD MS-7599
> > acpi0 at bios0: ACPI 1.0
> > acpi0: sleep states S0 S3 S4 S5
> > acpi0: tables 

Multi media keys on wired USB keyboard not responding

2019-10-02 Thread Erling Westenvik
Hi,
I am unable to get the four multimedia keys (Play/Pause, Volume
Decrement/Increment, Mute) on my old'ish USB Microsoft Wired Keyboard
600 to respond.
I have tried to do my homework by reading man pages, like
usbhidaction(1) and usbhidctl(1), and I've been looking at how-tos on
the net [1], but to no prevail and I've decided to reach out to misc@
for guidance. dmesg(1) below [2].

This is what I have tried:

1. Identifying key strokes:

   $ usbhidctl -l -f /dev/uhid0
   Consumer_Control.Play/Pause=1
   Consumer_Control.No_Event=1
   Consumer_Control.0xfe03=0
   Consumer_Control.0xfe04=0
   Consumer_Control.0xff05=0
   Consumer_Control.0xff02=0
   
   Consumer_Control.Unassigned=1
   Consumer_Control.No_Event=1
   Consumer_Control.0xfe03=0
   Consumer_Control.0xfe04=0
   Consumer_Control.0xff05=0
   Consumer_Control.0xff02=0
   
   [...identical output (except for name) for the other four keys...]

2. usbhidaction(1) configuration file:

   $ cat ~/.usbhidaction.conf
   Consumer:Play/Pause 1 mixerctl outputs.master.mute=toggle
   Consumer:Volume_Decrement 1 mixerctl outputs.master=-8
   Consumer:Volume_Increment 1 mixerctl outputs.master=+8
   Consumer:Mute 1 mixerctl outputs.master.mute=toggle

3. Executing usbhidaction during xsession or from xterm..

   $ usbhidaction -c ~/.usbhidaction.conf -f /dev/uhid0

   ..exits without errors but keys are not responding.

Bwt:
- I used to have a PS/2 keyboard with multi media keys and it was
  working well with the machine in question.
- The current USB keyboard is tested and fully functional on another
  machine running Windows 7.
- None of the multi media keys gets detected by xev(1).


Regards,

Erling

---
[1] https://www.bsdhowto.ch/extrakeys.html
[2] $ dmesg
OpenBSD 6.6-beta (GENERIC.MP) #314: Mon Sep 16 19:13:24 MDT 2019
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 12867665920 (12271MB)
avail mem = 12464992256 (11887MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xfcdf0 (57 entries)
bios0: vendor American Megatrends Inc. version "V1.15" date 03/04/2011
bios0: MICRO-STAR INTERNATIONAL CO.,LTD MS-7599
acpi0 at bios0: ACPI 1.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB SRAT HPET SSDT
acpi0: wakeup devices PCE2(S4) PCE3(S4) PCE4(S4) PCE5(S4) PCE6(S4) PCE7(S4) 
PCE9(S4) PCEA(S4) PCEB(S4) PCEC(S4) SBAZ(S4) P0PC(S4) UHC1(S4) UHC2(S4) 
UHC3(S4) USB4(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Athlon(tm) II X4 635 Processor, 2907.73 MHz, 10-05-03
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,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu0: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu0: AMD erratum 721 detected and fixed
tsc_timecounter_init: TSC skew=0 observed drift=0
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 200MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
TSC skew=3
cpu1: AMD Athlon(tm) II X4 635 Processor, 2907.34 MHz, 10-05-03
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,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu1: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu1: AMD erratum 721 detected and fixed
tsc_timecounter_init: TSC skew=3 observed drift=0
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
TSC skew=4
cpu2: AMD Athlon(tm) II X4 635 Processor, 2907.34 MHz, 10-05-03
cpu2: 
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,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu2: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu2: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu2: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu2: AMD erratum 721 detected and fixed
tsc_timecounter_init: TSC skew=4 observed drift=0
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
TSC skew=-18
cpu3: AMD 

Re: Errors when I try to configure multiple DNS search suffixes in dhcpd.conf

2019-09-24 Thread Erling Westenvik
On Tue, Sep 24, 2019 at 08:11:00AM +, Carlos Lopez wrote:
> When I try to configure multiple search DNS suffixes in dhcpd.conf, I
> am receiving the following error:
> 
> /etc/dhcpd.conf line 21:
>   option domain-search "custom.domain.org"
>  ^
> fatal in dhcpd: Configuration file errors encountered
> 
> According to man page:

To avoid ambiguity you should always state explicitly to which man page
you are referring. In this case you're not quoting dhcpd.conf(5) but
dhcp-options(5).

> option domain-search rfc1035; | string [, string ...];
> [...]
> Note that dhcpd(8) calls this option option-119 instead of
> domain-search and only supports the rfc1035 variant.
> [...]

This is it! Change

option domain-search "custom.domain.org"

to

option option-119 "custom.domain.org"

and you should be good to go.

Regards,
Erling Westenvik



Re: Possible to create softraid device from existing disk(s)?

2019-03-10 Thread Erling Westenvik
On Sun, Mar 10, 2019 at 10:18:47AM +, John Long wrote:
> Hi,
> 
> I have a server running OpenBSD. It has slots for 4 drives. I have the
> OS and web content on one drive and media files on another drive. I
> have been running rsync to backup these drives to identically-sized
> drives in the same box. Basically 2 drives are used to run the services
> (dlna, Samba, http) and the other 2 drives are backups.
> 
> I would like to use softraid so that I don't have to run backups
> manually or on a schedule with cron etc. I understand RAID is not a
> backup strategy but at the same time my threat model is failing
> hardware rather than anything else.
> 
> Is there a way to use softraid to create 2 separate RAID mirrors of the
> two main drives that are already populated with data?

Hello,
I guess what you're really asking is: is there some way to 'upgrade' the
current disks metadata so that they become RAID 1 disks which then can
be 'duplicated' by using bioctl(8)'s rebuild?

In that case: Not AFAIK, and it would probably be a messy and risky
affair anyway.

I believe you will be forced to manually duplicate your existing disk
and partition layouts to newly created RAID 1 sets and then do a lot of
dd(1)'ing. Not trivial, at least not for the os drive, but doable.

As for backup strategy: Just make sure you keep at least a third disk
(and probably a fourth as well, both known to be functional copies of
course), truly offline and cycling them only with other known functional
copies. (The good thing with RAID as backup is its 'instantly-duplicate-
what-i-want' capacity, while the downside is the equally efficient
'instantly-duplicate-my-mistakes-and-errors-as-well' feature'...)

Good luck,

Erling

> Thanks,
> 
> /jl



Re: Shadow artifacts and color distortions when using compton(1). Perhaps after recent Xenocara update?

2019-02-11 Thread Erling Westenvik
On Sun, Feb 10, 2019 at 03:39:29PM -0800, Thomas Frohwein wrote:
> On Sun, Feb 10, 2019 at 11:16:03PM +0100, Erling Westenvik wrote:
> > Hi,
> > After upgrading to todays snapshot (February 10th) I experience some rather
> > ugly shadow artifacts and color distortions when using compton(1) under 
> > cwm(1).
> > It may perhaps best be described by linking to an issue report from April 
> > 2018
> > at github:
> > 
> > https://github.com/chjj/compton/issues/487
> > 
> > and from that page - a link to a screendump showing exactly what I 
> > experience:
> > 
> > https://framapic.org/dHfk2217huGs/NIiGKJsfnz52.jpg
> > 
> > The problem can be reproduced by specifying "glx" as backend in compton(1). 
> >  It
> > appear to have been major glx-related imports in Xenocara on January 29th 
> > 2019.
> > My previous snapshot was older than that, perhaps as old as from December 
> > 2018,
> > but for certain newer than the previous bulk import which appears to have
> > been October 23rd 2018.
> > 
> > My graphics card is a ATI Radeon HD 5770. Dmesg below.
> > 
> > Not sure how to attack this. Help/ideas appreciated.
> [...]
> 
> Yep, I noticed the same with compton after the update to Mesa 18 in snaps. I
> think the following GitHub issue is actually the more fitting one:
> 
> https://github.com/chjj/compton/issues/477
> 
> For me, switching to xrender backend for compton is a satisfactory solution
> until the freedesktop bug referenced in the above link [1] has been addressed.
> 
> [1] https://bugs.freedesktop.org/show_bug.cgi?id=104597

At least for me that comes with a huge performance penalty, and I cannot
have blurred transparent backgrounds. All right, so it's just eye candy,
but I find the ability to have a certain sense of visual depth really
helpful.

Regards,

Erling



Shadow artifacts and color distortions when using compton(1). Perhaps after recent Xenocara update?

2019-02-10 Thread Erling Westenvik
Hi,
After upgrading to todays snapshot (February 10th) I experience some rather
ugly shadow artifacts and color distortions when using compton(1) under cwm(1).
It may perhaps best be described by linking to an issue report from April 2018
at github:

https://github.com/chjj/compton/issues/487

and from that page - a link to a screendump showing exactly what I experience:

https://framapic.org/dHfk2217huGs/NIiGKJsfnz52.jpg

The problem can be reproduced by specifying "glx" as backend in compton(1).  It
appear to have been major glx-related imports in Xenocara on January 29th 2019.
My previous snapshot was older than that, perhaps as old as from December 2018,
but for certain newer than the previous bulk import which appears to have
been October 23rd 2018.

My graphics card is a ATI Radeon HD 5770. Dmesg below.

Not sure how to attack this. Help/ideas appreciated.

Regards,

Erling


$ dmesg
OpenBSD 6.4-current (GENERIC.MP) #697: Sun Feb 10 00:50:23 MST 2019
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 12867665920 (12271MB)
avail mem = 12467994624 (11890MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xfcdf0 (57 entries)
bios0: vendor American Megatrends Inc. version "V1.15" date 03/04/2011
bios0: MICRO-STAR INTERNATIONAL CO.,LTD MS-7599
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB SRAT HPET SSDT
acpi0: wakeup devices PCE2(S4) PCE3(S4) PCE4(S4) PCE5(S4) PCE6(S4) PCE7(S4) 
PCE9(S4) PCEA(S4) PCEB(S4) PCEC(S4) SBAZ(S4) P0PC(S4) UHC1(S4) UHC2(S4) 
UHC3(S4) USB4(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Athlon(tm) II X4 635 Processor, 2907.77 MHz, 10-05-03
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,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu0: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu0: AMD erratum 721 detected and fixed
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 200MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Athlon(tm) II X4 635 Processor, 2907.33 MHz, 10-05-03
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,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu1: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu1: AMD erratum 721 detected and fixed
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD Athlon(tm) II X4 635 Processor, 2907.33 MHz, 10-05-03
cpu2: 
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,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu2: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu2: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu2: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu2: AMD erratum 721 detected and fixed
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD Athlon(tm) II X4 635 Processor, 2907.33 MHz, 10-05-03
cpu3: 
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,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,ITSC
cpu3: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu3: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu3: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu3: AMD erratum 721 detected and fixed
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318180 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PCE2)
acpiprt2 at acpi0: bus -1 (PCE3)
acpiprt3 at acpi0: bus -1 (PCE4)
acpiprt4 at acpi0: bus -1 (PCE5)
acpiprt5 at acpi0: bus 2 (PCE6)
acpiprt6 at acpi0: bus -1 (PCE7)
acpiprt7 at 

Re: VPN over alias address

2018-10-15 Thread Erling Westenvik
On Mon, Oct 15, 2018 at 01:05:28PM -0400, Sonic wrote:
> Have setup a site-to-site VPN using alias addresses which works fine
> for systems inside the network, however, when attempting to connect
> from the routers themselves to the remote network the fact that they
> use the default address on the external interface and not the chosen
> alias address appears to be preventing a connection.
> How does one tell the router to use the chosen outbound alias address
> instead of the default address when sending to the specific remote
> network?

Way out of my league, but on my ipsec/isakmpd setup I do:

# cat /etc/hostname.fxp0
dhcp
!route add -net /24 

Erling



Re: Debug / Driver / Kernel / WiFi

2018-10-05 Thread Erling Westenvik
On Fri, Oct 05, 2018 at 05:12:33PM +0200, Stefan Sperling wrote:
> On Fri, Oct 05, 2018 at 04:53:40PM +0200, def...@posteo.de wrote:
>> I try to make new driver for AR5424* WiFi Module (ath0) becouse of a lot
>> of issues on my Fujitsu Esprimo Mobile U9210 Laptop. (Just not working
>> out of the box)

I have two U9210's and would love to see support for the AR5424.
However, you might be better off by simply replacing the card. On one of
my two U9210's I replaced it with a working AR9281/athn(4) 802.11n.
Accessing the card is quite easy and requires only unscrewing two or
four screws and then carefully bending open the bezel above the
keyboard.

On Fri, Oct 05, 2018 at 05:12:33PM +0200, Stefan Sperling wrote:
> Please fix the existing driver instead of adding a new one.
> A patch was submitted for this device some time ago but there was
> never any follow-up after the first round of review process:
> https://marc.info/?t=15170706164=1=2

Actually that thread was the same OP. Right, Oleg?

> You could use that patch as a starting point. But please note that it's
> unclear whether some or all of these changes were copied from GPL code.
> It would be better to base such changes on the FreeBSD driver which
> seems to support this device as well.
> 
> > Could you be so kind to answer:
> > 
> > 1. How can I try my new Driver without Build Kernel each time.
> 
> No. You have to rebuild the kernel each time.
> 
> > 2. What kind of tools can I use for Debuging WiFi ... (just examples)
> 
> Many. Start working on it and ask again when you run into specific problems.
> 
> > 3. Any info about OpenBSD Drivers ? Developers Guides (Just for OpenBSD)
> 
> See https://www.openbsd.org/papers/eurobsdcon2017-device-drivers.pdf
> and other presentations mentioned therein.

There is this article (also by Stefan) from 2014 as well:

http://undeadly.org/cgi?action=article=20140721125235

Good luck. Please let me know if I can be of any help in testing.

Erling



Panic after introduction of unveil(2) on system with missing /tmp mount point

2018-09-29 Thread Erling Westenvik
A few days ago I did the first reboot after an upgrade from snapshots a
couple of weeks ago. The machine panicked with the below message which
I've never seen before (transcription from image on my mobile camera)
and I had to do a warm reboot:

8<
login: syncing disks... panic: kernel diagnostics assertion "vp->v_uvcount == 
0" failed: file "/usr/src/sys/kern/kern_unveil.c", line 746
Stopped at  db_enter+0x12:  popq%r11
TIDPIDUID PRFLAGS PFLAGS  CPU  COMMAND
*489797  51004  0 0x3  00K reboot
db_enter() at db_enter+0x12
panic() at panic+0x120
__assert(81256574,80002374eed0,0,ff02cdeb50e8) at __assert+0x24

unveil_removevnode(983a7d3933c3f079) at unveil_removevnode+0xf2
dounmount_leaf(1252bfd8bac9e733,80302c40,0) at dounmount_leaf+0x69
dounmount(602b6b5dc61da66e,80203c40,80203c00) at dounmount+0xfa

vfs_unmountall() at vfs_unmountall+0xad
vfs_shutdown(0) at vfs_shutdown+0x39
boot(7f7f5d78) at boot+0x59
reboot(80002374f0a0) at reboot+0x5a
sys_reboot(9595068f44d5290e,800024b85850,817f7323) at sys_reboot+0x
73
syscall(b0161255ac32403c) at syscall+0x32a
Xsyscall(6,37,2,37,2,16fdcac30cf6) at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7f5df0, count: 2
https://www.openbsd.org/ddb.html describes the minimum info required in bug
--db_more--
>8

Now, the following is embarrasing: It turns out that I for six months
have been running with the following in my /etc/fstab without noticing:

bffb6e701554bf34.d /mnt (usually assigned to /tmp, right!)

It is simply a typo from when I manually disklabeled a fresh install of
-current on my main workstation. I didn't notice until today when / suddenly
got filled up after I tried editing a large video file.

I changed /etc/fstab and did a new reboot, upon which the above panic
happened again. Another reboot after that (with /tmp finally properly
mounted) went well however.

I'm aware this is not a proper bug report. I just thought the transcript might
be useful to some developers since it seems to involve unveil(2). Before the
introduction of unveil(2) I had no problems rebooting the system with a missing
mount of /tmp.

Regards,

Erling



Re: How to make the cwm window manager reread new config

2018-09-15 Thread Erling Westenvik
On Sat, Sep 15, 2018 at 08:38:25PM +0200, Antoine Jacoutot wrote:
> On Sat, Sep 15, 2018 at 08:41:52PM +0300, Родин Максим wrote:
> > Hello,
> > May be a silly question,
> > how can I make the cwm window manager reread its config file
> > without loosing my working session?
> 
> From cwmrc(5):
> BIND FUNCTION LIST
>  restart  Restart the running cwm(1).
> 
> And from cwm(1):
>  cwm rereads its configuration file when it receives a hangup signal,
>  SIGHUP, by executing itself with the name and arguments with which it was
>  started.  This is equivalent to the restart function.

..which in default config is bound to CMS-r. Pressing
Control-Meta-Shift-r rereads config and redraw windows.

Erling



Re: PF rule - am I being stupid ?

2018-09-05 Thread Erling Westenvik
On Wed, Sep 05, 2018 at 05:14:14PM +, Bob Smith wrote:
> I'm banging my head against a brick wall here trying to figure out why PF (on 
> OpenBSD 6.3) is allowing some packets but blocking others ?
> Here's the tcpdump:
> Sep 05 18:07:45.084191 rule 39/(match) pass in on vlan108: 192.0.2.150.49156 
> > 198.51.100.158.20001: udp 47
> Sep 05 18:07:45.084220 rule 39/(match) pass out on em2: 192.0.2.150.49156 > 
> 198.51.100.158.20001: udp 47
> Sep 05 18:08:01.136633 rule 39/(match) pass in on vlan108: 192.0.2.150.49157 
> > 198.51.100.158.69: 47 RRQ "MainIp5340e.bin"
> Sep 05 18:08:01.136661 rule 39/(match) pass out on em2: 192.0.2.150.49157 > 
> 198.51.100.158.69: 47 RRQ "MainIp5340e.bin"
> Sep 05 18:08:25.607885 rule 11/(match) block in on vlan108: 192.0.2.150.6998 
> > 198.51.100.158.6801: R 16764161:16764161(0) ack 209207857 win 4224 [tos 
> 0x60]
> Sep 05 18:08:27.919688 rule 11/(match) block in on vlan108: 192.0.2.150.6978 
> > 198.51.100.158.6802: R 17473283:17473283(0) ack 3296254713 win 4224 [tos 
> 0x60]
> Sep 05 18:08:32.594889 rule 11/(match) block in on vlan108: 192.0.2.150.6930 
> > 198.51.100.158.6800: R 18671363:18671363(0) ack 3527351279 win 4224 [tos 
> 0x60]
> 
> Here are the rules concerned:
> @11 block drop log all
> @39 pass log quick inet from 192.0.2.150 to 198.51.100.158 flags S/SA

I think it is caused by the packets blocked having the RST flag set -- a
consequence of specifying "flags S/SA" in rule @39. Check out man
pf.conf. Look for section about "flags a/b | any" (line 317 here). 



Re: How can I mount a HDD with full encryption on another system?

2018-08-02 Thread Erling Westenvik
On Fri, Aug 03, 2018 at 12:06:41AM +0200, Felix Maschek wrote:
> I've used a full encrypted HDD (created as described in the OpenBSD FAQ) on
> a broken system and want to backup some data from it.
> I've assembled this HDD into an external USB case and want to mount the HDD
> on another system. How can I mount this HDD? Needless to say that I know the
> passphrase...

Find the disk:

$ dmesg | grep CRYPTO
sd3 at scsibus4 targ 2 lun 0:  SCSI2 0/direct fixed

# disklabel sd3
...  size   offset  fstype [fsize bsize   cpg]
  a:488279018   64  RAID
...

Unlock it:
# bioctl -c C -l /dev/sd3a softraid0

... attached as sd4 ...

# disklabel sd4
...

Mount partitions:
# mount /dev/sd4k /mnt/home


Good luck,

Erling



Re: print usb printer by [ Google Cloud Print for Chromium ]

2018-05-16 Thread Erling Westenvik
On Wed, May 16, 2018 at 12:45:12AM -0700, Jordan Geoghegan wrote:
> On 05/16/18 00:27, Tuyosi T wrote:
> > hi
> > i can not distinguish between lp and lpr .
> > 
> lpr(1) is a program used to print to an lpd server, wheras lp(4) is a driver
> that doesn't appear to have been ported from 4.4BSD yet.

lp(1) gets installed as part of cups(1).

> https://man.openbsd.org/lpr.1
> https://man.openbsd.org/NetBSD-7.1/lp.4



Re: Machine won't boot - softraid metadata version mismatch

2018-05-03 Thread Erling Westenvik
On Thu, May 03, 2018 at 10:51:12AM -0500, Brandon Tanner wrote:
> I haven't posted here in years, and OpenBSD has been rock solid for a home
> file server. However recently I somehow made the machine un-bootable and
> I'm kicking myself for it now. I've tried to google my heart out to fix
> this issue, but I doubt it is very common based on my searches.

Don't panic.

> My machine is OpenBSD 5.4, and has 2 x raid1 softraid with 4 disks, and a
> 5th disc for the OS only.
>
> So I was wanting to try out the latest kernel to see if sysctl hw.sensors
> would report my motherboard fan sensors since 5.4 does not, so I made a
> bootable USB live-stick using 6.3, based on this article (
> http://astro-gr.org/openbsd-live-usb-stick/) which says to prepare the
> machine in QEMU and then dd it to a usb flash drive. I was able to boot the
> USB stick fine, and run sysctl, and nope, my fan sensors are not there in
> 6.3 either.
>
> Now, when I removed the stick and booted the old system (5.4), it now won't
> boot. The complaint is that my softraid volumes have a metadata version
> that is newer than it should be. I guess the live-USB stick actually
> upgraded them somehow.

Quoting https://www.openbsd.org/faq/upgrade60.html:

"softraid(4) metadata version changed. The current softraid metadata
version has been incremented as part of implementing support for sector
sizes other than 512 bytes. Since on-disk metadata is automatically
updated every time a softraid volume is mounted, once you mount a
softraid volume on a new kernel (including bsd.rd) that volume will no
longer be recognized by older kernels."

As I see it, you have two options:

1. Upgrade your system to at least 6.0, carefully upgrading version by
   version and following the steps for each upgrade guide:

5.4 -> 5.5
5.5 -> 5.6
5.6 -> 5.7
5.7 -> 5.8
5.8 -> 5.9
5.9 -> 6.0
6.0 -> 6.1
6.1 -> 6.2
6.2 -> 6.3

2. Do a fresh install of 6.3.

I would go for option 1. It takes time but you'll learn a lot during the
process, and in the end it may take you just as long to fine tune a
fresh install.

> The error is basically:
> softraid0: cannot read metadata version 6 on sd1a, expected version 5 or
> earlier
>
> Full Pictures of it are here:
> https://imgur.com/a/jYhVwra

Which tells us that your OS disk is probably just fine. If you comment
out the raid volumes from /etc/fstab, you won't get any complaints,
right?

> It looks like this person has a similar experience:
> http://openbsd-archive.7691.n7.nabble.com/softraid-not-bootable-in-5-4-after-visiting-5-5-td253121.html#a253330
>
> At this point I'm not sure what to do, and I'm afraid to guess at options
> for fear of losing my data. My gut feeling is that I can probably fix this
> or put a new O/S drive in and install 6.3 on it fresh, and somehow get my
> softraid volumes back up on it. But I wanted to run that theory by you all
> first.
>
> Thanks,
> Brandon

Good luck.

Regards,

Erling



Re: Wake-on-LAN from suspended state

2018-04-25 Thread Erling Westenvik
On Wed, Apr 25, 2018 at 05:33:15PM +0100, geo...@t-t-l.co.uk wrote:
> On 25/04/18 07:55, Paul de Weerd wrote:
> > On Wed, Apr 25, 2018 at 02:27:44AM -0400, Jiri B wrote:
> > | On Tue, Apr 24, 2018 at 10:11:44PM +0200, Paul de Weerd wrote:
> > | > [...]
> > | > em0 at pci0 dev 25 function 0 "Intel I217-LM" rev 0x04: msi, address 
> > b8:ca:3a:93:03:e8
> > |
> > | IIUC em does not support WOL. Am I right?
> >
> > Thanks Jiri, Daniel and one person who responded off-list.  I had
> > missed the ifconfig wol option, this does exactly what I want:
> >
> >  wol Enable Wake on LAN (WoL).  When enabled, reception of a
> >  WoL frame will cause the network card to power up the
> >  system from standby or suspend mode.  WoL frames are sent
> >  using arp(8).
> >
> >
> > But indeed, as Jiri suggests, it seems that em(4) doesn't support WOL:
> >
> > [weerd@pom] $ doas ifconfig em0 wol
> > ifconfig: SIOCSIFXFLAGS: Not supported
> >
> > Thanks for all the replies!
> >
> > Paul 'WEiRD' de Weerd
> >
> Hi Paul,
>
> I see the same apparent lack of support but I've been using wol happily with
> em on both 6.2 and 6.3 i386 ...  I use it to wake up a box shutdown with
> "halt -p".
>
> I don't remember doing anything clever and I can't see anything related in
> any config files.

In this context, em(4) refers to the OpenBSD driver (man em), not the
actual physical device. Many em-devices support WoL at BIOS-level and
machines with such setup will cold boot successfully. Resuming from
suspend/hibernate is an altogheter different affair. It works partly on
an em-machine I have. At least for the first zzz/arp cycle.

I'm wondering: are there any OpenBSD drivers that support WoL at all? 

Regards,
Erling



Re: X server keeps crashing in current/amd64

2018-03-18 Thread Erling Westenvik
On Sat, Mar 17, 2018 at 10:40:55PM +0100, Robert wrote:
> Since about two weeks the X server keeps crashing (segfault) most of the
> time when I start it (through xenodm).
> I have to restart it (rcctl restart xenodm) about 5-10 times
> until I get an (xfce) session that stays stable.
>
> I reinstalled today with the latest current/amd64, and now this issue became
> worse: In addition, even when I get a stable session, it crashes as
> soon as I do some actions, such as moving the mouse for a couple of
> seconds or starting Firefox.

How long since you did an update before you started having problems? I
had a similar situation some time ago on one of my current- machines
that I hadn't updated in a long time.

Check the upgrade guides:
https://www.openbsd.org/faq/upgrade62.html
https://www.openbsd.org/faq/upgrade61.html
And so on. And/or install sysclean(1) and have a look at its output.

Between upgrades I usually run:

# pkg_delete -[n]a

(-n being dry mode to see any changes without actually removing things.)

You may also take a look at pkg_check but read the man page first.

Best regards,

Erling

> Xorg.log says (from various such occurences):
> (EE) Segmentation fault at address 0x64bfcd81018
> (EE) Segmentation fault at address 0x17e082969018
> (EE) Segmentation fault at address 0x78e6159b000
>
> Any ideas / recommendations on how to debug or fix this?
> (dmesg / xorg log below)
>
> Installing 6.2/amd64 removes the issue, so I don't think it's a hardware 
> problem.
>
> If it is relevant, this is an AMD Verde GPU, where the driver uses
> software rendering. Also, I disabled xhci in the kernel (using config) due to 
> https://marc.info/?l=openbsd-misc=143442925331480 .
>
> regards,
> Robert
>
>
> dmesg (current
> OpenBSD 6.3 (GENERIC.MP) #68: Fri Mar 16 01:24:47 MDT 2018
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 17113550848 (16320MB)
> avail mem = 16587821056 (15819MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xec380 (81 entries)
> bios0: vendor Dell Inc. version "A15" date 02/15/2017
> bios0: Dell Inc. OptiPlex 3020
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP APIC FPDT SLIC SSDT SSDT SSDT HPET SSDT MCFG SSDT
> acpi0: wakeup devices PXSX(S4) RP01(S4) PXSX(S4) PXSX(S4) PXSX(S4) RP04(S4) 
> PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) PXSX(S4) PXSX(S4) GLAN(S4) EHC1(S0) 
> EHC2(S0) XHC_(S0) [...]
> 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-4590 CPU @ 3.30GHz, 3492.35 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,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT,MELTDOWN
> cpu0: 256KB 64b/line 8-way L2 cache
> acpitimer0: recalibrated TSC frequency 3292383348 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 mainbus0: apid 2 (application processor)
> cpu1: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz, 3491.93 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,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,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-4590 CPU @ 3.30GHz, 3491.93 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,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,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-4590 CPU @ 3.30GHz, 3491.93 MHz
> cpu3: 
> 

Re: Trying to build golang on 9th march snapshot

2018-03-12 Thread Erling Westenvik
On Mon, Mar 12, 2018 at 08:44:09PM -0400, Patrick Marchand wrote:
> Like it says on the tin, I tried building golang so I could get fzf but
> I get the following compilation errors. I got help to build rustlang
> last time, so maybe golang is just a small fix away? I didnt see any
> mention of golang in the ports mailing list in the last few days.

Apparently something to do with Go according to a message I received
off-list after writing to the maintainer of syncthing(1) earlier today:

>> Syncthing is written in go. Go is fucked right now because of the
>> MAP_STACK diff.

Erling



Re: Segmentation fault when opening a particular PDF file in mupdf

2018-02-15 Thread Erling Westenvik
On Fri, Feb 16, 2018 at 05:38:11AM +1300, Carlin Bingham wrote:
> On 16/02/2018 4:28 a.m., Xianwen Chen wrote:
> > mupdf crashes and reports segmentation fault when I try to open a
> > particular PDF file:
> > https://brage.bibsys.no/xmlui/bitstream/handle/11250/2440173/SoL-Rapport-2014-06.pdf?sequence=1=y
> >
> > If you use mupdf too, could you try to open the file and see whether
> > mupdf crashes on your computer too? In that way, you can help me
> > understand whether the problem is reproducible.

Opens just fine. See below.

> Are you using 6.2 with mupdf-1.11p1?
> There was a crash that's fixed on -current:
> https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/textproc/mupdf/patches/patch-source_fitz_load-jpx_c?rev=1.5=text/x-cvsweb-markup

I'm using current as of yesterday, February 14th, here.

Erling



Re: xterm not showing Norwegian alphabet

2018-02-10 Thread Erling Westenvik
On Sat, Feb 10, 2018 at 10:41:19PM +, Xianwen Chen wrote:
> Could you check whether you can reproduce my problem by entering csh
> and typing æ, ø, and å? If it is confirmed, I think I would like to
> file a bug report.

I'm way out of my league here but I can confirm the behaviour.

(Also: when entering sh(1) from csh(1), I can type æ, ø and å again.)

Good luck!

Sincerely,
Erling

> Sincerely,
> Xianwen
>
> On 2/10/18, Erling Westenvik <erling.westen...@gmail.com> wrote:
> > On Sat, Feb 10, 2018 at 07:33:20PM +, Xianwen Chen wrote:
> >> I am however not able to show or type Norwegian alphabet of ø, å, and
> >> æ. ø is shown as C8. å is shown as C%. And æ is shown is C&.
> >
> > See https://www.openbsd.org/faq/faq8.html#locales. Take note of the
> > following:
> >
> > If logging in via xenodm(1), add export LC_CTYPE="en_US.UTF-8"
> > to your ~/.xsession before starting the window manager.
> >
> > Add the export command to the startup file (before invoking any window
> > manager) and restart X. This at least solved my problems with Norwegian
> > characters.
> >
> > Regards,
> > Erling
> >
> >> I tried to copi ø, å, and æ from SeaMonkey to xterm. The same thing
> >> happens.
> >>
> >> I tried to copy C8, C%, and C& from xterm back to SeaMonkey. They
> >> remained two characters as C8, C%, and C&.
> >>
> >> Please help.
> >>
> >> Sincerely,
> >> Xianwen



Re: xterm not showing Norwegian alphabet

2018-02-10 Thread Erling Westenvik
On Sat, Feb 10, 2018 at 07:33:20PM +, Xianwen Chen wrote:
> I am however not able to show or type Norwegian alphabet of ø, å, and
> æ. ø is shown as C8. å is shown as C%. And æ is shown is C&.

See https://www.openbsd.org/faq/faq8.html#locales. Take note of the
following:

If logging in via xenodm(1), add export LC_CTYPE="en_US.UTF-8"
to your ~/.xsession before starting the window manager.

Add the export command to the startup file (before invoking any window
manager) and restart X. This at least solved my problems with Norwegian
characters.

Regards,
Erling

> I tried to copi ø, å, and æ from SeaMonkey to xterm. The same thing happens.
>
> I tried to copy C8, C%, and C& from xterm back to SeaMonkey. They
> remained two characters as C8, C%, and C&.
>
> Please help.
>
> Sincerely,
> Xianwen



Re: Segmentation fault / firefox (core dumped)

2018-01-25 Thread Erling Westenvik
On Fri, Jan 26, 2018 at 12:26:11AM +, Roderick wrote:
> I get continously this and other errors. In OpenBSD, in FreeBSD.

Corrupt Firefox profile? Clogged OpenBSD installation?
You could try Firefox ESR. In packages.

> I think it is time to change browser, but I distrust chrome as comming
> from data collector google.

Perhaps try Iridium? Chrome codebase, but privacy/security enhanced. In
packages.
https://iridiumbrowser.de/

> The problem is that those that make WEB pages decide more or less what
> browser I must use.
>
> What is the real alternative?

Seamonkey, based on and backed by Mozilla? In packages.
https://www.seamonkey-project.org/

Erling



Re: Manual to cd (change working directory)

2017-12-14 Thread Erling Westenvik
"This page intentionally left non-blank"?

14. des. 2017 10:26 p.m. skrev "Christian Weisgerber" :

On 2017-12-13, Ingo Schwarze  wrote:

> That is not a stand-alone command, but a shell built-in.
> Actually, it is not even possible to implement it as a stand-alone
> command because the effect of the intended change would end when
> the command exits.

I think there is/was a POSIX requirement, or at least some people
interpreted it that way, that all shell builtins must also exist
as external commands, and I seem to remember one system, AIX I think,
that actually had an external version of cd(1).  It didn't do
anything sensible, of course, but it was there.

Indeed, proof that I'm not hallucinating this:
https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/
com.ibm.aix.cmds1/cd.htm
| Note
| Running /usr/bin/cd from a shell does not change the shell's working
| directory. The shell's built-in cd command must be used.

--
Christian "naddy" Weisgerber  na...@mips.inka.de


Re: 3g modem

2017-11-05 Thread Erling Westenvik
On Sun, Nov 05, 2017 at 03:33:48PM -0600, Edgar Pettijohn wrote:
> My isp leaves a lot to be desired. I'm into possible backup plans for
> when the connection is unbearable. Are there any 3g usb dongles or
> mini pci devices which work on openbsd?

On my old ThinkPad T500:

$ dmesg | grep cdce
cdce0 at uhub1 port 4 configuration 1 interface 7 "Ericsson Ericsson F3507g 
Mobile Broadband Minicard Composite Device" rev 2.00/0.00 addr 2
cdce0: address 02:80:37:ec:02:00

Mini-PCI. Works. Check cdce(4) for more adapters.

Erling



Re: softraid crypto with keydisk and password

2017-09-27 Thread Erling Westenvik
On Thu, Sep 28, 2017 at 09:11:49AM +1000, tomr wrote:
> I remember seeing a post, I think on undeadly.org, which went through
> having the bootloader on password-encrypted usb drive, that also
> contains a keyfile for the main disk. It said something like "I also
> wanted the laptop to appear broken, and the disk full of random data, if
> the usb drive wasn't present - rather than stopping at a password prompt"

Here you go:

http://www.undeadly.org/cgi?action=article=20110530221728

Cheers,
Erling

>
> There's something similar in the comments here from @mcbride
> https://undeadly.org/cgi?action=article=20131112031806
>
> But now an hour or so of searching fails to turn it up. Could anyone
> share some clues on how to go about this?

--
Erling Westenvik



Re: Xfce power manager and Brightness

2017-06-13 Thread Erling Westenvik
On Tue, Jun 13, 2017 at 10:54:27AM +0300, G wrote:
> Hello.
> I'm running xfce and xfce4-power-manager doesn't seems to work.
> with lock screen.
>
> Also I would like to know how can I change the brightness of the screen.

$ man -k bright
xbacklight(1) - adjust backlight brightness using RandR extension

For further experimenting, consider xgamma(1). And there is a program in
ports/packages called sct(1) (set color temperature) written by tedu@.

Erling



Re: siteXX.tgz with /home/user/.ssh/authorized_keys results in empty file

2017-05-30 Thread Erling Westenvik
On Tue, May 30, 2017 at 03:37:05AM +0200, Theo Buehler wrote:
> Populating the $ADMIN's $_home with some files from siteXX.tgz looks
> like a legitimate use case to me, especially for authorized_keys, but
> also for the dotfiles in /etc/skel.

That was my intuitive (and somewhat limited) understanding of
siteXX.tgz. While echoing some strings to authorized_keys from
install.site is straightforward enough, the "construction" of various
other dotfiles may turn out cumbersome in the long run. I hope your
suggestion turn out feasible.

Thank you to trondd and yourself for making a couple of things clearer
to me.

> How about not overwriting already existing files?
>
> Index: install.sub
> ===
> RCS file: /var/cvs/src/distrib/miniroot/install.sub,v
> retrieving revision 1.1011
> diff -u -p -r1.1011 install.sub
> --- install.sub   28 May 2017 09:24:56 -  1.1011
> +++ install.sub   30 May 2017 00:18:16 -
> @@ -2919,7 +2919,7 @@ do_install(){
>
>   _home=/mnt$_home
>   mkdir -p $_home
> - (cd /mnt/etc/skel; cp -pR . $_home)
> + (cd /mnt/etc/skel; pax -rw -k -pe . $_home)
>   (umask 077 && sed "s,^To: root\$,To: ${ADMIN_NAME} <${ADMIN}>," 
> \
>   /mnt/var/mail/root >/mnt/var/mail/$ADMIN )
>   chown -R 1000:1000 $_home /mnt/var/mail/$ADMIN
>



Re: siteXX.tgz with /home/user/.ssh/authorized_keys results in empty file

2017-05-29 Thread Erling Westenvik
On Mon, May 29, 2017 at 07:16:06PM -0400, trondd wrote:
> On Mon, May 29, 2017 5:47 pm, Erling Westenvik wrote:
> > What is going on? Why is the process extracting siteXX.tgz
> > treating /mnt/home/user/.ssh different than /mnt/root/.ssh?
>
> You didn't really explain the failure case.  Is this a new install or an
> upgrade?  Does your site file simply have the file
> /home/user/.ssh/authorized_keys in it or are you doing the cat command as
> you illustrated?

Sorry. New install via pxeboot. Amd64. Current. Yes, siteXX.tgz has the
file.

> My guess is this is an install.  The installer seems to unpack the sets
> first.  Including the site taball.  Then, if you created a new user,
> copies the /etc/skel/ files over, overwriting your authorized_keys file.
> You'll need to use install.site or /etc/rc.firsttime
>
> Root is different because root's files are part of the distribution sets.

Makes sense. Though, https://www.openbsd.org/faq/faq4.html#site claims
that siteXX.tgz «is installed last, so it can be used to complement and
modify the files from a default install».

I'll have a look into install.site.

Thanks a lot.

Erling



siteXX.tgz with /home/user/.ssh/authorized_keys results in empty file

2017-05-29 Thread Erling Westenvik
Scratching my head here. I have a site61.tgz file that successfully gets
selected during install and creates a bunch of directories and files
(including /root/.ssh/authorized_keys), but for some reason
/home/user/.ssh/authorized_keys ends up empty.

After install and before reboot:

  # cd /mnt
  # ls -la home/user | grep ssh
  drwx-- 2 1000 1000 .ssh

  # ls -la home/user/.ssh | grep auth
  -rw--- 1 1000 1000 authorized_keys

which are the correct permissions. Now, if I do:

  # cat root/.ssh/authorized_keys > home/user/.ssh/authorized_keys

everything is okay.

What is going on? Why is the process extracting siteXX.tgz
treating /mnt/home/user/.ssh different than /mnt/root/.ssh?

*continues scratching head*

Cheers.
Erling.



Re: HELP! My HTTPD website keeps breaking because the custom directory/user permissions are being reverting for some reason!

2017-05-28 Thread Erling Westenvik
On Sun, May 28, 2017 at 08:13:13PM -0400, tec...@protonmail.com wrote:
> I need to use the regular /var/www/htdocs for my site
>
> Such a strange issue

I think that "need" of yours is the strangest issue here. It is /var/www
that becomes the root directory when httpd/nginx/apache is chroot'ed,
not htdocs. The latter is just an arbitrary location.

You should be able to:

# cp -Rp /var/www/htdocs /var/www/mysite

Then replace all [relevant] occurences of "htdocs" to "mysite" in
/etc/httpd.conf and in your files. It your site doesn't survive this,
you're probably having other problems than file permissions.

Show us your /etc/httpd.conf as a minimium.

> Probably (not sure because you didn't care to say which version you're
> running) because you upgraded to a newer snapshots. Use another
> directory (one that doesn't come in the sets) if you want to do that.

--
Erling Westenvik



Autoinstall ... too "auto"?

2017-05-26 Thread Erling Westenvik
Autoinstall(8) and its ability to automate the trivial but time
consuming task of typing info like keyboard layout and network setup -
not to mention encrypted passwords and ssh keys! - by supplying the
information in a response file, is great. Add the ability to supply a
template for disklabel and it is absolutely wonderful.

However, there appears to be a fly in the ointment: If you want to
deviate from the "one disk, one disklabel"-dogma, like when needing a
partially encrypted installation, you're out of luck!

I'm in need of rolling out machines with a close to FDE configuration.
"Close to" meaning a single physical disk where everything is encrypted
except for a root partition. (Please don't ask why. I have good reasons
and run a lot of machines with a setup like this. I would simply like to
automate the cumbersome installation process.)

I do a PXE boot and select (S)hell to prepare the disk after bsd.rd has
fired up:

   # disklabel -E sd0 (phsyical disk)
   a a  (specifying a 1G partion)
   a p  (specifying a 249G for softraid crypto)
   w
   q

   # bioctl -c C -l /dev/sd0p softraid0
   entering passphrase x 2

   # cd /dev; sh ./MAKEDEV sd1

Then I start autoinstall:

   # autoinstall

So far so good. At this point autoinstall will recognize the root disk
[sd0] and the additional encrypted volume [sd1].

   Available disks are sd0, sd1.

In the response file I have:

   Which disk is the root disk = sd0

But, from here on things start to go wrong.

If I'm not supplying a template for disklabel, the installer will assume
I want to use the whole disk and will autopartition it, removing the
crypto partition (p) in the process. But, if I DO supply a template for
disklabel, the installer will ALSO remove the crypto partion. It may
fail with:

   disklabel: ioctl DIOCWDINFO: Open partition would move or shrink

Guess I'm out of luck and will have to revert to manual install.

>From what I'm able to infer, autoinstall (and perhaps the manuel
installer as well) would benefit from being able to recognize something
like:

   Use (A)uto layout, (E)dit auto layout, (K)eep existing layout or

   create (C)ustom layout = K

That way, one could manually setup disks and initiate any RAID
configuration before starting autoinstall - leaning back and watch it
complete the job?

Erling



Re: PF queueing confusion

2017-05-10 Thread Erling Westenvik
On Thu, May 11, 2017 at 12:09:26AM +0200, Gabriele Tozzi wrote:
>
> Looks like I've solved by only renaming the queues.
>
> Instead of naming them "high", "normal" and "low", I have now named them
> "exthi", "extstd" and "extlo" and then everything seems to work as expended.
>
> Maybe "high" is a (maybe undocumented) reserved queue name?

Check out pfctl(8) and the -F option. The issue might be resolvable
simply by flushing one or more of the filter parameters you'll find
there.  (Beware though - you may get kicked out of the server when
flushing states if you're connecting via ssh, and may have to log back
in. tmux(1) is your friend!)

--
Erling Westenvik



Re: Official OpenBSD 6.1 CD !

2017-05-03 Thread Erling Westenvik
On Wed, May 03, 2017 at 11:48:42PM +0200, Sterling Archer wrote:
> On Wed, May 3, 2017 at 10:33 PM, Bob Beck <b...@openbsd.org> wrote:
>
> > So.  There *Is* an official OpenBSD 6.1 CD
> >
> > Just One.
> >
> > If you are interested, please bid on ebay :
> >
> > http://www.ebay.com/itm/The-only-Official-OpenBSD-6-1-CD-
> > set-to-be-made-For-auction-for-the-project-/252910718452?
> > hash=item3ae2a74df4:g:SJQAAOSwrhBZBqkd
> >
> > (It's a pretty cool little CD set!)
> >
>
> Fantastic idea, I hope you raise a lot of money selling it.

https://en.wikipedia.org/wiki/Musique_pour_Supermarch%C3%A9

--
Erling Westenvik



Re: tmux fail to start when using if-shell in .tmux.conf

2017-04-22 Thread Erling Westenvik
On Sat, Apr 22, 2017 at 11:21:17PM +0200, Theo Buehler wrote:
> On Sat, Apr 22, 2017 at 10:35:50PM +0200, Erling Westenvik wrote:
> > Hi!
> >
> > After upgrading to today's snapshot (amd64, April 22) tmux refused to
> > load with exit status 1 and error message 'lost server'. I quickly found the
> > culprit in my .tmux.conf; a left over experimental if-shell statement I
> > used a while ago when I needed nested tmux sessions:
> >
> > if-shell "echo $SSH_TTY | grep /dev/ttyp" "set -g prefix C-r" "set -g 
> > prefix C-Space"
> >
> > After commenting out the if-shell statement tmux loads fine, but – why
> > did this cause tmux not to load in the first place? Running the
> > statement as a command in tmux as soon tmux is running works just fine!?
>
> I ran into this as well; nicm fixed this bug in -current
> (cmd-if-sh.c r1.54).
>
> There was a change (cfg.c r1.56) that causes the commands in the config
> file run outside of any client. A bug in the if-sh implementation led to
> a NULL dereference in that situation, and this segfault killed the tmux
> server (as indicated by the 'lost server' message you saw).
>
> When run inside a tmux client, the pointer that was NULL in the previous
> paragraph points to the client, and now the dereference is valid, so the
> command worked properly.

Indeed. Updated, compiled and installed the sources
(/usr/src/usr.bin/tmux), and that was it. Thanks!

--
Erling Westenvik



tmux fail to start when using if-shell in .tmux.conf

2017-04-22 Thread Erling Westenvik
Hi!

After upgrading to today's snapshot (amd64, April 22) tmux refused to
load with exit status 1 and error message 'lost server'. I quickly found the
culprit in my .tmux.conf; a left over experimental if-shell statement I
used a while ago when I needed nested tmux sessions:

if-shell "echo $SSH_TTY | grep /dev/ttyp" "set -g prefix C-r" "set -g prefix 
C-Space"

After commenting out the if-shell statement tmux loads fine, but – why
did this cause tmux not to load in the first place? Running the
statement as a command in tmux as soon tmux is running works just fine!?

Erling

--
Erling Westenvik



b suffix for queueing in pf.conf(5)

2017-03-13 Thread Erling Westenvik
pf.conf(5) states:

"All bandwidth values must be specified as an absolute value. The
suffixes K, M, and G are used to represent bits, kilobits, megabits, and
gigabits per second, respectively."

I guess that either should b be prepended to the list of suffixes even though
it isn't mandatory, or that the reference to bits should be removed?

Cheers,

Erling

Index: pf.conf.5
===
RCS file: /cvs/src/share/man/man5/pf.conf.5,v
retrieving revision 1.557
diff -u -p -r1.557 pf.conf.5
--- pf.conf.5   17 Jan 2017 21:08:34 -  1.557
+++ pf.conf.5   13 Mar 2017 08:24:05 -
@@ -1494,6 +1494,7 @@ All
 .Cm bandwidth
 values must be specified as an absolute value.
 The suffixes
+.Cm b (optional/default),
 .Cm K ,
 .Cm M ,
 and



Re: Help with server not accepting new connections but is still accessible through ONE existing open ssh-session

2017-02-01 Thread Erling Westenvik
On Wed, Feb 01, 2017 at 05:09:43PM +0200, Lars Noodén wrote:
> On 02/01/2017 05:06 PM, Erling Westenvik wrote:
> > On Wed, Feb 01, 2017 at 03:58:51PM +0100, Manuel Giraud wrote:
> >> Erling Westenvik <erling.westen...@gmail.com> writes:
> >>
> >>> However, I got inspired and when I disabled pf (pfctl -d) I got full
> >>> contact! (But -- when I turned pf back on (pfctl -e) I lost the one
> >>> connection I had... Now I have to wait 48 minutes for the server to
> >>> reboot. Not much more to do now except for crossing my fingers...)
> >>
> >> Err, yes but won't pf be enabled at boot time? Hopefully, some of your
> >> pf tables will be reset.
> >
> > True. But before I turned pf off and back on, I couldn't be sure what
> > was causing the problem. If it was an external problem I would've been
> > better off with the one active existing ssh connection.
> >
>
> I hope it reboots ok.  If you end up with a similar situation again you
> might set up 2 or more at jobs that build reverse tunnels from port 22
> to an outside machine.  That way you can still connect back via a tunnel
> if the main SSH session drops.  That won't solve the problem but might
> buy you more time to investigate.
>
> /Lars

Thanks. Good advice and I actually HAD such a tunnel to a remote
machine earlier to day but took it down due to experimenting, but
without remembering to reactivate it. Won't forget that again!

--
Erling Westenvik



Re: Help with server not accepting new connections but is still accessible through ONE existing open ssh-session

2017-02-01 Thread Erling Westenvik
On Wed, Feb 01, 2017 at 03:58:51PM +0100, Manuel Giraud wrote:
> Erling Westenvik <erling.westen...@gmail.com> writes:
>
> > However, I got inspired and when I disabled pf (pfctl -d) I got full
> > contact! (But -- when I turned pf back on (pfctl -e) I lost the one
> > connection I had... Now I have to wait 48 minutes for the server to
> > reboot. Not much more to do now except for crossing my fingers...)
>
> Err, yes but won't pf be enabled at boot time? Hopefully, some of your
> pf tables will be reset.

True. But before I turned pf off and back on, I couldn't be sure what
was causing the problem. If it was an external problem I would've been
better off with the one active existing ssh connection.

--
Erling Westenvik



Re: Help with server not accepting new connections but is still accessible through ONE existing open ssh-session

2017-02-01 Thread Erling Westenvik
On Wed, Feb 01, 2017 at 04:26:15PM +0200, lilit-aibolit wrote:
> On 02/01/2017 03:41 PM, Erling Westenvik wrote:
> > I have an OpenBSD 5.9 server at a colocation. It stopped accepting new
> > connections (ping, ssh, http, whatever) yesterday night but fortunately
> > I had one ssh session open from my workstation from which I can still
> > access it.
> >
> Did you think about creation of second sshd instance
> on other port and start it in debug mode?

Thank you for answering.

No, it didn't occur to me since I could not reach the machine by any
service or port. Tried your suggestion immediately without success.

However, I got inspired and when I disabled pf (pfctl -d) I got full
contact! (But -- when I turned pf back on (pfctl -e) I lost the one
connection I had... Now I have to wait 48 minutes for the server to
reboot. Not much more to do now except for crossing my fingers...)

Thanks anyway! :-)

--
Erling Westenvik



Help with server not accepting new connections but is still accessible through ONE existing open ssh-session

2017-02-01 Thread Erling Westenvik
I have an OpenBSD 5.9 server at a colocation. It stopped accepting new
connections (ping, ssh, http, whatever) yesterday night but fortunately
I had one ssh session open from my workstation from which I can still
access it. Funny thing is that the server has full access OUT to the
internet. I can open web pages through lynx, ssh to everywhere, and so
on. It just won't accept any new connections IN.

The colocation provider claim that nothing has changed at their side.
(Gateway, firewall, DNS, etc.) Since the location for the server is not
easily accessible, and in a worst case scenario wouldn't be accessible
for many days or even a week, I'd rather try to find and solve the
problem before having to resort to a reboot. (In case the machine
doesn't come up again, leaving me without the one ssh session that is
alive as for now.)

Pflog/tcpdump shows absolutely NO activity, neither in nor out. That is
strange IMO and I'm suspecting that some states in pf may be the
problem. I'm tempted to do a pfctl -F all, but that may also kill the
only ssh session I have open. (I'm resetting shutdown -r +60 every now
and then so that the server will at least do a reboot if the ssh
connection should fail.)

Any ideas as to where to begin?

--
Erling Westenvik


$ uptime
 2:39PM  up 253 days,  2:15, 1 user, load averages: 0.27, 0.28, 0.22


$ dmesg
OpenBSD 5.9 (GENERIC.MP) #1888: Fri Feb 26 01:20:19 MST 2016
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8505982976 (8111MB)
avail mem = 8243998720 (7862MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xfbae0 (60 entries)
bios0: vendor American Megatrends Inc. version "080011" date 06/30/2006
bios0: Supermicro H8DSP-8
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC OEMB SRAT
acpi0: wakeup devices P1P2(S4) USB0(S1) USB1(S1) USB2(S1) PS2K(S4) PS2M(S4) 
BR14(S4) BR1E(S4) BR28(S4) BR3C(S4) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Opteron(tm) Processor 250, 2394.33 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: AMD erratum 89 present, BIOS upgrade may be required
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Opteron(tm) Processor 250, 2394.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,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: AMD erratum 89 present, BIOS upgrade may be required
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 11, 16 pins
ioapic1 at mainbus0: apid 3 pa 0xfec01000, version 11, 16 pins
ioapic2 at mainbus0: apid 4 pa 0xfec02000, version 11, 16 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (P0P1)
acpiprt2 at acpi0: bus 2 (P1P2)
acpiprt3 at acpi0: bus 3 (BR14)
acpiprt4 at acpi0: bus 4 (BR1E)
acpiprt5 at acpi0: bus 5 (BR28)
acpiprt6 at acpi0: bus 6 (BR32)
acpiprt7 at acpi0: bus 7 (BR3C)
acpicpu0 at acpi0: C1(@1 halt!)
acpicpu1 at acpi0: C1(@1 halt!)
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
pci0 at mainbus0 bus 0
ppb0 at pci0 dev 1 function 0 "ServerWorks HT-1000 PCI" rev 0x00
pci1 at ppb0 bus 1
ppb1 at pci1 dev 13 function 0 "ServerWorks HT-1000 PCIX" rev 0xb2
pci2 at ppb1 bus 2
pciide0 at pci1 dev 14 function 0 "ServerWorks HT-1000 SATA" rev 0x00: DMA
pciide0: using apic 2 int 11 for native-PCI interrupt
pciide0: port 0: 1.5Gb/s
wd0 at pciide0 channel 0 drive 0: 
wd0: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6
pciide0: port 1: 1.5Gb/s
wd1 at pciide0 channel 1 drive 0: 
wd1: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 6
pciide0: port 2: 1.5Gb/s
wd2 at pciide0 channel 2 drive 0: 
wd2: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
wd2(pciide0:2:0): using PIO mode 4, Ultra-DMA mode 6
pciide0: port 3: 1.5Gb/s
wd3 at pciide0 channel 3 drive 0: 
wd3: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
wd3(pciide0:3:0): using PIO mode 4, Ultra-DMA mode 6
pciide1 at pci1 dev 14 function 1 "ServerWorks HT-1000 SATA" rev 0x00
piixpm0 at pci0 dev 2 function 0 "ServerWorks HT-1000&q

Re: autoupgrade without all sets

2016-12-06 Thread Erling Westenvik
On Tue, Dec 06, 2016 at 12:27:33AM -0800, jungle boogie wrote:
> Reading the autoinstall page for openbsd, I don't see how I can select what
> packages are installed. Does that mean all packages will be installed and
> subsequent upgrades will also download and install all packages?

When installing manually, the installer provides a prompt for all
configurable/selectable options. For autoinstall you simply need to
provide the same prompt in your autoinstall.conf file (without the
question mark) along with the answer you'd give if it was a manual
installation, like this:

---8<---
Set name(s) = -xbase60.tgz
Set name(s) = -xetc60.tgz
Set name(s) = -xshare60.tgz
Set name(s) = -xfont60.tgz
Set name(s) = -xserv60.tgz
--->8---

Erling

-- 
Erling Westenvik



Re: 5.8 EOL

2016-12-02 Thread Erling Westenvik
On Fri, Dec 02, 2016 at 02:43:01PM +0100, Alessandro Baggi wrote:
> Il 02/12/2016 00:47, OpenBSD lists ha scritto:
> > Alessandro Baggi wrote:
> > > Il 01/12/2016 17:01, Marko Cupać ha scritto:
> > > > On Thu, 1 Dec 2016 15:59:41 +0100
> > > > Alessandro Baggi <alessandro.ba...@gmail.com> wrote:
> > > > 
> > > > > Hi list,
> > > > > I've installed some years ago OpenBSD 5.8 on apu with 3 nics.
> > > > > I've tried to search but no look. What is the EOL for OpenBSD 5.8?
> > > > > 
> > > > > Thanks in advance.
> > > > > 
> > > > 
> > > > https://www.openbsd.org/faq/faq5.html#Flavors
> > > > 
> > > > AFAIK Once 6.0 is out, 5.8 becomes unsupported (EOS). But it by no means
> > > > its life ends (EOL). I have just upgraded 2 boxes that were at 5.5,
> > > > but were quite alive and kicking :)
> > > > 
> > > > --
> > > > Before enlightenment - chop wood, draw water.
> > > > After  enlightenment - chop wood, draw water.
> > > > 
> > > > Marko Cupać
> > > > https://www.mimar.rs/
> > > > 
> > > > 
> > > Then, when 6.1 will be released,
> > Somewhere between March and May of next year.  Depends on when the code
> > is in a releasable state.
> > 
> > > 5.9 will become unsupported.
> > Yep, it won't be getting patches anymore.
> > 
> > > How do you provide to security patch for 5.5?
> > We don't.  Supporting a release that old would require quite a lot more
> > volunteers to back-port and test every patch that would apply and we'd
> > rather not waste resources on supporting the old stuff and use our time
> > to move the project forward.  Upgrading is painless and major changes
> > are very rare, so I can't think of any compelling reasons to stay on an
> > old version (well, unless it is the last version your platform supports)
> > 
> > 
> Thanks to all for your answer.
> 
> It's time to upgrade.

Please take note of the upgrade guides in the FAQ and upgrade one
version at a time, first from 5.8 to 5.9, then from 5.9 to 6.0 -- NOT
directly from 5.8 to 6.0. The upgrade guides can be found here:

http://www.openbsd.org/faq/upgrade59.html
http://www.openbsd.org/faq/upgrade60.html

Be sure to read both guides carefully. There may be files that
needs to be removed manually, and services that may require
configuration. 

Have fun! :)

-- 
Erling Westenvik



Re: Browser is getting slower?

2016-11-21 Thread Erling Westenvik
On Mon, Nov 21, 2016 at 08:13:05AM +0200, George Pediaditis wrote:
> Hello!
> i have the impression that my browser is getting slower compared with
> a fresh openbsd install.

You need to supply more information, like your dmesg(8), if someone is
going to be able to help you. Stating that you're having the
"impression" that Iridium is getting slower, isn't very precise.

> Any ideas?
> ps. Im using iridium

Have you tried other browsers?

-- 
Erling Westenvik



Re: Oddness with pkg_add

2016-11-04 Thread Erling Westenvik
On Fri, Nov 04, 2016 at 09:46:19AM -0500, Chris Bennett wrote:
> If I offended anyone on the list, say so and I will pay penance with a
> small donation to OpenBSD.

Just don't say you're gonna "make OpenBSD great again"..

Erling

-- 
Erling Westenvik



autoinstall (eg: disklabel -T) doesn't support templates that specify partition sizes in sectors?

2016-10-06 Thread Erling Westenvik
Experimenting with autoinstall(8) and predefined partition layout
templates, I was a little surprised to find that disklabel(8) apparently
does not support specifying partition sizes givin in sectors, only in
units (b,c,k,m,g,t) and/or percentages?  Am I missing out on something
obvious here?

My use case is the need to make autoinstallations that would be
installed onto (large) HDD/SSD's but with sector sized boundries such
that the installations could fit *exactly* onto, lets say 4 or 8GB
flash media.

Not the end of the world, of course. I will survive wasting a few kilo-
or megabytes. But I got curious as to why templates cannot be specified
in sectors?

This is OpenBSD 6.0.

Cheers,

Erling



Re: dnscrypt-proxy config question

2016-09-23 Thread Erling Westenvik
On Thu, Sep 22, 2016 at 10:31:20PM -0700, john smith wrote:
> Hello -
> How do I config dnscrypt-proxy to use more than 1 resolver?  I understand
> how to do theunbound part but what do I put in /etc/rc.conf.local?
> Currently I have:
> dnscrypt_proxy_flags="-d -E -m 1 -R dnscrypt.eu-dk -a 127.0.0.1:40"

As stated on https://dnscrypt.org/, I think you have to start multiple
instances of dnscrypt-proxy in daemon mode in /etc/rc.local:

dnscrypt-proxy -l /dev/null -R  -a 127.0.0.1:40 -u _dnscrypt-proxy -d
dnscrypt-proxy -l /dev/null -R  -a 127.0.0.1:41 -u _dnscrypt-proxy -d
...

(Note: prepend /usr/local/sbin/ to dnscrypt-proxy. I left it out to fit
the lines within 80 characters.)

Then, in /var/unbound/etc/unbound.conf:

forward-zone:
  name: "."
  forward-addr: 127.0.0.1@40
  forward-addr: 127.0.0.1@41
  ...

Cheers,

Erling

-- 
Erling Westenvik



Re: xenocara/app/cwm: sticky command

2016-09-09 Thread Erling Westenvik
On Sat, Sep 10, 2016 at 01:06:24AM +0430, Ali Farzanrad wrote:

+1

Works well. Thanks. I've been missing this feature but never taken time
to investigate. I have a toggle_skip_taskbar (mapped to MS-t) for
programs that I don't want to show up in my taskbar (x11/tint2). And for
programs that I want to exclude from Alt-Tab, I have a toggle_skip_pager
on my TODO list. The latter would be well suited for your patch.

Cheers,

Erling

> Hi,
> 
> It seems that cwmrc(5) could not change default key binding for sticky
> command and whenever I try to bind keys to sticky, I receive "syntax error".
> 
> I check the codes and found out that in parse.y file "sticky" is a keyword.
> 
> I don't know which is the best patch for this problem, but this patch works 
> for me:
> 
> Index: conf.c
> ===
> RCS file: /usr/cvs/xenocara/app/cwm/conf.c,v
> retrieving revision 1.204
> diff -u -p -r1.204 conf.c
> --- conf.c13 Aug 2016 09:59:48 -  1.204
> +++ conf.c9 Sep 2016 19:50:22 -
> @@ -207,7 +207,7 @@ static const struct {
>   { "CM-g",   "grouptoggle" },
>   { "CM-f",   "fullscreen" },
>   { "CM-m",   "maximize" },
> - { "CM-s",   "sticky" },
> + { "CM-s",   "togglesticky" },
>   { "CM-equal",   "vmaximize" },
>   { "CMS-equal",  "hmaximize" },
>   { "CMS-f",  "freeze" },
> @@ -408,7 +408,7 @@ static const struct {
>   {.i = (CWM_CLIENT_RCYCLE | CWM_CLIENT_CYCLE_INGRP)} },
>   { "grouptoggle", kbfunc_client_grouptoggle, CWM_CONTEXT_CLIENT,
>   {.i = CWM_KBD}},
> - { "sticky", kbfunc_client_toggle_sticky, CWM_CONTEXT_CLIENT, {0} },
> + { "togglesticky", kbfunc_client_toggle_sticky, CWM_CONTEXT_CLIENT, {0} 
> },
>   { "fullscreen", kbfunc_client_toggle_fullscreen, CWM_CONTEXT_CLIENT,
>   {0} },
>   { "maximize", kbfunc_client_toggle_maximize, CWM_CONTEXT_CLIENT, {0} },
> Index: cwmrc.5
> ===
> RCS file: /usr/cvs/xenocara/app/cwm/cwmrc.5,v
> retrieving revision 1.61
> diff -u -p -r1.61 cwmrc.5
> --- cwmrc.5   12 Jul 2015 14:31:47 -0000  1.61
> +++ cwmrc.5   9 Sep 2016 20:12:10 -
> @@ -301,7 +301,7 @@ Raise current window.
>  Label current window.
>  .It freeze
>  Freeze current window geometry.
> -.It sticky
> +.It togglesticky
>  Stick current window to all groups (same as assigning to nogroup).
>  .It fullscreen
>  Full-screen current window (gap + border removed).
> 

-- 
Erling Westenvik



Re: how would you troubleshoot stuttering video? (Lenovo Thinkpad)

2016-07-18 Thread Erling Westenvik
On Mon, Jul 18, 2016 at 04:01:30PM +0800, Miles Keaton wrote:
> On Mon, Jul 18, 2016 at 3:09 PM, Alexandre Ratchov <a...@caoua.org> wrote:
> 
> When hardware microphone is disabled in BIOS, audio will stutter.  Enabling
> hardware microphone again makes audio work fine.
> 
> Very strange, but true.

Alarming? Okay, I'm in a somewhat lazy summer holiday mode here, and
recent political events may have made me a little jumpy, but at this
point I would seriously consider cutting the wires to the hardware
microphone so as to see if audio will start stuttering againg.. :-D

-- 
Erling Westenvik



Re: ipad as an USB disk

2016-07-11 Thread Erling Westenvik
On Mon, Jul 11, 2016 at 12:32:06PM +0200, Jan Stary wrote:
> On Jul 08 16:47:01, h...@stare.cz wrote:
> > What is your favorite way to get files
> > from an ipad onto an OpenBSD machine?
> 
> Thanks for the suggestions. After going through a shitload of ipad apps
> that let you copy 20 files before they offer you a pro version,

I was forced to buy an iPad on Friday. Customers demand..  Anyway - I've
been using syncthing(1) from ports since edd@ ported it a little while
ago. I love it. Now I just found out that while the Syncthing team
doesn't provide a native iOS client, there is an recommended client app
called fsync() available at iTunes/App Store:

https://itunes.apple.com/us/app/fsync/id964427882?mt=8

You might want to take a look at that. I'll surely will.

> I settled with "FTPManagaer Free" which seems decent enough.

Thanks for the tip.

-- 
Erling Westenvik



Re: Randomish Reboots on Current

2016-06-20 Thread Erling Westenvik
On Sun, Jun 19, 2016 at 07:54:45PM -0700, Philip Guenther wrote:
> On Sun, Jun 19, 2016 at 1:59 PM, Daniel Wilkins <t...@parlementum.net> wrote:
> > Has anyone else been hvaing random reboots on current? The system freezes 
> > up for
> > maybe 30 seconds or so, then reboots. I have a hunch that it's something 
> > with my
> > wifi card because occasionally during a reboot it'll error saying something 
> > about
> > MIC errors and then reboot, or just freeze+reboot during the netstart 
> > portion of boot.
> > The other thing that makes me think it's network is that it tends to happen 
> > during
> > relatively network heavy things, like when I'm doing ssh X forwarding while 
> > watching
> > streaming video, but this isn't always the case.
> >
> > This is a recent thing that just seems to have randomly appeared; it was 
> > working
> > fine before and then it started rebooting one day; I hadn't updated the 
> > snapshot
> > although I've tried that since to see if it helped. There's no panic so I 
> > don't
> > have any ddb info, but I've attached dmesg and dmesg.boot.
> 
> Saying "before" without what that *means* leaves us guessing.  What
> was the date of the snapshot or build you had installed *before* this
> occurred?  Maybe it's still showing in an old /var/log/message.* file?

And you should probably try upgrading to the newest snapshot released
yesterday (Jun 19). AFAIK there hasn't been a new snapshot since Jun 2,
which is the date in your dmesg(8), and there seems to have been some
commits on iwn(4) on Jun 3.

-- 
Erling Westenvik



Re: Is there such a thing as a fanless OpenBSD-capable laptop?

2016-06-14 Thread Erling Westenvik
On Tue, Jun 14, 2016 at 03:37:01AM +0200, ropers wrote:
> On 14 June 2016 at 00:53, frantisek holop  wrote:
> 
> > the acer travelmate b115-m is an el cheapo netbook
> > with no moving parts if you stick an ssd in it.
> 
> Thanks for the addition and dmesg. Do you know if all the Travelmate B115's
> are fanless or only the M models, not MP or P? What about the B116's and
> B117's? Actually, are all the Travelmate B's fanless?
> 
> > it suspends, resumes, most things work;
> > the clickpad and the wifi being notable exceptions.
> 
> Does this mean that despite dmesg recognition, the pms0 device somehow does
> not work at all (=need external mouse), or does this mean just
> fancy-schmancy gesturing support won't work (limiting the pad to working
> like a conventional trackpad)?
> Is the apparent absence of separate trackpad buttons (as per pics I
> googled) an issue? Can the pad's lower parts work like buttons, or is it
> only tap-to-click (which I seriously hate)?
> 
> I see some models have a touchscreen. Does yours? Do all of them? (I'd
> rather do without that.)
> 
> Is the glossy screen annoying? (I prefer matte.)

With all due respect: This is not the place to ask for detailed specs
for a whole series of computers. You could easily have found answers to all
of your questions above if you had done some very basic homework:

http://www.acer.com/ac/en/US/content/professional-models/laptops/travelmateb

Good luck, though. :)

Best regards.
Erling



Re: wifind(8) find your wifi

2016-06-03 Thread Erling Westenvik
As much as I endorse and approve of any effort to create a good solution
for handling wifi's, I must say I find the use of perl and json
unnecessary for such a project. I've been using a "pure ksh" solution
named wiconfig since 2013 and which was posted here at @misc back in
2011 or 2012:

http://openbsd-archive.7691.n7.nabble.com/wiconfig-simplifies-the-configuration-of-wireless-interfaces-td89829.html

It is available on github:

https://github.com/devious/wiconfig/blob/master/wiconfig

wiconfig:
- Works great with apm/resume, including trunk(4) interfaces.
- Has no dependencies. Just pure old fashioned ksh.
- Stores (accepted) connections in plain text format. (/etc/wiconfig.db)
- Handles quoted nwids.
- Does not require writing to /etc/hostname.if-files.

Not sure how/if it handles potentially unsafe nwid names, though.

Regards.

-- 
Erling Westenvik
,_,
|_|_|_|
|_|X|_|
|_|_|_|

On Fri, Jun 03, 2016 at 11:58:05AM +0800, Ray Lai wrote:
> > On Jun 3, 2016, at 2:36 AM, Kamil Cholewiński <harry6...@gmail.com> wrote:
> >> On Thu, 02 Jun 2016, Ray Lai <r...@raylai.com> wrote:
> >> use JSON::PP;
> >
> > That's just my personal opinion, but JSON sucks for configuration files.
> > It's more of a human-readable data interchange format.
> >
> > It feels like the same functionality can be achieved with something much
> > simpler, getent or CSV style.
> 
> I agree. All I need are hashes and arrays. Any examples would be welcome, I'm
> open to changing the file format. But as wifind.conf(5) says, I chose json
> because it's included in Perl. I was more concerned with having a
> set-it-and-forget-it solution. The config file is a minor detail that can be
> changed.
> >
> >> my $tmp = "/etc/wifind.tmp";
> >
> > mkstemp?
> 
> Will fix
> 
> >> Please avoid nwid or wpakey with quotes, dollar signs, or backslashes.
> >
> > Without knowing or assuming much about how WiFi works, why would this be
> > a concern in a well-designed program?
> 
> Currently wifind parses 'ifconfig if scan' output, which, according to my
> reading of the code, simply adds "double quotes" around any nwid with white
> space when printing. (I've not tested my theory that nwid with " in the name
> would cause problem. )
> 
> Likewise, netstart takes nwid and wpakey, which could include spaces, but as
> netstart is a shell script, I have not tested what happens when the values
> contain backslashes, dollar signs, or double quotes. Caveat emptor!
> 
> 
> Thanks for your feedback, I appreciate it!
> 
> Ray



Re: Alternate Puffy Logo Design

2016-05-19 Thread Erling Westenvik
On Thu, May 19, 2016 at 03:18:45PM -0400, Ted Unangst wrote:
> Mihai Popescu wrote:
> > First, the webpage design change suggestion, then the logo alternative ...
> > I guess a project name change suggestion will follow, I'm curious if
> > this will be till weekend.
> 
> We're changing version scheme instead. OpenBSD 6.0 will actually be OpenBSD 
> 60.

*lol*

It's a pity OpenBSD is released twice a year. Otherwise we could operate
with more logical versions like "OpenBSD 2016 Home Premium Edition".

Of course it is more important than ever to be modern, so I propose we
stop using those aging sequential decimal numbers alltogether and start
using cool nicknames in alfabetical order instead. I present to you:

OpenBSD Chit'lins
OpenBSD Frogmore Stew
OpenBSD Hoppin' John
OpenBSD Jambalaya
OpenBSD Livermush
OpenBSD Red Eye Gravy
OpenBSD Swamp Cabbage



Re: httpd - Multiple index files?

2016-05-12 Thread Erling Westenvik
On Thu, May 12, 2016 at 10:18:09AM +, Romain wrote:
> Allright. 
> Thanks for your answer. 

Have a look at this thread: https://github.com/reyk/httpd/issues/27

And my example would probably be better this way:



> On Thu, 12 May 2016 11:40:10 +0200
> Erling Westenvik <erling.westen...@gmail.com> wrote:
> 
> On Thu, May 12, 2016 at 12:04:50AM +, Romain wrote:
> > Is it possible to supply multiple index files to the directory index
> > directive?  I mean, I would like to write something like that in
> > httpd.conf: 
> >  
> >directory index "index.html" "index.php" 
> >  
> > which would mean that, if the directory contains "index.html", then
> > the server should serve it first, if not, then try "index.php",
> > otherwise the standard error. 
> 
> Not that I'm aware of. Anyway: Such logic should be part of your
> application, not the web server since it would just add unnecessary and
> ambiguos complexity to the latter.
> 
> > Or should I do it in another way? 
> 
> You could try something like this:
> 
> if (basename($_SERVER["PHP_SELF"]) == "index.php") {
>header("Location: ".$_SERVER["REQUEST_URI"]."index.html");
>}
> ?>
> 
> > Thanks. 
> > Best, 
> > Romain 
> 
> Regards.
> 
> Erling



Re: httpd - Multiple index files?

2016-05-12 Thread Erling Westenvik
On Thu, May 12, 2016 at 12:04:50AM +, Romain wrote:
> Is it possible to supply multiple index files to the directory index
> directive?  I mean, I would like to write something like that in
> httpd.conf: 
>  
>directory index "index.html" "index.php" 
>  
> which would mean that, if the directory contains "index.html", then
> the server should serve it first, if not, then try "index.php",
> otherwise the standard error. 

Not that I'm aware of. Anyway: Such logic should be part of your
application, not the web server since it would just add unnecessary and
ambiguos complexity to the latter.

> Or should I do it in another way? 

You could try something like this:



> Thanks. 
> Best, 
> Romain 

Regards.

Erling



Re: Create a RAID5 with a disk marked as degraded

2016-04-29 Thread Erling Westenvik
On Fri, Apr 29, 2016 at 09:49:14AM +0200, Karel Gardas wrote:
> Also for creation of RAID5 you need minimally 4 drives.

Make that 3. :)

Regards,

Erling



Re: Creating a blog using OpenBSD: technology choices and security considerations

2016-04-26 Thread Erling Westenvik
On Tue, Apr 26, 2016 at 06:15:22AM +, David Lou wrote:
> Hello,

Hi there,

> This is my first post. :) I suppose this is a high level kind of
> question.
> 
> When I say 'blog', I'm referring to a website that contains
> essentially many pages of content. Each content page has attributes
> such as title, date, category, tags, and so on. When a user browsers
> this website, the content pages are served in a visually attractive
> layout, with possible bells and whistles such as Facebook/Twitter
> share buttons, and comment sections. Additional features may include
> a search bar and an archive page.
> 
> I'm shying away from popular solutions such as WordPress because
> (1) I'm not sure if it even installs on OpenBSD and more importantly

Wordpress appears to have been removed from ports. But there is Drupal.
And you may take a look at blogsum. The latter is unknown to me but it
popped up when I did some browsing in pkg_mgr.

$ pkg_info drupal
$ pkg_info blogsum

> (2) I'm not convinced that it adheres to the OpenBSD principles of
> correctness and proactive security.

That goes for a lot of ports. FAQ 15 states: "The packages and ports
collection does NOT go through the same thorough security audit that is
performed on the OpenBSD base system. Although we strive to keep the
quality of the packages collection high, we just do not have enough
human resources to ensure the same level of robustness and security."

> So with that said, I'd like to solicit some feedback on how such a
> blog website should be built. Personally I'm thinking of some kind
> of homegrown solution. First I'd design my own database that stores

Good luck with that but I'd say you're up for a steep learning curve and
potentially a tremendous amount of work..

> the attributes of all content pages. And then I'd use a web server---
> whenever a user visits a webpage, the web server would run some kind
> of script that queries the database for all the necessary information
> and wraps the content page in a nicely designed HTML document.

That pretty much sums up the absolute basic functionalities of any
"popular solution" out there, like above mentioned Drupal. Think twice
before trying to reinvent the wheel.

> OpenBSD seems to come with nginx in the port tree as its web server

Yes. And Apache. And a bunch of other webservers. But OpenBSD also comes
with its own "built-in" webserver, httpd(8). It's wonderful!

$ man httpd

> but right now I don't know what scripting options it provides for
> serving dynamic web content. So going forward I'm planning to learn
> how to do all of these things.

Most that matters are supported. Support for Perl and PHP is extensive.
 
> Does this sound like a good plan? What would you say is a good way
> to learn the correct and secure way of using these technologies?

Start with an existing solution like Drupal. It may be totally overkill
but you'll get to know the terminology and technologies involved.  If
you insist on developing a homegrown solution, keep in mind that people
easily get bored when things are not working. And content matters more
than design! If what you have to say is interesting, people will read it
almost regardless of the way you present it. If you got nothing to say
people will not care even if the pages are otherwise esthetically
pleasant.

> Lastly, just a side question. Not sure if this is an FAQ: Running a
> webserver on OpenBSD probably means I'll need to stay up to date with
> security patches. Is there an automatic script I can run so I don't
> have to constantly worry about this aspect of running a website?
> 
> David



Re: Upgrade to 5.9 full disk encryption

2016-04-18 Thread Erling Westenvik
On Mon, Apr 18, 2016 at 12:36:34PM -0700, Ted Roby wrote:
> Do any of you find that when dealing with sd1 and greater in bsd.rd you
> must explicitly create these devices?

Yes. This behaviour is mentioned in FAQ 14 (14.10.1 - Installing to a
mirror) which states:

"The install kernel only has the /dev entries for one wd(4) device and
one sd(4) device on boot, so you will need to manually create more disk
devices if your desired softraid setup requires them. This process is
normally done automatically by the installer, but you haven't yet run
the installer, and you will be adding a disk that didn't exist at boot."

Have a look at:

http://www.openbsd.org/faq/faq14.html#softraidDI

Regards,

Erling

> I've been following this habit for years, and did not see anyone offer the
> advice in this thread.
> 
> Basically:
> 
> cd /dev
> sh MAKEDEV sd1
> 
> 
> 
> On Sun, Apr 17, 2016 at 2:04 PM, Sean Howard <sil...@callysto.com> wrote:
> 
> >  J o ‎l
> >
> > Sent from my Phone.
> >   Original Message
> > From: Predrag Punosevap
> > ‎
> > Sent: Sunday, April 17, 2016 09:11
> > To: erling.westen...@gmail.com
> > Cc: misc@openbsd.org
> > Subject: Re: Upgrade to 5.m. J9 full disk encryption
> >
> > Erling Westenvik <erling.westen...@gmail.com> wrote:
> > Tn. I‎
> > > On Sat, Apr 16, 2016 at 11:02:36PM -0400, Predrag Punosevac wrote:
> > > > Bryan Everly wrote:
> > > > >
> > > > > Boot the installer. Exit to the shell. Then do:
> > > > >
> > > > > bioctl -c C -l /dev/sd0a softraid0
> > > > >
> > > >
> > > > Unless I did something really stupid I would swear that I upgraded
> > fully
> > > > encrypted laptop running 5.8 to 5.9 easier.
> > > >
> > > > I downloaded bsd.rd for 5.9 and put into /. Then I rebooted the laptop.
> > > > When prompted for boot password and entered it. Then I booted from
> > > > bsd.rd and chose the upgrade option. When upgrade manager asked me what
> > > > is the installation disk I pointed it to the crypto disk. In my case
> > > > physical device is
> > > >
> > > > /dev/sd0
> > > >
> > > > and crypto device is /dev/sd1
> > > >
> > > > No softraid passwords were needed.
> > >
> > > Actually it was but you referred to it as "boot password" above,
> > > something which may sound confusing to new users. The correct term would
> > > be "passphrase". There is no such thing as a "boot password" unless one
> > > refers to the machine's BIOS password.
> > >
> > > After downloading a ramdisk (bsd.rd) kernel and after rebooting, I prefer
> > > to exit to the boot(8) prompt when it asks for the passphrase:
> > >
> > > Using drive 0, partition 3.
> > > Loading.
> > > probing: pc0 apm pci mem[639K 254M a20=on]
> > > disk: hd0+ sr0*
> > > >> OpenBSD/i386 BOOT 3.21
> > > Passphrase: <Enter, or Ctrl-C>
> > > ^^
> > > Then I enter:
> > >
> > > boot> boot sr0a:/bsd.rd
> > > ^
> > > And the passphrase:
> > >
> > > Passphrase: 
> > > 
> > > I easily get distracted and this way I make sure that the system doesn't
> > > start with the old system (bsd) kernel in case I miss the five second
> > > delay offered by boot(8). Having to wait for a system to finish booting
> > > just so you can log in and reboot again, can be an annoying waste of
> > > time.. :-)
> > >
> > > Regards,
> > >
> > > Erling
> >
> > Hi Erling,
> >
> > Thanks for posting. I was very tired when I sent the original message
> > and reading it over this morning I sounded like a drunken mathematician.
> > Of course one has to enter the passphrase. The only step I avoided
> > comparing to the original post was dropping into the shell before
> > starting the upgrade process. For the people who might be reading these
> > posts I was explicitly to state that I don't use a password to protect
> > my BIOS.
> >
> > Predrag
> >
> >
> > >
> > > > After upgrade was finished I booted
> > > > into 5.9 and did usual sysmerge, cleaning files and upgrading packages.
> > > >
> > > > Best,
> > > > Predrag
> >
> > [demime 1.01d removed an attachment of type image/png]
> >
> > [demime 1.01d removed an attachment of type application/octet-stream]
> >
> > [demime 1.01d removed an attachment of type application/octet-stream]



Re: owncloud - external files directory

2016-04-17 Thread Erling Westenvik
On Sun, Apr 17, 2016 at 02:20:23PM +0300, Joseph Oficre wrote:
> I want to store all my files centralized. I have some windows pc's at home,
> some notebooks and my work laptop. So i want to be able to put and take the
> files from any of this PC's. But /var/ partition only 100gb size, so i
> think it's good idea to move datadir to /home/ partition(or even to
> external large disk, that i can just put in my pocket)

Then I would recommend an external disk and mount it somewhere inside
the chroot, like /var/www/data. I have a setup like that on an old
OpenBSD server running owncloud version 6-or-something.

$ cat /etc/fstab | grep data
f1e6a6c8d1b4fc94.p /var/www/data ffs rw,nodev,nosuid 1 2

$ mount
...
/dev/sd3p on /var/www/data type ffs (local, nodev, nosuid)
...

Regards,

Erling

> 
> 2016-04-17 14:12 GMT+03:00 Erling Westenvik <erling.westen...@gmail.com>:
> 
> > On Sun, Apr 17, 2016 at 12:40:59PM +0300, Joseph Oficre wrote:
> > > Hello misc.
> > > I've installed ownCloud with this guide
> > >
> > https://github.com/reyk/httpd/wiki/Running-ownCloud-with-httpd-on-OpenBSD
> > >
> > > Everything looks fine, but i want to store all my files not in
> > > /var/www/owncloud/data but in /home/USER/owncloud/data/
> > > Moving datadir to home and reconfiguring config/config.php
> > "datadirectory"
> > > did nothing, only error:
> >
> > httpd(8) is chroot(8)'ed to /var/www by default. Your options include:
> >
> > - disabling chroot, which isn't a very recommended option, or
> > - set up /home as the new chroot, which probably isn't a very recommended
> >   option either.
> >
> > What are you trying to achive?
> >
> > Regards,
> >
> > Erling
> >
> > >
> > > PHP message:
> > >
> > {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"index","message":"Exception:
> > > {\"Exception\":\"DoctrineDBALDBALException\",\"Message\":\"Failed
> > > to connect to the database: An exception occured in driver:
> > SQLSTATE[HY000]
> > > [14] unable to open database file\",\"Code\":0,\"Trace\":\"#0
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(973):
> > > OCDBConnection->connect()\\n#1
> > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> > > DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
> > Array,
> > > Array)\\n#2
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> > > OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> > > DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> > > OCDBConnection->__cons...
> > > PHP message:
> > >
> > {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
> > > {\"Exception\":\"DoctrineDBALDBALException\",\"Message\":\"Failed
> > > to connect to the database: An exception occured in driver:
> > SQLSTATE[HY000]
> > > [14] unable to open database file\",\"Code\":0,\"Trace\":\"#0
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(973):
> > > OCDBConnection->connect()\\n#1
> > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> > > DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
> > Array,
> > > Array)\\n#2
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> > > OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> > > DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> > > OCDBConnection->__const...
> > > PHP message:
> > >
> > {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168

Re: Upgrade to 5.9 full disk encryption

2016-04-17 Thread Erling Westenvik
On Sat, Apr 16, 2016 at 11:02:36PM -0400, Predrag Punosevac wrote:
> Bryan Everly wrote:
> > 
> > Boot the installer. Exit to the shell. Then do:
> > 
> > bioctl -c C -l /dev/sd0a softraid0
> >
> 
> Unless I did something really stupid I would swear that I upgraded fully
> encrypted laptop running 5.8 to 5.9 easier. 
> 
> I downloaded bsd.rd for 5.9 and put into /. Then I rebooted the laptop.
> When prompted for boot password and entered it. Then I booted from
> bsd.rd and chose the upgrade option. When upgrade manager asked me what
> is the installation disk I pointed it to the crypto disk. In my case
> physical device is
> 
> /dev/sd0
> 
> and crypto device is /dev/sd1
> 
> No softraid passwords were needed.

Actually it was but you referred to it as "boot password" above,
something which may sound confusing to new users. The correct term would
be "passphrase". There is no such thing as a "boot password" unless one
refers to the machine's BIOS password.

After downloading a ramdisk (bsd.rd) kernel and after rebooting, I prefer
to exit to the boot(8) prompt when it asks for the passphrase:

Using drive 0, partition 3.
Loading.
probing: pc0 apm pci mem[639K 254M a20=on]
disk: hd0+ sr0*
>> OpenBSD/i386 BOOT 3.21
Passphrase: 
^^
Then I enter:

boot> boot sr0a:/bsd.rd
  ^
And the passphrase:

Passphrase: 

I easily get distracted and this way I make sure that the system doesn't
start with the old system (bsd) kernel in case I miss the five second
delay offered by boot(8). Having to wait for a system to finish booting
just so you can log in and reboot again, can be an annoying waste of
time.. :-)

Regards,

Erling

>After upgrade was finished I booted
> into 5.9 and did usual sysmerge, cleaning files and upgrading packages.
> 
> Best,
> Predrag



Re: owncloud - external files directory

2016-04-17 Thread Erling Westenvik
On Sun, Apr 17, 2016 at 12:40:59PM +0300, Joseph Oficre wrote:
> Hello misc.
> I've installed ownCloud with this guide
> https://github.com/reyk/httpd/wiki/Running-ownCloud-with-httpd-on-OpenBSD
> 
> Everything looks fine, but i want to store all my files not in
> /var/www/owncloud/data but in /home/USER/owncloud/data/
> Moving datadir to home and reconfiguring config/config.php "datadirectory"
> did nothing, only error:

httpd(8) is chroot(8)'ed to /var/www by default. Your options include:

- disabling chroot, which isn't a very recommended option, or
- set up /home as the new chroot, which probably isn't a very recommended
  option either.

What are you trying to achive?

Regards,

Erling

> 
> PHP message:
> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"index","message":"Exception:
> {\"Exception\":\"DoctrineDBALDBALException\",\"Message\":\"Failed
> to connect to the database: An exception occured in driver: SQLSTATE[HY000]
> [14] unable to open database file\",\"Code\":0,\"Trace\":\"#0
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(973):
> OCDBConnection->connect()\\n#1
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...', Array,
> Array)\\n#2
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> OCDBConnection->__cons...
> PHP message:
> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
> {\"Exception\":\"DoctrineDBALDBALException\",\"Message\":\"Failed
> to connect to the database: An exception occured in driver: SQLSTATE[HY000]
> [14] unable to open database file\",\"Code\":0,\"Trace\":\"#0
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(973):
> OCDBConnection->connect()\\n#1
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...', Array,
> Array)\\n#2
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> OCDBConnection->__const...
> PHP message:
> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
> {\"Exception\":\"DoctrineDBALDBALException\",\"Message\":\"Failed
> to connect to the database: An exception occured in driver: SQLSTATE[HY000]
> [14] unable to open database file\",\"Code\":0,\"Trace\":\"#0
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(973):
> OCDBConnection->connect()\\n#1
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...', Array,
> Array)\\n#2
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> OCDBConnection->__const...
> 
> PHP message:
> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"PHP","message":"touch():
> Unable to create file \/home\/usf\/owncloud\/data\/owncloud.log because No
> such file or directory at
> \/owncloud\/lib\/private\/log\/owncloud.php#53","level":3,"time":"2016-04-16T22:26:45+00:00"}
> 
> 
> Symlinking does the same.
> Can someone tell me how can i move my datadir without moving all my
> owncloud installation files to abother location?
> 
> 
> OpenBSD-current, ownCloud 8.2, httpd, php-5.6, php-fpm



Re: Getting started with an OpenBSD Desktop...

2016-04-13 Thread Erling Westenvik
On Wed, Apr 13, 2016 at 09:37:53AM +, Mike Burns wrote:
> On 2016-04-13 10.42.28 +0200, Erling Westenvik wrote:
> > On Tue, Apr 12, 2016 at 08:34:16PM -0400, Implausibility wrote:
> > Various attempts on creating "generic" wifi network connection manager
> > scripts have been made. None with a true GUI AFAIK.
> 
> I hooked some shell scripts up with zenity to make a GUI.
> 
Interesting. Care to share the code somewhere? Maybe it could evolve
into a port/package?



  1   2   3   >