Live data from Hacker News

OpenBSD Minimalist Desktop

nechtan.io

11–20 of 114 posts

Re: OpenBSD Minimalist Desktop

#11

Who still partitions like that???

> Who still partitions like that???

Anyone using ZFS should!

Since ZFS partitions are all taking from the available space of the pool, you can have as many partitions as you need, which is very practical for snapshots and diffs, or if you want to use the same pool for different hosts (=> use a different etc along with a few others like var/lib )

Look at the set of partitions I recommend on https://github.com/csdvrx/zfs-autosnapshot (this is for the host 7275 on the pool nvme)

zfs create -o mountpoint=/ nvme/7275

zfs create -o mountpoint=/etc nvme/7275/etc

zfs create -o mountpoint=/opt nvme/7275/opt

zfs create -o mountpoint=/usr nvme/7275/usr

# for optimization

zfs create -o mountpoint=/img recordsize=1M primarycache=metadata secondarycache=none nvme/7275/img

zfs create -o mountpoint=/img/qcow2 recordsize=64k nvme/7275/images/qcow2

# for safety

zfs create -o mountpoint=/var nvme/7275/var

zfs create -o mountpoint=/var/tmp nvme/7275/var/tmp

zfs create -o mountpoint=/tmp nvme/7275/tmp

zfs set exec=off nvme/7275/var

zfs set setuid=on nvme/7275/var/tmp

zfs set setuid=off devices=off sync=disabled nvme/7275/tmp

# for systemd-journald

zfs create -o mountpoint=/var/log nvme/7275/var/log

zfs set acltype=posixacl nvme/7275/var/log

# for postgresql optimization

zfs create -o mountpoint=/var/lib nvme/7275/var/lib

zfs create -o mountpoint=/var/lib/postgresql nvme/7275/var/lib/postgresql

zfs set recordsize=8K primarycache=metadata logbias=throughput nvme/7275/var/lib/postgresql

Re: OpenBSD Minimalist Desktop

#13

Who still partitions like that???

That was my first thought too. Why so many partitions?

OpenBSD has certain flags it sets on various partitions to enable/disable performance and security features. Sort of like setting `noexec` on /tmp, using XFS instead of BTRFS on your database volume, etc. Like most OpenBSD things, it stays way on the "correctness/security" side of the "security--convenience" scale

Re: OpenBSD Minimalist Desktop

#14
post #8

Who still partitions like that???

I see /usr/X11R6 and it brings back memories of when Linux distros separated X in such a manner. Then I realized that r6 is kinda old.

OpenBSD does not run the X server as root, so it does have a security benefit over more modern systems.

  USER       PID %CPU %MEM   VSZ   RSS TT  STAT   STARTED       TIME COMMAND
  _x11     71289  0.0  0.6 11164 24992 ??  S       9:06AM    0:00.41 /usr/X11R6/bin/X :0 vt05 ...
  root      2878  0.0  0.0  2696  1412 ??  IpU     9:06AM    0:00.04 X: [priv] (Xorg)
I understand that their malloc conversion from sbrk to mmap flushed out some long-standing X bugs as well.

http://www.undeadly.org/cgi?action=article&sid=2005082419031...

Re: OpenBSD Minimalist Desktop

#16
post #8

Who still partitions like that???

I see /usr/X11R6 and it brings back memories of when Linux distros separated X in such a manner. Then I realized that r6 is kinda old.

OpenBSD's X distribution (xenocara) is based on X11R7.7 + updated components, it's just a historical naming convention. Other systems have merged X into /usr or /usr/local, OpenBSD kept the install prefix.

https://man.openbsd.org/hier

Re: OpenBSD Minimalist Desktop

#17
post #11

Who still partitions like that???

> Who still partitions like that??? Anyone using ZFS should! Since ZFS partitions are all taking from the available space of the pool, you can have as many partitions as you need, which is very practical for snapshots and diffs, or if you want to use the same pool for different hosts (=> use a different etc along with a few others like var/lib ) Look at the set of partitions I recommend on https://github.com/csdvrx/z…

I did an Ubuntu ZFS install for the first time recently, and I can confirm that a similar list of datasets arrive automatically.

It also taints the kernel, which is interesting.

Re: OpenBSD Minimalist Desktop

#19
post #4

Can openbsd compile with a minimal C89 (maybe a bit of c99) compiler, or does it require gcc or clang?

If this hasn't changed recently, the two official compilers for OpenBSD are clang and gcc 4.2, the latter for some more obscure architectures unsupported by clang. The specific version is used because gcc changed its license after that, and I think this was before the C99 support of gcc was basically finished (4.5?).

So technically speaking, it would sound possible, if such a large code base doesn't trigger various compiler bugs and undefined standard issues, never mind some low level gcc extensions (asm etc.) probably being used.

Haven't heard of someone doing that, though.

Re: OpenBSD Minimalist Desktop

#20
post #15
post #8

Earlier quoted context omitted.

I see /usr/X11R6 and it brings back memories of when Linux distros separated X in such a manner. Then I realized that r6 is kinda old.

Do you remember what distro used to do this?

All of them that I can remember. Note that this is from the '90s. At some point they all merged the X stuff into /usr. Maybe it was with the x.org switch, as XFree86 does indeed mention /usr/X11R6 in the docs.

https://xfree86.org/4.8.0/Install4.html#6

Post reply on HN