Re: How to unlock a serial port

2021-01-14 Thread Nick Holland

On 1/14/21 12:38 PM, Andrew Grillet wrote:

Hi

I am running OpenBSD on a T2000 (Sparc64).
I was trying to use the serial port from the primary domain, connected via
ssh, and my network lost the connection.
My tty00 is now locked:
jay# stty -f /dev/tty00
stty: /dev/tty00: Device busy
I do not want to reboot the primary, as the guests are running various live
services. I cannot find evidence of a lock file in /dev/spool/lock.
Is there a way out of this predicament?


What command were you running when you were disconnected?
is it still running?

A little pkill might do wonders for you.
I haven't used a T2000, but most of the time when I get "device busy"
I have left a program running on the port.

When I have a port actually "die" on me, it's usually a USB connected
serial device, and the behavior is quite different.  Either a physical
disconnect or a reboot is needed, but that doesn't appear to be your
situation.

Nick.



How to unlock a serial port

2021-01-14 Thread Andrew Grillet
Hi

I am running OpenBSD on a T2000 (Sparc64).
I was trying to use the serial port from the primary domain, connected via
ssh, and my network lost the connection.
My tty00 is now locked:
jay# stty -f /dev/tty00
stty: /dev/tty00: Device busy
I do not want to reboot the primary, as the guests are running various live
services. I cannot find evidence of a lock file in /dev/spool/lock.
Is there a way out of this predicament?

Andrew


Re: auto-boot

