Re: Help for another wiped out disklabel

2023-04-13 Thread Greg Thomas
Ok, now that 7.3 is up and running fine on sd0 I can re do my sd1 USB SSD.

This SSD was set up as a 2nd disk back when I originally installed 6.8 on
it so it's hard for me to remember how I would have had it start at 0
rather than 64 as mentioned in the FAQ.

Thanks for reading and reminding me Nick.



On Thu, Apr 13, 2023 at 4:32 PM Nick Holland 
wrote:

> On 4/13/23 16:08, Greg Thomas wrote:
> > Thank you!  I gave it one more shot before attempting the script and I'm
> > back in.  I figured I'd try 0 for the beginning of the partition.
> >
> > grits# disklabel sd1
> > # /dev/rsd1c:
> > type: SCSI
> > disk: SCSI disk
> > label: Ext SSD
> > duid: 2eeb6058175bf1f7
> > flags:
> > bytes/sector: 512
> > sectors/track: 20
> > tracks/cylinder: 22
> > sectors/cylinder: 440
> > cylinders: 2131143
> > total sectors: 937703088
> > boundstart: 0
> > boundend: 937703088
> >
> > 16 partitions:
> > #size   offset  fstype [fsize bsize   cpg]
> >a:9377030400  4.2BSD   4096 32768 1
> >c:9377030880  unused
>
> OUCH.  Don't do this!
>
> I'm not sure why your disklabel got overwritten *in your case*, but there
> is stuff that's supposed to be at sector zero, and a disklabel is NOT IT.
> Something someday will clobber it.  And it did.
>
> Please, back your data up, put either a UEFI or MBR partition table on it,
> and then use the rest of the disk for your backup.  With modern disk
> sizes, the amount of space you "save" isn't worth the first time this
> happens to you.
>
> Nick.
> (who went back to look at your dmesg to make sure it wasn't a sparc64 :)
>
>


Re: Help for another wiped out disklabel

2023-04-13 Thread Nick Holland

On 4/13/23 16:08, Greg Thomas wrote:

Thank you!  I gave it one more shot before attempting the script and I'm
back in.  I figured I'd try 0 for the beginning of the partition.

grits# disklabel sd1
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: Ext SSD
duid: 2eeb6058175bf1f7
flags:
bytes/sector: 512
sectors/track: 20
tracks/cylinder: 22
sectors/cylinder: 440
cylinders: 2131143
total sectors: 937703088
boundstart: 0
boundend: 937703088

16 partitions:
#size   offset  fstype [fsize bsize   cpg]
   a:9377030400  4.2BSD   4096 32768 1
   c:9377030880  unused


OUCH.  Don't do this!

I'm not sure why your disklabel got overwritten *in your case*, but there
is stuff that's supposed to be at sector zero, and a disklabel is NOT IT.
Something someday will clobber it.  And it did.

Please, back your data up, put either a UEFI or MBR partition table on it,
and then use the rest of the disk for your backup.  With modern disk
sizes, the amount of space you "save" isn't worth the first time this
happens to you.

Nick.
(who went back to look at your dmesg to make sure it wasn't a sparc64 :)



Re: After sysupgrade, computer hangs after efi0

2023-04-13 Thread Jeff Ross

On 4/12/23 12:22 PM, Jeff Ross wrote:

Hi all,

I did a sysupgrade from 7.2 to 7.3 on an HP EliteDesk (amd64). The 
upgrade went great but now the computer will not boot.


Here's what I get at boot:
(typed from photo--disregard any typos)

[ using 3644008 bytes of bsf ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2023 OpenBSD.  All rights reserved. 
https://www.OpenBSD.org


OpenBSD 7.3 (GENERIC.MP) #1125 Sat Mar 25 10:36:29 MDT 2023
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8469549056 (8077MB)
avail mem = 8193462272 (7813MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0:  SMBIOS rev. 2.7 @ 0xe8ad9 (27 entries)
bios0: vendor Hewlett-Packard version "L04 v02.16" date 03/24/2015
bios0: Hewlett-Packard HP EliteDesk 800 G1 DM
efi0 at bios0: UEFI 2.3.1
efi0: American Megatrends rev 0x4028e


Any ideas greatly appreciated.

Maybe I could use the 7.2 installer to "upgrade" back to 7.2 since I 
never have been able to boot 7.3.


Thanks,

Jeff Ross

dmesg from the 7.2 installer:

OpenBSD 7.2 (RAMDISK_CD) #725: Tue Sep 27 12:02:48 MDT 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
real mem = 8469549056 (8077MB)
avail mem = 8208846848 (7828MB)
random: good seed from bootblocks
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xe8ad9 (27 entries)
bios0: vendor Hewlett-Packard version "L04 v02.16" date 03/24/2015
bios0: Hewlett-Packard HP EliteDesk 800 G1 DM
acpi0 at bios0: ACPI 5.0
acpi0: tables DSDT FACP APIC FPDT SSDT SSDT SSDT MCFG HPET SSDT SSDT 
SSDT SLIC ASF! TCPA

acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz, 1995.80 MHz, 06-3c-03
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,TSC_ADJUST,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 
64b/line 8-way L2 cache, 6MB 64b/line 12-way L3 cache

cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
acpihpet0 at acpi0: 14318179 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)
acpiec0 at acpi0: not present
acpipci0 at acpi0 PCI0: 0x0010 0x0011 0x
acpicmos0 at acpi0
"IFX0102" at acpi0 not configured
"PNP0C0C" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
acpicpu at acpi0 not configured
acpipwrres at acpi0 not configured
acpipwrres at acpi0 not configured
acpitz at acpi0 not configured
acpitz at acpi0 not configured
cpu0: using Broadwell MDS workaround
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x06
"Intel HD Graphics 4600" rev 0x06 at pci0 dev 2 function 0 not configured
"Intel Core 4G HD Audio" rev 0x06 at pci0 dev 3 function 0 not configured
xhci0 at pci0 dev 20 function 0 "Intel 8 Series xHCI" rev 0x04: msi, 
xHCI 1.0

usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 
3.00/1.00 addr 1

"Intel 8 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
"Intel 8 Series KT" rev 0x04 at pci0 dev 22 function 3 not configured
em0 at pci0 dev 25 function 0 "Intel I217-LM" rev 0x04: msi, address 
ec:b1:d7:38:ab:95
ehci0 at pci0 dev 26 function 0 "Intel 8 Series USB" rev 0x04: apic 8 
int 16

usb1 at ehci0: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 
2.00/1.00 addr 1
"Intel 8 Series HD Audio" rev 0x04 at pci0 dev 27 function 0 not 
configured
ehci1 at pci0 dev 29 function 0 "Intel 8 Series USB" rev 0x04: apic 8 
int 23

usb2 at ehci1: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev 
2.00/1.00 addr 1

"Intel Q87 LPC" rev 0x04 at pci0 dev 31 function 0 not configured
ahci0 at pci0 dev 31 function 2 "Intel 8 Series AHCI" rev 0x04: msi, 
AHCI 1.3

ahci0: port 0: 6.0Gb/s
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0:  
t10.ATA_KingFast_0303B0512_

sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
"Intel 8 Series SMBus" rev 0x04 at pci0 dev 31 function 3 not configured
isa0 at mainbus0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
efifb0 at mainbus0: 1920x1080, 3

Re: Help for another wiped out disklabel

2023-04-13 Thread Greg Thomas
Thank you!  I gave it one more shot before attempting the script and I'm
back in.  I figured I'd try 0 for the beginning of the partition.

grits# disklabel sd1
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: Ext SSD
duid: 2eeb6058175bf1f7
flags:
bytes/sector: 512
sectors/track: 20
tracks/cylinder: 22
sectors/cylinder: 440
cylinders: 2131143
total sectors: 937703088
boundstart: 0
boundend: 937703088

16 partitions:
#size   offset  fstype [fsize bsize   cpg]
  a:9377030400  4.2BSD   4096 32768 1
  c:9377030880  unused

On Thu, Apr 13, 2023 at 2:51 AM  wrote:

> Greg Thomas writes:
> > I just ran through a fresh 7.3 install onto sd0 on an old 6.8 laptop and
> I
> > have no idea what happened to the disklabel on sd1 (during the install I
> > only did an automatic disklabel on sd0).  This is just a backup of my
> > current laptop so not the end of the world (unless my current laptop dies
> > before I have a chance to back it up again).
>
> Part of the solution I used previously to recover my trashed disklabel
> was a script to create a partition on the disklabel with every
> starting value (a simple brute force approach). This proved to be
> far too slow so I resorted to hacking scan_ffs but that's because
> I had other partitions and swap of unknown size to skip over first
> to find the /var/backup partition that I needed.
>
> Since your lost partition is at the beginning of the disc somewhere
> this shouldn't be much of a problem. The end sector doesn't really
> matter if you'll mount the partition read-only provided it's large
> enough; just don't run fsck on it.
>
> Something along the lines of:
>
> for k in `jot 2048`; do echo  | disklabel -e sd0; mount -r
> /dev/sd1a /mnt && echo $k; umount /mnt; done
>
> Where  is multi-line input to disklabel to delete and create
> partition a. Alternatively investigate disklabel's -R option.
>
> Then locate your disklabel backup, investigate -R if you didn't
> already, and restore it exactly.
>
> Matthew
>
>


carp status master on both firewalls

2023-04-13 Thread mabi
Hello,

I am running two OpenBSD 7.3 firewalls with pfsync and CARP for redundancy and 
have one carp interface carp0 for the public internet and one carp interface 
carp1 for my private (NAT) internal network. The private carp interface has 
status master on the first firewall and status backup on the 2nd firewall so 
all good here but for my external carp interface both firewalls show master as 
status so I suspect I have something wrong here in my config or it is a bug.

The config is below for reference:

/etc/hostname.carp0 on fw1

inet x.x.x.114 255.255.255.240 x.x.x.127 vhid 40 carpdev em2 pass password 
advskew 1
inet alias x.x.x.115 0xfff0
inet alias x.x.x.116 0xfff0

/etc/hostname.carp0 on fw2
 
inet x.x.x.114 255.255.255.240 x.x.x.127 vhid 40 carpdev em0 pass password 
advskew 128
inet alias x.x.x.115 0xfff0
inet alias x.x.x.116 0xfff0

On both firewalls I have added the following in /etc/pf.conf:

pass on { $ext_if $int_if } proto carp keep state (no-sync)

Did anyone already encounter this issue or has any idea what might be wrong?

Best regards,
Mabi



Re: coverity running on OpenBSD to scan a port

2023-04-13 Thread Tom Smyth
Thanks for that...
Ill setup a test system so ... Thanks

On Thu, 13 Apr 2023 at 07:33, Stuart Henderson
 wrote:
>
> On 2023-04-12, Tom Smyth  wrote:
> > does anyone have experience on running coverity on OpenBSD ...
> > Im trying to scan a port im maintaining at the minute...
> > there does not seem to be binaries for coverity  for OpenBSD
>
> I don't think you can - afaik those scans are normally done on linux.
>


-- 
Kindest regards,
Tom Smyth.



Re: Reference/Citation Manager -- Zotero or JabRef? (+ compilation of Zotero?)

2023-04-13 Thread Stephan, Corey J
Many thanks to everyone who has replied and/or otherwise helped with 
finding a modern/featureful GUI citation management solution for OpenBSD.

Status quaestionis, April 13, 2023

I. [NEW] print/kbibtex -- WORKING and best current option

Rafael Sadowski, our KDE guru, has most generously made a port of 
KBibTeX (https://apps.kde.org/kbibtex/) to help all of us:

https://marc.info/?l=openbsd-ports&m=168128336929728&w=2

Follow the thread for a few small setup notes and to track the port's 
acceptance progress.

II. Docear -- WORKING but incomplete and EOL

https://docear.org/ runs in OpenBSD with a regular Java installation, 
but it is both incomplete and EOL. Not recommended.

III. Zotero -- NOT WORKING

a) Requires xul to build, but xul has been dropped from OpenBSD

On 4/5/23 00:31, Robert Alessi wrote:

> Someone here will correct me if I am wrong, but I think that at some
> point Zotero needs xul to be compiled, which has been dropped from
> OpenBSD.  This is why I didn't even try to compile it.

b) Works in vmd(8) but only with LibreOffice + Firefox installed inside 
same VM

> Well, that said, I found a way to run Zotero from a Devuan VM with
> vmd(8).  Once Devuan is installed, running Zotero is as simple as
> this:
> 
>  ssh -Y 100.64.1.3 zotero

> Then, from within the VM, you can connect back to the host with sshfs
> so that Zotero can see your files on the host.
> 
> With this simple method, you can go as far as to run Zotero +
> LibreOffice from the VM.

IV. Jabref -- NOT WORKING

a) Requires OpenJFX (JavaFX) to build, but OpenJFX does not support OpenBSD

For example, see my bug report with JabRef, which I mostly filed to make 
the leadership team aware that the move to gradle plugins has the 
consequence of leaving almost all OSes behind in hope that they might 
redirect some attention to portability:
https://github.com/JabRef/jabref/issues/9745

(Very) old versions of JabRef (3.8.2 and earlier) should still run with 
OpenJDK 8 (jdk-1.8.0).

-
Deus vos benedicat,

Corey Stephan, Ph.D.
coreystephan.com



Re: Help for another wiped out disklabel

2023-04-13 Thread chohag
Greg Thomas writes:
> I just ran through a fresh 7.3 install onto sd0 on an old 6.8 laptop and I
> have no idea what happened to the disklabel on sd1 (during the install I
> only did an automatic disklabel on sd0).  This is just a backup of my
> current laptop so not the end of the world (unless my current laptop dies
> before I have a chance to back it up again).

Part of the solution I used previously to recover my trashed disklabel
was a script to create a partition on the disklabel with every
starting value (a simple brute force approach). This proved to be
far too slow so I resorted to hacking scan_ffs but that's because
I had other partitions and swap of unknown size to skip over first
to find the /var/backup partition that I needed.

Since your lost partition is at the beginning of the disc somewhere
this shouldn't be much of a problem. The end sector doesn't really
matter if you'll mount the partition read-only provided it's large
enough; just don't run fsck on it.

Something along the lines of:

for k in `jot 2048`; do echo  | disklabel -e sd0; mount -r 
/dev/sd1a /mnt && echo $k; umount /mnt; done

Where  is multi-line input to disklabel to delete and create
partition a. Alternatively investigate disklabel's -R option.

Then locate your disklabel backup, investigate -R if you didn't
already, and restore it exactly.

Matthew



Re: 7.3 php gd.so cannot load

2023-04-13 Thread Kent Watsen



> Ah, if you didn't reboot after doing that, then what you saw is expected.

Good to know. 


>> Is there a better way to install xshare73 and xbase73?
> 
> From the installer, usually.

I can’t do that, but point taken. 


Thank you Stu and Daniel!




Re: Setuid changed on /sbin/ping after installing patch 022_resolv

2023-04-13 Thread tetrahedra

Thank you for clarifying! Yes, I misunderstood what was meant by setuid
change, it makes sense it is checking for any change in a setuid binary.

It may be worth changing the wording in the security(8) message from
Setuid changes:
to
Changed setuid binaries:
as this would eliminate ambiguity. ("is it a change in a setuid bit or a
change in a binary that is already setuid?")

On Tue, Apr 11, 2023 at 08:52:09AM -0600, Theo de Raadt wrote:

the man page says:

o   Check for changes in setuid/setgid files and devices.

Those setuid binaries did change.  They were replaced. The sizes
are different also.  That's because there is a libc.a change and
these are static binaries.

the security script is not not just reporting whether setuid bits
are being turned on or off.


tetrahe...@danwin1210.de wrote:


Hi all,
security(8) sent me an alert that Setuid changed on /sbin/ping and
/sbin/ping6:

Running security(8):

Setuid changes:
-r-sr-xr-x 2 root bin 347728 Sep 27 17:40:01 2022 /sbin/ping
-r-sr-xr-x 1 root bin 347776 Mar 11 19:42:17 2023 /sbin/ping
-r-sr-xr-x 2 root bin 347728 Sep 27 17:40:01 2022 /sbin/ping6
-r-sr-xr-x 1 root bin 347776 Mar 11 19:42:17 2023 /sbin/ping6


This happened after I installed syspatch 022_resolv (and made no other
changes to the system).

I checked the source code of the 022_resolv patch and I don't see
anything that would affect the /sbin/ping binary.

Did I miss something? Or is this setuid change potentially indicative of
a bigger problem?