OpenBSD on a Laptop

by perlgodon 11/3/18, 2:32 PMwith 116 comments
by gigatexalon 11/3/18, 4:03 PM

This is probably the single coolest feature of OpenBSD: “Also, Chromium on OpenBSD recently got unveil support. If you run it with --enable-unveil, Chromium will be prevented (at the OS level) from accessing anything other than your ~/Downloads folder.”

by floatbothon 11/3/18, 3:11 PM

> many features that require toil to achieve on FreeBSD, such as suspend on lid close, working volume buttons, and decent battery life, work out of the box on OpenBSD

Suspend on lid close worked out of the box for me on FreeBSD, on a ThinkPad X240. (Well, almost out of the box — had to disable the TPM in the firmware setup, otherwise the TPM would prevent it from waking up.)

There's NO WAY battery life could be better on OpenBSD though. OpenBSD is not even tickless!!

I measured the power consumption of the SoC with Intel's pcm tools, it's ~1W when idling in GUI on FreeBSD. Does OpenBSD even have pcm.x? ;)

by straguluson 11/3/18, 6:09 PM

I like how most of the configuration in this setup is very similar to how I configured systems as far back as mid-nineties. Most applications have a simple single config file, and a single responsibility, true to Unix' philosophy. My window manager needs haven't really changed during all this time. Add a nice launcher that indexes your system and you have most of everything you will need.

by beefhashon 11/3/18, 3:23 PM

> Full Disk Encryption with SoftRAID

It's worth noting that SoftRAID for encryption is mutually exclusive with SoftRAID for redundancy: "Note that "stacking" softraid modes (mirrored drives and encryption, for example) is not supported at this time."[1]

[1] https://www.openbsd.org/faq/faq14.html#softraid

by brobdingnagianson 11/3/18, 3:38 PM

On my desktop, I tried installing TrueOS and FreeBSD but kept having trouble with the install, then the applications and KDE, then the drivers, things were wonkie. Installed OpenBSD a couple of times and it all (mainly) just worked. Eventually just stayed with OpenBSD and have been very happy, especially with the excellent documentation, ease of installation and ease of use. I heard the FreeBSD devs don't use it on their personal comps as much as OpenBSD devs do, and what kind of sealed the deal for me. Thinking back, it was even easier than most Linux installs I've done.

by gbrown_on 11/3/18, 3:12 PM

This should probably also mention running syspatch.

http://man.openbsd.org/syspatch

by nimbiuson 11/3/18, 4:45 PM

Ive tried a BSD laptop before, and my concerns always boil down to the same nonsense...can anyone offer some advice?:

- how do i read ext4/fat/etc usb sticks from coworkers. - is 3d or video support good with AMD? - soundcard and full disk encryption? what about EFI boot?

by waterhouseon 11/4/18, 6:56 AM

Question. I find it exceedingly useful that Mac OS has readline keybindings enabled in most (all? I can't think of any counterexamples, including the Spotlight overlay) of its text fields: control-A is head of line, control-E is end of line, etc. I've been using control-N and control-P to move between lines while editing this comment; it's simply a text field in Firefox.

Is it possible to turn on this functionality in OpenBSD?

by florenon 11/3/18, 4:01 PM

Why configure cwm to emulate i3 when you could just run i3?

Still, cool to see people running a BSD on a laptop, IIRC I ran NetBSD on my old Thinkpad in college.

by robotmayon 11/3/18, 7:20 PM

I was just thinking of swapping my largely-unused ThinkPad over to OpenBSD yesterday, so this is extremely timely and useful :D

by gigatexalon 11/3/18, 3:50 PM

Great article. Been thinking of doing the same. Typo in the first paragraph under “Installation”:

“Grab a USB stick and download the the the amd64 disk image:”

by Philipp__on 11/3/18, 4:14 PM

How’s the battery life? OpenBSD is nice and nifty little UNIX experience, definitely geared towards users who know what they are doing/wanting.

by oneplaneon 11/3/18, 4:12 PM

While this is a nice setup in case of a ThinkPad, this doesn't really work out on practically anything else. I get that a lot of the FOSS, or somewhat more specifically, the hardcore users use a ThinkPad, but the rest of the world pretty much doesn't (at least no longer since Lenovo bought IBM's spun-off computer bits). None of this stuff works on the generic MS Surface or Apple Mac stuff you see in 99% of the use cases where people are capable of installing an OS at all.

As nice as mobile support in OpenBSD is, and as nice as this guide is, it's still super niche :(

by reason-mron 11/3/18, 4:20 PM

Writer spent ages on the window manager. XFCE is much easier : https://sohcahtoa.org.uk/openbsd.html

by j7akeon 11/3/18, 9:59 PM

I am interested in moving from OSX to Linux.

However, my muscle memory have made it difficult to use ctrl + key versus command + key.

Is there an easy way (for example in Ubuntu?) to remap shortcuts so the copy and paste is command + C and command + V? Also, the ctrl + C should still stop processes in the terminal, so it's not as simple as swapping ctrl and command for all processes... This problem has been bugging me a lot with linux and I finding a solid solution would help a lot of OSX people switch to linux more easily.

by DanBCon 11/3/18, 8:57 PM

This looks like a useful guide.

> If you're even a little paranoid, you should start by overwriting the disk with random data. We'll assume your hard disk is sd0—you can use dmesg to check. The c suffix is OpenBSD's way of specifying the entire disk.

   dd if=/dev/urandom of=/dev/rsd0c bs=1m
Can I check: why would you do this rather than using ATA SECURE ERASE command?

Having a blob of random data on my drive would mean crossing international borders is potentially unpleasant.

by simonebrunozzion 11/3/18, 5:10 PM

Does anyone know if OpenBSD can run properly on a Macbook?

by anthkon 11/3/18, 5:44 PM

Nice, but if you like click to focus and raise VM's you can try JWM, is great and with very few deps, almost NIL.

by vtailon 11/3/18, 6:58 PM

Amazing guide! You have a typo - a second ‘chown’ in mail setup section should be ‘chmod’

by quickbenon 11/3/18, 6:41 PM

"You won't find nearly as many online resources about setting up OpenBSD, because honestly, you really don't need any. "

That was the the last thing I wanted to read when wondering if openbsd will fit on my Ryzen machine.

by ape4on 11/3/18, 4:18 PM

A small detail, why do we still have to specify the blocksize (bs=1m) to dd. Can't it have a better default than 512 bytes.