2021-01-14 Thread Bastien Durel
Le jeudi 14 janvier 2021 à 16:59 +0100, Marcus MERIGHI a écrit :
> bast...@durel.org (Bastien Durel), 2021.01.14 (Thu) 16:05 (CET):
> > Le jeudi 14 janvier 2021 à 15:47 +0100, Marcus MERIGHI a écrit :
> > > bast...@durel.org (Bastien Durel), 2021.01.14 (Thu) 10:20 (CET):
> > > > I have a router connected via a serial port to another machine
> > > > (which
> > > > is usually powered off), wich fails to boot until I connect and
> > > > validate the boot> prompt
> > > > 
> > > > I configured my boot.conf as it follows :
> > > > 
> > > > # cat
> > > > /etc/boot.conf 
> > > > set timeout 10
> > > > set tty com0
> > > 
> > > I usually have 
> > > 
> > >     stty com0 115200
> > >     set tty com0
> > >     set timeout 2
> > > 
> > > and the machines boot automagically...
> > > 
> > > Marcus
> > > 
> > Actually, it looks like the automagic boot depends on the status of
> > the
> > attached computer : when it runs, the router boots automagically,
> > and
> > when it does not, then the boot waits until I press enter (after
> > booting it, obviously)
> 
> Ah, I failed on getting what you meant!
> 
> Emitting wild guesses now... As soon as the boot> prompt receives
> input,
> it cancels the timout counter (and doesn't auto-boot). Could it be
> that
> your non-auto-booting machine receives something that looks like
> input
> to the boot> prompt? Can you test with the serial cable detached?
> 

Done that; that's very strange : the router did not auto-boot, but did
as soon as I plugged-in the serial cable in (I left minicom running on
the other box) (or maybe after a few seconds, I did not checked in real
time)


-- 
Bastien



Re: auto-boot

2021-01-14 Thread Marcus MERIGHI
bast...@durel.org (Bastien Durel), 2021.01.14 (Thu) 16:05 (CET):
> Le jeudi 14 janvier 2021 à 15:47 +0100, Marcus MERIGHI a écrit :
> > bast...@durel.org (Bastien Durel), 2021.01.14 (Thu) 10:20 (CET):
> > > I have a router connected via a serial port to another machine
> > > (which
> > > is usually powered off), wich fails to boot until I connect and
> > > validate the boot> prompt
> > > 
> > > I configured my boot.conf as it follows :
> > > 
> > > # cat
> > > /etc/boot.conf  
> > > set timeout 10
> > > set tty com0
> > 
> > I usually have 
> > 
> >     stty com0 115200
> >     set tty com0
> >     set timeout 2
> > 
> > and the machines boot automagically...
> > 
> > Marcus
> > 
> Actually, it looks like the automagic boot depends on the status of the
> attached computer : when it runs, the router boots automagically, and
> when it does not, then the boot waits until I press enter (after
> booting it, obviously)

Ah, I failed on getting what you meant!

Emitting wild guesses now... As soon as the boot> prompt receives input,
it cancels the timout counter (and doesn't auto-boot). Could it be that
your non-auto-booting machine receives something that looks like input
to the boot> prompt? Can you test with the serial cable detached?

(It would be more comprehensible if it was the other way round:
not booting with the supervising machine beeing *on* and by some strange
mishaps sending input to the boot> prompt.)

Marcus



Re: auto-boot

2021-01-14 Thread Bastien Durel
Le jeudi 14 janvier 2021 à 15:47 +0100, Marcus MERIGHI a écrit :
> Hello, 
> 
> bast...@durel.org (Bastien Durel), 2021.01.14 (Thu) 10:20 (CET):
> > I have a router connected via a serial port to another machine
> > (which
> > is usually powered off), wich fails to boot until I connect and
> > validate the boot> prompt
> > 
> > I configured my boot.conf as it follows :
> > 
> > # cat
> > /etc/boot.conf  
> > set timeout 10
> > set tty com0
> 
> I usually have 
> 
>     stty com0 115200
>     set tty com0
>     set timeout 2
> 
> and the machines boot automagically...
> 
> Marcus
> 
Actually, it looks like the automagic boot depends on the status of the
attached computer : when it runs, the router boots automagically, and
when it does not, then the boot waits until I press enter (after
booting it, obviously)

-- 
Bastien



Re: auto-boot

2021-01-14 Thread Marcus MERIGHI
Hello, 

bast...@durel.org (Bastien Durel), 2021.01.14 (Thu) 10:20 (CET):
> I have a router connected via a serial port to another machine (which
> is usually powered off), wich fails to boot until I connect and
> validate the boot> prompt
> 
> I configured my boot.conf as it follows :
> 
> # cat /etc/boot.conf  
> set timeout 10
> set tty com0

I usually have 

stty com0 115200
set tty com0
set timeout 2

and the machines boot automagically...

Marcus



Re: rm: fts_read: No such file or directory

2021-01-14 Thread Paul de Weerd
Hi Otto,

Thanks for your reply.

On Thu, Jan 14, 2021 at 08:22:33AM +0100, Otto Moerbeek wrote:
| > Could there be some TOCTOU issue here somewhere?  Or some cache
| > misbehaviour?  Or is it really dying hardware?
| 
| My first bet would be some form of corruption. FLipped bits in e..g
| directories while operating normally cannot be seen by the
| clean/unclean flag in the superblock. That one only records if the
| filesystem was unmounted before reboot, shutdown or crash.

I understand that - but then why would the error clear on subsequent
runs of rm?

| The forced fsck might reveal more.

It did find some issues, and then was waiting for my input over night
(when the backup run mounted the filesystem and changed things).

** /dev/sd2a (ebb54a869d056df3.a)
** File system is already clean
** Last Mounted on /backup
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
ZERO LENGTH DIR I=57604332  OWNER=root MODE=40755
SIZE=0 MTIME=Jan 13 13:56 2021
CLEAR? [Fyn?] y

** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? [Fyn?] y

SUMMARY INFORMATION BAD
SALVAGE? [Fyn?] y

BLK(S) MISSING IN BIT MAPS
SALVAGE? [Fyn?] y

27766624 files, 396630326 used, 267754002 free (2016066 frags,
33217242 blocks, 0.3% fragmentation)

* FILE SYSTEM WAS MODIFIED *

I ran it once more after that, more issues were found:

** /dev/sd2a (ebb54a869d056df3.a)
** File system is already clean
** Last Mounted on /backup
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? [Fyn?] y

SUMMARY INFORMATION BAD
SALVAGE? [Fyn?] y

BLK(S) MISSING IN BIT MAPS
SALVAGE? [Fyn?] y

27884252 files, 397169471 used, 267214857 free (1944825 frags,
33158754 blocks, 0.3% fragmentation)

* FILE SYSTEM WAS MODIFIED *

Until the third fsck came back clean:

** /dev/sd2a (ebb54a869d056df3.a)
** File system is already clean
** Last Mounted on /backup
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
27884252 files, 397169471 used, 267214857 free (1944825 frags,
33158754 blocks, 0.3% fragmentation)
  136m19.01s real 4m00.56s user20m33.85s system


I'll write it off to those errors, but I still don't understand why
re-trying would fix these kinds of issues.

Thanks again, Otto!

Paul

-- 
>[<++>-]<+++.>+++[<-->-]<.>+++[<+
+++>-]<.>++[<>-]<+.--.[-]
 http://www.weirdnet.nl/ 



Re: CARP load balancing problems under KVM

2021-01-14 Thread Carlos Lopez
Many thanks for your help Giannis ... I am not using oVirt to manage this KVM 
host, only default installed tools: libvirtd, virsh ... In any case there is 
not any filter applied in libvirtd 

On 12/1/21, 20:13, "owner-m...@openbsd.org on behalf of Kapetanakis Giannis" 
 wrote:

On 12/01/2021 18:58, Carlos Lopez wrote:
> Thanks Gianni, but about what interface ? KVM bridges? In theory, MAC 
spoofing is avoided using this option:
>
> bridge.ageing-time: 300
>
> On 12/1/21, 17:47, "owner-m...@openbsd.org on behalf of Kapetanakis 
Giannis"  wrote:
>
>  Check that you have mac spoofing filter disabled on that interface.


For carp to work, I have it disabled on the virtual interface on the 
supervisor.

I use ovirt so I do it on the network profile there.

This is a libvirt filter option. Maybe it's applied by default on your 
setup. The idea is to disable this protection and allow mac spoofing.

G




auto-boot

2021-01-14 Thread Bastien Durel
Hello,

I have a router connected via a serial port to another machine (which
is usually powered off), wich fails to boot until I connect and
validate the boot> prompt

I configured my boot.conf as it follows :

# cat /etc/boot.conf  
set timeout 10
set tty com0
#

Shouln't the box boot by itself after 10 seconds ?

Regards,

dmesg:

OpenBSD 6.8 (GENERIC.MP) #3: Thu Jan  7 07:35:39 MST 2021

r...@syspatch-68-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4196298752 (4001MB)
avail mem = 4054081536 (3866MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x8ce21000 (85 entries)
bios0: vendor American Megatrends Inc. version "5.12" date 11/23/2018
bios0: Default string Default string
acpi0 at bios0: ACPI 6.0
acpi0: sleep states S0 S3 S5
acpi0: tables DSDT FACP APIC FPDT FIDT MCFG SSDT SSDT HPET SSDT SSDT UEFI SSDT 
LPIT SSDT SSDT SSDT SSDT DBGP DBG2 SSDT DMAR ASF! WSMT
acpi0: wakeup devices RP09(S3) PXSX(S3) RP10(S3) PXSX(S3) RP11(S3) PXSX(S3) 
RP12(S3) PXSX(S3) RP13(S3) PXSX(S3) RP01(S3) PXSX(S3) RP02(S3) PXSX(S3) 
RP03(S3) PXSX(S3) [...]
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) Celeron(R) CPU 3865U @ 1.80GHz, 1696.62 MHz, 06-8e-09
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,INVPCID,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Celeron(R) CPU 3865U @ 1.80GHz, 1696.06 MHz, 06-8e-09
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,INVPCID,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 120 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-255
acpihpet0 at acpi0: 2399 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus -1 (RP09)
acpiprt5 at acpi0: bus -1 (RP10)
acpiprt6 at acpi0: bus -1 (RP11)
acpiprt7 at acpi0: bus -1 (RP12)
acpiprt8 at acpi0: bus -1 (RP13)
acpiprt9 at acpi0: bus 1 (RP01)
acpiprt10 at acpi0: bus 2 (RP02)
acpiprt11 at acpi0: bus 3 (RP03)
acpiprt12 at acpi0: bus 4 (RP04)
acpiprt13 at acpi0: bus 5 (RP05)
acpiprt14 at acpi0: bus 6 (RP06)
acpiprt15 at acpi0: bus -1 (RP07)
acpiprt16 at acpi0: bus -1 (RP08)
acpiprt17 at acpi0: bus -1 (RP17)
acpiprt18 at acpi0: bus -1 (RP18)
acpiprt19 at acpi0: bus -1 (RP19)
acpiprt20 at acpi0: bus -1 (RP20)
acpiprt21 at acpi0: bus -1 (RP21)
acpiprt22 at acpi0: bus -1 (RP22)
acpiprt23 at acpi0: bus -1 (RP23)
acpiprt24 at acpi0: bus -1 (RP24)
acpiprt25 at acpi0: bus -1 (RP14)
acpiprt26 at acpi0: bus -1 (RP15)
acpiprt27 at acpi0: bus -1 (RP16)
acpiec0 at acpi0: not present
acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
acpicmos0 at acpi0
"INT344B" at acpi0 not configured
acpibtn0 at acpi0: SLPB
"PNP0C14" at acpi0 not configured
"INT33A1" at acpi0 not configured
acpibtn1 at acpi0: PWRB
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
acpicpu0 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: FN00, resource for FAN0
acpipwrres1 at acpi0: FN01, resource for FAN1
acpipwrres2 at acpi0: FN02, resource for FAN2
acpipwrres3 at acpi0: FN03, resource for FAN3
acpipwrres4 at acpi0: FN04, resource for FAN4
acpitz0 at acpi0: critical temperature is 119 degC
acpitz1 at acpi0: critical temperature is 119 degC
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: using VERW MDS workaround (except on vmm entry)
cpu0: Enhanced SpeedStep 1696 MHz: speeds: 

Re: IKEv2 on Windows 10

2021-01-14 Thread Stuart Henderson
On 2021-01-13, Ian Timothy  wrote:
> Looking at some of the other information provided, I tried this along with 
> the registry edit below:
>
> PS> Add-VpnConnection -Name "IPB2" -ServerAddress "vpn.company.com" 
> -TunnelType IKEv2 -AuthenticationMethod MachineCertificate -AllUserConnection 
> -Force

"-AuthenticationMethod MachineCertificate" - I thought you were using
MSCHAP not machine certs?

FWIW I'm adding the connection manually and then doing this:

Set-VpnConnection -ConnectionName "vpn" -EncryptionLevel Maximum 
-SplitTunneling $false -passthru

Set-VpnConnectionIPsecConfiguration -ConnectionName "vpn" 
-AuthenticationTransformConstants GCMAES128 -CipherTransformConstants GCMAES128 
-EncryptionMethod AES128 -IntegrityCheckMethod SHA256 -DHGroup ECP256 -PfsGroup 
ECP256 -passthru 

iked.conf (using the same config for Windows/Android/iOS cloents, and
for ease of client setup allowing the default Windows crypto as well as
better ones):

ikev2 "vpn" passive esp from 0.0.0.0/0 to 0.0.0.0 \
  local xxx \
  peer any \
  ikesa enc aes-128 enc aes-256  prf hmac-sha2-256 prf hmac-sha1  auth 
hmac-sha2-256  group curve25519 group ecp521 group ecp256 group modp2048 group 
modp1024 \
  childsa enc aes-128-gcm enc aes-256-gcm group curve25519 group ecp521 group 
ecp256 group modp2048 \
  childsa enc aes-128 enc aes-256  auth hmac-sha2-256 auth hmac-sha1 \
  childsa enc aes-128-gcm enc aes-256-gcm \
  srcid "xxx" \
  eap "mschap-v2" \
  config address xxx/25 \
  config name-server xxx \
  tag "$name-$id"

(plus the user config).