/r/openbsd

Photograph via snooOG

General OpenBSD community subreddit. For gaming-related discussion, visit /r/openbsd_gaming.

If you have genuine questions or concerns, you're always welcome. Tone matters.

Dicussion about OpenBSD: the free multi-platform 4.4BSD-based UNIX-like operating system focusing on portability, standardization, correctness, proactive security, and integrated cryptography.

If you have genuine questions or concerns, you're always welcome. Tone matters.

OpenBSD related links:

/r/openbsd

19,136 Subscribers

118

A big thank you to the OpenBSD developers

I heavily use a lot of old Sun Workstations+Servers (SPARC64) gear...

OpenBSD is the ONLY Operating System that performs flawlessly on all of them coupled with with latest software (such as the newest Rust).

Can use these twenty year old machines and develop new software going forward on an almost equal footing to using Intel/Linux. In fact the elegance of the OS makes it much easier to diagnose issues and fine tune performance and leaves me to concentrate on software development. Reliability is beyond exceptional as well.

Debian and other SPARC Linux fail to see my FC-AL disk controllers and Sun Tape Drives (OpenBSD picks everything up extremely well). And... I can boot a server install from a CD that has all drivers by default (not needing to write a DVD which are a nightmare to read on Suns that only like regular DVD, Suns can't USB boot) and have it up and running literally within 30 minutes.

Never drop the arch please (like nearly everyone else who has dropped it).

OpenBSD totally rocks and I'd be lost without it.

EDIT:

Also is totally secure... call me paranoid but it helps.... AND works on my ThinkPads out of the box including hibernate and suspend/resume... I can't fault it... is a great laptop OS as well.

WANTS:

ZFS!!!!!

10 Comments
2024/12/03
17:09 UTC

0

Hi assembly code help

can anyone give newest OpenBSD assembly code example and how to compile it


---EDIT---

Thank you so much for your help! Very much appreciated, u/_crc

this likely works too

from here assembly code example Link

/* https://old.reddit.com/r/openbsd/comments/1delkgn/syscalls_from_asm_on_openbsd_segfaulting/l91kws4/ */

 $ cat hello_world.s                                                  
 .globl main
 .section .text
 main:
     mov $4, %rax
     mov $1, %rdi
     mov $14, %rdx
     lea message(%rip), %rsi
 1:  syscall
     ret
 .section .openbsd.syscalls,"",%progbits
     .long 1b
     .long 4
 .section .rodata
 message:
     .string "Hello, World!\n"
 $ cc -static hello_world.s -o hello_world
 $ ./hello_world                                                      
 Hello, World!
4 Comments
2024/12/03
06:49 UTC

5

Log aggregation from several machines

I'm managing several machines and I'd like to slurp all logs into one place for viewing. What solution do you use for this?

rsyslogd looks somewhat interesting as it can save logs directly to databases, but perhaps there are more options I don't know about.

Happy to read about your experiences.

8 Comments
2024/12/03
02:58 UTC

1

un(able] to install

Hello, I’ve been unceremoniously bkicked by the installer, i’m using amd64 and unable to install (locate) file sets, i’m using usb for media and attempting dual install as per adviced on geodsoft.com, suggestions?

5 Comments
2024/12/02
22:46 UTC

2

is there anything like these linux kernel parameters? (amdgpu.sg_display=0, amdgpu.dcdebugmask=0x10)

without them (my guess, because i need them on archlinux) the system on my laptop is extremely laggy, a keystroke takes like half a second to finish, it's impossible to work and it's absolutely ungoogleable.

my laptop is an hp pavilion plus 14-ey0000 with a ryzen 7 7840h cpu (no dGPU)

6 Comments
2024/12/02
02:22 UTC

10

Need help using OpenBSD's tools (relayd, httpd, acme-client) to replace Caddy as a reverse proxy for my local services

Hey, I recently got my hands on an old laptop and I have been tinkering around with OpenBSD on it. While I have been looking at the docs, tutorials and old forum posts, I just couldn't wrap my head around setting up the .conf files.

As I said in the title, I am looking into replacing Caddy (which has been awesome so far with it's ease of use) with OpenBSD's tools, though not out of necessity.

My use-case is quite simple: I have several services running on one machine on my LAN (let's say it's on 192.168.1.2). I want to set up relayd as a reverse proxy so that I can access each service on either it's own subdomain like "service1.example.com","service2.example.com" etc or on a subpath like "example.com/service1", "example.com/service2" etc (though if anyone could tell me if one is better than the other I would gladly like to learn).

I also want to ask about TLS/SSL. Is it possible to get certs for example.com and use them for all subdomains or do I have to get a different cert for each service.example.com?

Also, if anyone knows any best practices on setting up not only these tools, but also on maintaining them and the entire system, I'll gladly listen to you.

Thanks in advance for any and all help.

13 Comments
2024/12/02
01:12 UTC

1

Mangopi MQ-PRO

Does anyone know of a cable/display that can be connected to the small dsi connector on the back of the MQ-PRO?

0 Comments
2024/12/01
17:11 UTC

1

disklabel, creating new partition trouble

Hello, I am running OpenBSD 7.6 AMD64. I have a triple boot system, OpenSUSE Tumbleweed, OpenBSD, and Windows 11 on my T430 laptop with 4TB SSD.

Extra side details:

I had a shared NTFS parttion about 2TB I think, and one day I had trouble accessing it. Interesting side note is that from the start I could only successfully mount the storage ntfs and not the windows system ntfs partition. After running some file checks on Windows 11, I got the storage ntfs back, however I was unable to get OpenBSD to mount the Windows System. Interestingly, OpenSUSE is able to mount both. One day I was looking to see if I could use something like hammer or zfs and I came across muxfs.

Back to work on hand:

I wanted to try it muxfs, so I deleted my ntfs storage partition in windows and then went to openbsd to create a new FFS partition. However, when I tried to create a new partition using disklabel, it said there was only 8 bytes available. The amount I am looking for is about 2.7TB. So I went to fdisk and I can see the 2.7TB, but I am struggling to find the same 2.7TB in disklabel. Note: I have tried creating a ntfs partition and then deleting it in disklabel and I have tried setting up a unformatted raw partition in opensuse, but in both cases I had the same problem.

UTC-INC-1% doas disklabel sd0

doas (captain_lesbee_ziner@UTC-INC-1.my.domain) password:

# /dev/rsd0c:

type: SCSI

disk: SCSI disk

label: CT4000BX500SSD1

duid: 3be3580eebe68778

flags:

bytes/sector: 512

sectors/track: 255

tracks/cylinder: 511

sectors/cylinder: 130305

cylinders: 59967

total sectors: 7814037168

boundstart: 698353664

boundend: 1327499264

16 partitions:

# size offset fstype [fsize bsize cpg]

a: 2097152 698353664 4.2BSD 2048 16384 12960 # /

b: 33731256 700450816 swap # none

c: 7814037168 0 unused

d: 8388576 734182080 4.2BSD 2048 16384 12960 # /tmp

e: 74802528 742570656 4.2BSD 2048 16384 12960 # /var

f: 62914560 817373184 4.2BSD 2048 16384 12960 # /usr

g: 2097152 880287744 4.2BSD 2048 16384 12960 # /usr/X11R6

h: 41943040 882384896 4.2BSD 2048 16384 12960 # /usr/local

i: 2097152 2048 MSDOS

j: 629145600 2099200 ext2fs

k: 67108864 631244800 unknown

l: 629145600 1327499264 MSDOS

n: 6291456 924327936 4.2BSD 2048 16384 12960 # /usr/src

o: 12582912 930619392 4.2BSD 2048 16384 12960 # /usr/obj

p: 384296960 943202304 4.2BSD 4096 32768 26062 # /home

UTC-INC-1% doas fdisk sd0

Disk: sd0 Usable LBA: 34 to 7814037134 [7814037168 Sectors]

#: type [ start: size ]

------------------------------------------------------------------------

0: EFI Sys [ 2048: 2097152 ]

1: Linux files* [ 2099200: 629145600 ]

2: Linux swap [ 631244800: 67108864 ]

3: OpenBSD [ 698353664: 629145600 ]

4: e3c9e316-0b5c-4db8-817d-f92df00215ae [ 1327499264: 32768 ]

5: Microsoft basic data [ 1327532032: 629112832 ]

6: 3b8f8425-20e0-4f3b-907f-1a25a76f98e8 [ 1956644864: 5857392271 ]

UTC-INC-1%

Thank you for your time and please let me know if there any information I could provide that will help. Any resources, guides, man pages you can point me to that would help me would be awesome, I want to get this fixed and learn my way to some UNIX/BSD job

2 Comments
2024/11/30
21:19 UTC

6

How to route packets from vmm guest to outside of network in packet filter?

I just dived into OpenBSD in earnest.
My first job was blocking all incoming traffic except ports that used by services.
Then tested them, worked as expect.

After all basic setup is done, I want to containerize few lightweight services using VMM.
Refer to documents came from official website, I setup /etc/vm.conf, /etc/pf.conf like following example.

    vm "vm-guacamole" {
      memory 4G
      cdrom "/home/user/vms/iso/alpine.iso"
      boot device cdrom
      disk "/home/user/vms/vm-guacamole/disk.qcow2"
      local interface
    }
    ext_if = "bge0"
    allowed_ports = "{ 80, 443, 2222 }"
    dns_server = "1.1.1.1"
    
    set block-policy drop
    set skip on lo0
    
    block in all
    pass out all
    
    pass in on $ext_if proto tcp to port $allowed_ports
    
    match out on egress from 100.64.0.0/10 to any nat-to (egress)
    pass in proto { udp tcp } from 100.64.0.0/10 to any port domain \
        rdr-to $dns_server port domain

In VMM guest, they could be able to resolve DNS but cannot connect to outside of network. I tried to allow incoming traffic from 100.64.0.0/10 using pass in from 100.64.0.0/10 but didn't work.

New to packet filter, also OpenBSD system. How can I resolve this issue?

3 Comments
2024/11/29
14:16 UTC

10

What is Long Term Support politics on OpenBSD?

As I see, new production-grade versions of OpenBSD are being released two times per year, and official recommendation is always Upgrade To The Latest Version.

But how one can rely on a stability guarantee while he is using OpenBSD, as new versions can contain bugs or further, overall upgrade process can fail and destroy a working PC?

Of course, probability of such a final is very low. But it does not eliminate the problem, since there is no Long Term Support notion in OpenBSD development.

For example, if I need Windows, I instal a Windows 10 LTSC channel with all the updates turned off, and never touch the system for many years, then install next LTSC, say Windows 11 LTSC.

But I have no idea how to proceed with OpenBSD and its two new versions per year.

12 Comments
2024/11/26
21:17 UTC

2

wxMaxima crash when trying to plot

Relative newbie here. I am running 7.6 and installed the wxMaxima port (a frontend for the Maxima computer algebra system). The program crashes when trying to make a (seemingly any) plot with the wxplot2d/wxplot3d command. Here is the result of running bt in gdb on the core dump:

#0  thrkill () at /tmp/-:2
2/tmp/-: No such file or directory.
in /tmp/-
(gdb) bt
#0  thrkill () at /tmp/-:2
#1  0xf1fbe9ec1da0ee82 in ?? ()
#2  0x000009957f1aa48b in _libc_abort () at /usr/src/lib/libc/stdlib/abort.c:51
#3  0x000009957f1b11e9 in _libc_pthread_mutex_unlock (mutexp=0x0)
    at /usr/src/lib/libc/thread/rthread_mutex.c:265
Die: DW_TAG_<unknown> (abbrev = 79, offset = 51422)
has children: FALSE
attributes:
DW_AT_type (DW_FORM_ref4) constant ref: 43535 (adjusted)
Dwarf Error: Cannot find type of die [in module /usr/lib/libc++.so.10.0]

It's been a while since I've done any debugging. It's possible maxima is trying to call out to gnuplot or something at this point, trying to pass something through /tmp/. Anyone able to help?

3 Comments
2024/11/27
18:29 UTC

5

M1 MacBook Pro (2020) can't detect network adapter

I installed bwfm firmware but couldn't see network interface in ifconfig output.

Checked dmesg log and found out there is no detected network adapter in there.

I attachd dmesg log.

Saw that there is similar post, is it bug in 7.6? Can I solve it by reinstalling older version?

OpenBSD 7.6 (GENERIC.MP) #196: Mon Sep 30 09:44:40 MDT 2024
    deraadt@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 16533123072 (15767MB)
avail mem = 15886790656 (15150MB)
random: good seed from bootblocks
mainbus0 at root: Apple MacBook Pro (14-inch, M1 Pro, 2021)
efi0 at mainbus0: UEFI 2.10
efi0: Das U-Boot rev 0x20230700
cpu0 at mainbus0 mpidr 0: Apple Icestorm Pro r2p0
cpu0: 128KB 64b/line 8-way L1 VIPT I-cache, 64KB 64b/line 8-way L1 D-cache
cpu0: 4096KB 128b/line 16-way L2 cache
cpu0: TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB+DCCVADP,SpecSEI,PAN+ATS1E1,LO,HPDS,VH,IDS,AT,CSV3,CSV2,DIT,AdvSIMD+HP,FP+HP,SSBS+MSR
cpu1 at mainbus0 mpidr 1: Apple Icestorm Pro r2p0
cpu1: 128KB 64b/line 8-way L1 VIPT I-cache, 64KB 64b/line 8-way L1 D-cache
cpu1: 4096KB 128b/line 16-way L2 cache
cpu2 at mainbus0 mpidr 10100: Apple Firestorm Pro r2p0
cpu2: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache
cpu2: 12288KB 128b/line 12-way L2 cache
cpu3 at mainbus0 mpidr 10101: Apple Firestorm Pro r2p0
cpu3: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache
cpu3: 12288KB 128b/line 12-way L2 cache
cpu4 at mainbus0 mpidr 10102: Apple Firestorm Pro r2p0
cpu4: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache
cpu4: 12288KB 128b/line 12-way L2 cache
cpu5 at mainbus0 mpidr 10200: Apple Firestorm Pro r2p0
cpu5: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache
cpu5: 12288KB 128b/line 12-way L2 cache
cpu6 at mainbus0 mpidr 10201: Apple Firestorm Pro r2p0
cpu6: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache
cpu6: 12288KB 128b/line 12-way L2 cache
cpu7 at mainbus0 mpidr 10202: Apple Firestorm Pro r2p0
cpu7: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache
cpu7: 12288KB 128b/line 12-way L2 cache
"asc-firmware" at mainbus0 not configured
"asc-firmware" at mainbus0 not configured
"framebuffer" at mainbus0 not configured
"" at mainbus0 not configured
"dcpext0_data" at mainbus0 not configured
"region157" at mainbus0 not configured
"region95" at mainbus0 not configured
"region94" at mainbus0 not configured
"region57" at mainbus0 not configured
"dcp_data" at mainbus0 not configured
"uat-handoff" at mainbus0 not configured
"uat-pagetables" at mainbus0 not configured
"uat-ttbs" at mainbus0 not configured
"isp-heap" at mainbus0 not configured
apm0 at mainbus0
"opp-table-0" at mainbus0 not configured
"opp-table-1" at mainbus0 not configured
"opp-table-gpu" at mainbus0 not configured
"pmu-e" at mainbus0 not configured
"pmu-p" at mainbus0 not configured
agtimer0 at mainbus0: 24000 kHz
"clock-ref" at mainbus0 not configured
"clock-200m" at mainbus0 not configured
"clock-disp0" at mainbus0 not configured
"clock-dispext0" at mainbus0 not configured
"clock-dispext0_die1" at mainbus0 not configured
"clock-dispext1" at mainbus0 not configured
"clock-dispext1_die1" at mainbus0 not configured
"clock-ref-nco" at mainbus0 not configured
simplebus0 at mainbus0: "soc"
aplpmgr0 at simplebus0
aplpmgr1 at simplebus0
aplpmgr2 at simplebus0
aplintc0 at simplebus0 nirq 1806 ndie 1
aplmbox0 at simplebus0
aplpinctrl0 at simplebus0
apldog0 at simplebus0
apldart0 at simplebus0: 32 bits, locked
apldart1 at simplebus0: 32 bits, locked
aplmbox1 at simplebus0
apldart2 at simplebus0: 32 bits, bypass
apldart3 at simplebus0: 32 bits, bypass
aplmbox2 at simplebus0
apldart4 at simplebus0: 32 bits, bypass
apldart5 at simplebus0: 32 bits
apldart6 at simplebus0: 32 bits
apldart7 at simplebus0: 32 bits
apldart8 at simplebus0: 32 bits
apldart9 at simplebus0: 32 bits, translating
apldart10 at simplebus0: 32 bits, locked
aplmbox3 at simplebus0
aplpinctrl1 at simplebus0
aplefuse0 at simplebus0
aplpinctrl2 at simplebus0
aplpinctrl3 at simplebus0
apldart11 at simplebus0: 32 bits, bypass
apldart12 at simplebus0: 32 bits, bypass
apldart13 at simplebus0: 32 bits, bypass
apldart14 at simplebus0: 32 bits, bypass
apldart15 at simplebus0: 32 bits, bypass
apldart16 at simplebus0: 32 bits, bypass
aplmbox4 at simplebus0
aplnco0 at simplebus0
"power-management" at simplebus0 not configured
aplsmc0 at simplebus0: can't get SRAM address
aplspmi0 at simplebus0
aplpmu0 at aplspmi0 sid 0xf
apldcp0 at simplebus0
apldrm0 at simplebus0
drm0 at apldrm0
aplpwm0 at simplebus0
apliic0 at simplebus0
iic0 at apliic0
tipd0 at iic0 addr 0x38
tipd1 at iic0 addr 0x3f
tipd2 at iic0 addr 0x3b
tipd3 at iic0 addr 0x3a
apliic1 at simplebus0
iic1 at apliic1
sncodec0 at iic1 addr 0x3a
sncodec1 at iic1 addr 0x38
sncodec2 at iic1 addr 0x39
apliic2 at simplebus0
iic2 at apliic2
"cirrus,cs42l84" at iic2 addr 0x4b not configured
apliic3 at simplebus0
iic3 at apliic3
sncodec3 at iic3 addr 0x3d
sncodec4 at iic3 addr 0x3b
sncodec5 at iic3 addr 0x3c
aplspi0 at simplebus0
aplspi1 at simplebus0
aplhidev0 at aplspi1
aplkbd0 at aplhidev0: 8 variable keys, 6 key codes
wskbd0 at aplkbd0: console keyboard
aplms0 at aplhidev0
wsmouse0 at aplms0 mux 0
exuart0 at simplebus0
apldma0 at simplebus0
aplmca0 at simplebus0
"gpu" at simplebus0 not configured
"isp" at simplebus0 not configured
aplpcie0 at simplebus0
pci0 at aplpcie0
ppb0 at pci0 dev 0 function 0 "Apple M1 PCIe" rev 0x01
pci1 at ppb0 bus 1
ppb1 at pci0 dev 1 function 0 "Apple M1 PCIe" rev 0x01
pci2 at ppb1 bus 2
aplcpu0 at simplebus0
aplcpu1 at simplebus0
aplcpu2 at simplebus0
apldcp1 at simplebus0
xhci0 at simplebus0, xHCI 1.10
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1
"phy" at simplebus0 not configured
xhci1 at simplebus0, xHCI 1.10
usb1 at xhci1: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1
"phy" at simplebus0 not configured
xhci2 at simplebus0, xHCI 1.10
usb2 at xhci2: USB revision 3.0
uhub2 at usb2 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1
"phy" at simplebus0 not configured
"phy" at simplebus0 not configured
"mux" at simplebus0 not configured
aplsart0 at simplebus0
aplns0 at simplebus0
nvme0 at aplns0: NVMe 1.1
nvme0: APPLE SSD AP0512R, firmware 499.0.9, serial 0ba0184be3b49422
scsibus0 at nvme0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <NVMe, APPLE SSD AP0512, 499.>
sd0: 477102MB, 4096 bytes/sector, 122138133 sectors
pwmleds0 at mainbus0
"fixed-regulator-sn012776-sdz" at mainbus0 not configured
aplaudio0 at mainbus0
audio0 at aplaudio0
uhub3 at uhub1 port 1 configuration 1 interface 0 "Apple Inc. USB2.0 Hub" rev 2.10/45.00 addr 2
umass0 at uhub3 port 1 configuration 1 interface 0 "SanDisk Cruzer Blade" rev 2.00/1.27 addr 3
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <SanDisk, Cruzer Blade, 1.27> removable serial.07815567070208113462
sd1: 14907MB, 512 bytes/sector, 30529536 sectors
ugen0 at uhub3 port 2 "Apple Inc USB-C Digital AV Multiport Adapter" rev 2.01/45.00 addr 4
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (f79dff1bb1486c0f.a) swap on sd0b dump on sd0b
WARNING: CHECK AND RESET THE DATE!
apldrm0: 3024x1890, 32bpp
wsdisplay0 at apldrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"framebuffer" at mainbus0 not configured
sd1 detached
scsibus1 detached
umass0 detached
umass0 at uhub3 port 1 configuration 1 interface 0 "SanDisk Cruzer Blade" rev 2.00/1.27 addr 3
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <SanDisk, Cruzer Blade, 1.27> removable serial.07815567070208113462
sd1: 14907MB, 512 bytes/sector, 30529536 sectors
4 Comments
2024/11/26
15:45 UTC

4

USB ext2 works in Linux and fails randomly on OpenBSD

I'm having a weird issue with my media drive, an external USB drive formatted ext2 Disk is clean according to. fsck, and all files are readable on Linux.

I mount the drive on OpenBSD as read-only and can see all the files. When I try to read, copy, play, or cksum the files, 90% of them fail with read error: Invalid argument. It's totally random and not size related; I have 60KB files failing, and 350MB files passing.

100% of the files are readable on my Linux laptop, but I get the same random failures on two different OpenBSD boxes; one running 7.6 (Dell i7) and one running 7.6-current (Dell i5)

Any hints? Google was not much help, pointing mainly to drive errors, but then why does Linux work?

Edit (Summary):

  • Ubuntu Fossa on Dell laptop: no corrupt files
  • FreeBSD 14.1 on Lenovo ThinkCenter: no corrupt files
  • OpenBSD 7.6 on Dell PC: many corrupt files, trying different USB ports
    • TinyCore Linux 15.0 on the same Dell as above: no corrupt files
  • OpenBSD 7.6-current on a different Dell PC: many corrupt files, trying different USB ports

All corrupt files are constant between machines, and don't change between runs.

If I dd or cat the corrupt files, they are truncated. Truncated length is consistent between different runs of the same file, but all files yield different truncated lengths.

My conclusion: there's a driver issue on OpenBSD with the SATA to USB chipset in my UGreen drive enclosure.

4 Comments
2024/11/26
14:07 UTC

3

Unable to grow partition on OpenBSD 7.6

I have installed an OpenBSD VM disk image that was originally 3GB in size into a new disk image that is now 64GB in size. When OpenBSD starts, disklabel shows the 64GB size as "unused", but claims the only partition I have (I only have a root partition) cannot grow in size. I have looked up all the man pages, etc. and it feels like a bug, but I'm not an OpenBSD expert and thought I'd see if anyone can help. Here are the relevant commands and their output so far (the bolded output of trying to expand the "a" partition below should work AFAIK)

bmh-build-x64-openbsd76-1# disklabel sd0 # /dev/rsd0c:

type: SCSI

disk: SCSI disk

label: QEMU HARDDISK

duid: d98b933336c3359a

flags:

bytes/sector: 512

sectors/track: 63

tracks/cylinder: 255

sectors/cylinder: 16065

cylinders: 8354

total sectors: 134217728

boundstart: 532544

boundend: 6291423

16 partitions:

# size offset fstype [fsize bsize cpg]

a: 5758848 532544 4.2BSD 2048 16384 12960 # /

c: 134217728 0 unused

i: 532480 64 MSDOS

bmh-build-x64-openbsd76-1# disklabel -E sd0

Label editor (enter '?' for help at any prompt)

sd0> p G

OpenBSD area: 532544-6291423; size: 2.7G; free: 0.0G

# size offset fstype [fsize bsize cpg]

a: 2.7G 532544 4.2BSD 2048 16384 12960 # /

c: 64.0G 0 unused

i: 0.3G 64 MSDOS

sd0> c a

Partition a is currently 5758848 sectors in size, and can have a maximum

size of 5758879 sectors.

size: [5758848]

bmh-build-x64-openbsd76-1# fdisk sd0

Disk: sd0 Usable LBA: 34 to 6291422 [134217728 Sectors]

#: type [ start: size ]

------------------------------------------------------------------------

0: EFI Sys [ 64: 532480 ]

1: OpenBSD [ 532544: 5758879 ]

4 Comments
2024/11/26
13:58 UTC

3

Is git installation broken on 7.6?

Hi all,

I just installed openbsd on arm64 and trying to install git with pkg_add.

It tries to download version 2.46.1 and fails to decompress it saying “Premature end of archive”.

I had a look in a browser at openbsd mirrors for 7.6 and they have git 2.47.0 instead.

If I try “pkg_add git-2.47.0” it fails with “Can’t find git-2.47.0”.

I don’t particularly care whether I get the old or the new version. I just want to install git.

Any hints?

EDIT: it was probably my internet connection. I managed to get 2.46.1 installed after a few more tries.

4 Comments
2024/11/26
01:57 UTC

4

Why is X11 required for building ports?

Hi all, I have installed openbsd without X and was casually trying to build a port, specifically git, which is a command line tool.

I got an error saying that, in order to build ports, X11 is required.

Does anyone know what is the rationale behind it? I thought that base, comp and man would be enough to build git…

10 Comments
2024/11/25
23:23 UTC

3

Scala package is installable but doesn't work

When I try to compile a .scala file I get the following error:

bloop.rifle.FailedToStartServerExitCodeException: Server failed with exit code 1

Running scala --power bloop output gives the following output:

Error occurred during initialization of VM
Option -XX:+UseZGC not supported

Is this problem fixable or is the scala package currently unusable on OpenBSD?

13 Comments
2024/11/25
12:50 UTC

89

Why (a contributor) stopped using OpenBSD

They say you shouldn't stop a traveler. However, u/the_solene's announcement deserves some acknowledgement: she will be moving on to other projects, as noted on https://dataswamp.org/~solene/2024-11-15-why-i-stopped-using-openbsd.html.

Without going into detail, I am saddened by the decision. But thank you, Solène, for your valuable and helpful contributions.

Hope to see you back soon. 🙂

89 Comments
2024/11/24
12:21 UTC

5

8tb softraid volume 1C

Hello all. Trying to set up two 8tb disks in softraid 1C. I used fdisk to initialize both disks with gpt tables. I then used disklabel to add a RAID partition to each (and extend the boundaries to the whole disk). The partitions are full-size, but when I use bioctl to create the softraid volume the resulting disk only shows 2tb of total disk space available. Any thoughts or insights are greatly appreciated.

fdisk output:

Disk: sd1       Usable LBA: 34 to 15628053134 [15628053168 Sectors]
   #: type                                 [       start:         size ]
------------------------------------------------------------------------
   0: OpenBSD                              [          64:  15628053071 ]
Disk: sd2       Usable LBA: 34 to 15628053134 [15628053168 Sectors]
   #: type                                 [       start:         size ]
------------------------------------------------------------------------
   0: OpenBSD                              [          64:  15628053071 ]

truncated disklabel output:

# /dev/rsd1c:
...
total sectors: 15628053168
boundstart: 64
boundend: 15628053135

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  c:      15628053168                0  unused                    
  e:      15628053071               64    RAID

# /dev/rsd2c:
...
total sectors: 15628053168
boundstart: 64
boundend: 15628053135

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  c:      15628053168                0  unused                    
  e:      15628053071               64    RAID

truncated disklabel output of resulting drive:

# /dev/rsd5c:
type: SCSI
disk: SCSI disk
label: SR RAID 1C
...
total sectors: 4294961093
boundstart: 64
boundend: 4294961093

16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  c:       4294961093                0  unused

bioctl output:

Volume      Status               Size Device  
softraid0 1 Online               2.0T sd5     RAID1C 
          0 Online               2.0T 1:0.0   noencl <sd1e>
          1 Online               2.0T 1:1.0   noencl <sd2e>

EDIT: I was able to fix this problem. I re-initialized a new gpt table on each disk and zero'd out the first 1024 bytes of each desk BEFORE creating the RAID partitions. I then did it again on each partition to be safe. After this I was able to create the new raid volume at raid level 1C using the full disk. Thank you all for the help. Cheers.

10 Comments
2024/11/24
00:12 UTC

6

pkg_add can't install because of libraries

I have a vanilla install of 7.6 and today, I did a pkg_add - u and it failed to update git. Hmmm. Can't install because of libraries - expat.15.0 not found. /usr/lib/libexpat.so.14.1 (system) bad major. I try to install ffmpeg and it complains about libXcursor.5.1 but found but the system one is 5.0. It also complains about Python 3.11, so I try to install that and I'm back at the can't install because of the expat error above

I did a pkg_check and all is good. Google wasn't much help. Did I do something stupid (probably), and how do I fix it. I know my network is because ffmpeg did install a bunch of dependencies before failure

Edit: Looks like I inadvertently upgraded to 7.6-current, which may explain the missing package dependencies

Edit 2: SOLVED

sysupgrade -s
pkg_add -u

... and I'm back to a non-broken fully working system

7 Comments
2024/11/23
20:03 UTC

3

Question: How can I block a top-level domain in OpenSMTPD

Hi,

I'm getting spammed by the .best top-level domain. I can't find anything about blocking a TLD anywhere.

If anyone knows how to block TLDs, please tell me

Thanks

4 Comments
2024/11/22
16:43 UTC

2

Raspberry pi cm4 and dwc2 driver

Hi all,

I have been running openbsd on the raspberry pi cm4 for a while.

Now I have developed my own carrier board and I have an issue.

The cm4 does not have a usb3 controller connected via pci like the raspberry pi4 and instead uses dwc2 unless the carrier board has a different controller.

My board has a connection to the dwc2 with a single usb port but no hub to keep costs down.

It works fine with Linux and the dwc2 driver for it.

My issue can be summarised as follows:

  1. if I boot openbsd with a usb keyboard connected, it is not recognised unless I detach it after boot and reattach it.

  2. if after having the usb keyboard recognised I detach it, the system freezes and I have to restart it.

  3. If I connect a usb hub to my usb port and then connect the keyboard to the hub everything is fine unless I detach the hub, and doing that again freezes the system.

It seems to me that the openbsd dwc2 driver always assumes that there is a hub connected to the raspberry pi usb port, which is definitely the most common case.

I understand this is quite a specific and uncommon problem.

Did anyone get into the same kind of issue?

Or is there a way to directly ask the developers of the driver?

5 Comments
2024/11/21
23:27 UTC

0

Question: Should I try to make OpenBSD as a network switch?

I just ordered a 8505 ITX board, and planning on making it into a Firewall/Router (likely OpenBSD maybe play around in OpnSense for fun), the next step is a switch given the Firewall/Router dont have enough ports.

Now my question is being there is no "hardware" switch box that I can get to add OpenBSD to or is BSD based that is 2.5gig ports (Juniper is 1gig ports for the EX2300-C) should I make a OpenBSD switch or just buy any managed switch on the market regardless if it is 1gig or 2.5gigs ports?

Another 8505 (or i3 or whatever) + a NIC card as a switch(maybe + ecc or even Optane SSD)? (I think that is more software/OS based... unless there is NIC cards that gets programmed to be like a hardware if I go more $$$$ in tier )

That or just add a NIC card to the firewall router? (which I am hesitant due to the Defense in Depth concept)

2 Comments
2024/11/21
18:37 UTC

0

decrypt my disk openbsd?

00Help me decrypt my disk. I accidentally broke xorg and I need to delete the file. But I have a dark screen and I can't access my profile and consul either. boot -s - not working (black screen)

I'm boot live usb, run Shell.

bioctl c

Result: Can't locate c device via /dev/bio

disklabel -w /dev/sd0

Result: No such file or directory

cryptsetup luksDump /dev/sd0

Result: not found

dmesg | grep -i softraid

Result: softraid0 at root, scsibus2 at softraid0: 256 targets

Is there any chance that my not-so-young Hitachi disk is dead? I see it as sd0 and sd1 + rd0.

Thx!

2 Comments
2024/11/20
17:33 UTC

10

Submit packages to official openbsd pkg repo

Hello! I'm the developer of fastfetch. fastfetch has been in FreeBSD repo for a while and I'd like to submit it to OpenBSD and other *BSD repos. Any instructions?
https://www.reddit.com/r/BSD/comments/1gj9meo/request_for_trying_fastfetch_on_your_favorite_bsd/

4 Comments
2024/11/20
16:12 UTC

4

So, how do you separate/sandbox various programmes?

I currently use Qubes OS, and want to try out openbsd because it is intriguing from a security standpoint (also I can't watch youtube videos on qubes without running my cpu at fairly high voltages).

I know some packages in openbsd have pledge and unveil (and honestly these are one of the main driving factors behind my desire to try openbsd out), but I was looking for a way to restrict programmes on my terms.

How hard is it to run GUI apps as a different user? On linux (different distro from qubes) I remember getting audio to work this way was pretty difficult. Does it make much sense to run GUI stuff in chroot?

So yeah I was just wondering how you guys go about this. Also, how do get around the keylogging issue for X?

17 Comments
2024/11/19
17:25 UTC

1

urxvt and PRIMARY

I have an .Xresources file that has everything commented out as it pertains to URxvt, and have also commented out the line in there that sets the `termName' for xterm.

When I open a new urxvt window, I can echo $TERM and get: rxvt-unicode.

In that same window/session, when I highlight some text, I can copy that to selection to itself, other X applications, and other urxvt windows.

If I close the window that I copied from, then when I try to paste PRIMARY to other X applications (again, using middle mouse button), there is nothing to paste, and when I try to paste to other urxvt windows, there is nothing to paste.

When I copy something from another X application via the PRIMARY, that state sticks around no matter what I do with closing/openning urxvt.

Is PRIMARY a stack? I have also noticed that old PRIMARY will stick around after I have done this a bunch of times, and the last PRIMARY is pasted when I do the above with just urxvt being copied/pasted to/from. (When I restart X, that's the case when there is no prior PRIMARY, and the paste is empty... eg. above.)

I just feel like there is a memory leak or something along those lines. Should I mail the maintainer for matters related to packages (in this case?)

10 Comments
2024/11/19
05:37 UTC

0

sudo

I tried cd /usr/ports/security/sudo && make install but it just says make doesn't know how to make install. Im not sure whats up

14 Comments
2024/11/18
02:53 UTC

12

OpenBSD 7.6 on an i386 machine, networking sorta works but hangs on moderately sized transfers

edit: RESOLVED: ROUTER'S FAULT

So it turns out this whole time the issue has been my glitchy hotspot. I had a suspicion that maybe it was the hotspot's fault since both network cards were behaving the same (wrong) way, so I grabbed an old 32-bit Toughbook that had a Void Linux install on it, threw on NetworkManager and dnsmasq, set it up so it would share Internet via the Ethernet port, then plugged one end of an Ethernet cable into the Toughbook and the other end into the 3Com card on my OpenBSD machine. Lo and behold, ftp now works, syspatch now works, and networking at least initially seems to be acting as intended. I'm curious as to why Linux handles the hotspot more-or-less fine while OpenBSD chokes on it so bad though, so I'm still open to debugging ideas. However, my machine is now up-and-running, so I'm happy. :)

Original request for help:

Decided to try to resurrect an old Compaq machine with OpenBSD after Arch Linux 32 failed to bring it back to life. According to dmesg, the machine is a Compaq Presario 6010US, with an AMD Athlon XP 1700+ CPU and 256 MB RAM. The machine has two network cards, one an nVidia nForce LAN device (nfe0), the other a 3Com 3c905C (xl0). Both are failing to provide working networking in very similar ways. I'll focus on the 3Com card since it's the one I'd prefer to use, and the one I've diagnosed the most.

For the most part, the system functions fine - OpenBSD installed from a CD-R without problems, the X server starts if I start it from the root account, and everything I've tried seems to work except network access. With the 3Com card, network access ends up behaving like this:

  • Ping works, I can ping 8.8.8.8 and I get 0% packet loss.
  • DNS works, I can ping google.com and it resolves the correct IP and gets 0% packet loss.
  • Network traffic seems to work, I can ftp ftp://ftp.crosswire.org and log in anonymously, then browse files on the FTP server... except...
  • Any moderate or large transfers hang after about 15 KB of data is transferred. If while connected to an FTP server, I do an ls in a large directory, or attempt to get a file, data starts to transfer and then stops abruptly at almost exactly the same place each time. Specifically, if I do ftp ftp://www.crosswire.org, then cd pub/sword/packages/rawzip, then ls, the directory listing starts to be printed, and stops being printed after the line for the file "JOMortSin.zip" is displayed. The listing stops here every single time, I've done this five times with identical results each time. If I cd pub/sword/packages/rawzip and then get ISV.zip, it usually sticks and stops transferring at exactly 15004 bytes (though one time it got stuck at 10912 bytes).
  • syspatch hangs for a very long time, then exits without printing any output.
  • sysupgrade prints Fetching from https://cdn.openbsd.org/pub/OpenBSD/7.7/i386/ and then appears to hang forever.
  • pkg_add -u prints nothing and appears to hang forever.
  • Looking at cat /var/log/messages, I see many errors that look like compaq-openbsd ntpd[1234]: tls write failed: 142.250.72.68 (www.google.com): handshake failed: unexpected EOF. (1234 is a placeholder number there.)
  • ifconfig -a shows that I have both IPv4 and IPv6 addresses on the xl0 card.

I can provide further info/logs/system info/etc. if that would be helpful, this is just a hobby project with no sensitive data whatsoever on it. I'm also adept at building code so if someone has app or kernel patches to throw at me, I'm up for it. Thanks for your help!

Edit: Pastebin links for all info I've shared so far in the comments:

Small bits of info shared inline:

  • /etc/hostname.xl0:
inet autoconf
inet6 autoconf

Also, some clarifications:

  • Only one network card is ever in use (i.e. has a network cable running from it to my router) at once. I only need one to work, the only reason both are installed right now it because one of them is built into the motherboard and has similar but different issues to the 3Com one I'm working with now.
  • My router is a Mifi Pro X 5G hotspot (though it's set to only connect to the cellular network over 4G). It works fine with all my other devices, and its Ethernet port works just fine when connecting to Linux machines over Ethernet.

Things I've tried so far:

  • Changing the MTU to a lower value with ifconfig xl0 mtu 1420 and several lower values. Freezing still occurs even with the lower MTUs. The lower the MTU is, the less data manages to be transferred before the transfer stops.
31 Comments
2024/11/14
22:58 UTC

4

extremly loud fans on 2nd boot

i tried release, snapshots, 7.5, 7.6.. but every time when i install os on first boot it works GREAT, absolute joy to work on. battery behaves almost linux like but on second and all other boots one cpu core is always at 100% killing my x280 battery from like 6 hours to 45 mins. and fans, oh the fans.

I tried this as a test few times with some changes, then without changes, always the same issue. apmd on/off, obsdfreqd on/off tried smt, no smt, on battery, on charger, same thing always. actually now that i type maybe when booting on battery it was a bit quieter.

Do you have any recommendation for power management? on linux/windows in terminal/idling/simple work fans are at 0rpm, like it was on first boot of openbsd.

8 Comments
2024/11/14
17:53 UTC

Back To Top