top | item 26209345

OpenBSD boots multi-user on Apple M1 hardware

307 points| zdw | 5 years ago |marc.info | reply

200 comments

order
[+] rgovostes|5 years ago|reply
Running an alternative OS "natively" on a Mac doesn't seem very appealing to me. It's almost guaranteed you will never fully get Wi-Fi, audio, graphics acceleration, the trackpad, etc. working flawlessly, especially on the M1 where almost every component is Apple proprietary and it's not a matter of loading, say, some common Intel graphics driver.

On the other hand, virtualization _already_ lets you run whatever arm64 BSD, Linux, or Windows that you want. The trackpad and everything else will work flawlessly thanks to guest additions. Yes, you make some tradeoffs -- you sacrifice a core, a few GB of RAM, some disk space for an OS you don't _really_ want to be running. But I'm skeptical that these are not better tradeoffs than constantly using a hacked-together and half-broken OS.

To me the ideal solution is not that Corellium or Marcan or whoever reverse engineers the drivers to a sufficient degree. I'd rather see Apple (or the Hackintosh types) release a tiny variant of macOS that contains hardware drivers and Hypervisor.framework and not much else. It could be the next generation of Boot Camp and it would probably take less engineering effort for them to maintain while satisfying the small segment of customers interested in running other operating systems.

[+] kitsunesoba|5 years ago|reply
> On the other hand, virtualization _already_ lets you run whatever arm64 BSD, Linux, or Windows that you want. The trackpad and everything else will work flawlessly thanks to guest additions. Yes, you make some tradeoffs -- you sacrifice a core, a few GB of RAM, some disk space for an OS you don't _really_ want to be running. But I'm skeptical that these are not better tradeoffs than constantly using a hacked-together and half-broken OS.

True in theory, but at least with Linux I've found that desktop environments exhibit a slight but maddening level of sluggishness in VMs, no matter if it's GNOME, KDE, XFCE, or MATE. If all you need is a commandline Linux VMs are great but I'd go insane trying to use one as a graphical desktop for an extended period.

[+] ogre_codes|5 years ago|reply
> Running an alternative OS "natively" on a Mac doesn't seem very appealing to me. It's almost guaranteed you will never fully get Wi-Fi, audio, graphics acceleration, the trackpad, etc. working flawlessly, especially on the M1 where almost every component is Apple proprietary and it's not a matter of loading, say, the right Intel graphics driver.

It's not appealing to me now. In 9 or 10 years when Apple has stopped shipping new versions of MacOS for the platform, it will be much more interesting for me. Of course by then it's just a curiosity or fun project, not something I need for day to day. And by then, much of the wifi/ graphics/ audio issues will be solved.

[+] 1vuio0pswjnm7|5 years ago|reply
Nah, I want to choose the kernel.

This statement is a bit presumptuous: "It's almost guaranteed you will never fully get Wi-Fi, audio, graphics acceleration, the trackpad, etc. working flawlessly."

Maybe I do not want all those things every time I boot. Apple used an "alternative OS" for their Airport routers: NetBSD. Kernel was around 6.x if I recall correctly. Seemed like Wi-Fi worked preety good, maybe even "flawlessly".

It's a computer. As the purchaser, I should get to decide how it is used. Using Apple software should be optional.

[+] mvanbaak|5 years ago|reply
Being able to run OpenBSD or FreeBSD on a M1 mini would be AWESOME. That little machine is pretty powerful and does not need much power to do what it does.

If you are talking purely about desktop, I have to agree with you that the only real option is MacOS because of all the apple-only stuff (at least for now until drivers show up)

But there's more uses of hardware then desktops.

[+] giomasce|5 years ago|reply
Most laptops are more or less in the same situation as M1. Maybe they different quantitatively, but not qualitatively: devices do not have (sufficient) specs available and people need to reverse engineer them if you want to run any free OS on them. Yet people want to do that and often manage. Why is M1 different?

What I really would like to see is hardware manufacturers (Apple and anybody else) releasing the specs, so that people are free to do whatever they want with the metal they buy. I might event consider appropriate a legislative intervention in this field.

[+] rualca|5 years ago|reply
>>Running an alternative OS "natively" on a Mac doesn't seem very appealing to me. It's almost guaranteed you will never fully get (...) working flawlessly

This statement is rather miopic. I still recall when this very same argument was made regarding the idea of wanting to install Linux in computers which were bundled with Windows. I can tell you it made absolutely no difference to me a couple of decades ago when I installed Mandrake Linux on a Windows laptop, and it made no difference to me that I couldn't get hardware acceleration or the webcam to work, and that wifi only worked with ndiswrapper. I was able to run the software I wanted to use in the hardware I bought, and that's what matters.

M1 Mac minis are on the market for around 800$, which is an affordable price point, and their form factor and looks make them an interesting choice for a home server or workstation. It would be incomprehensible if we couldn't take advantage of that hardware by running our choice of software.

[+] sedatk|5 years ago|reply
> you will never fully get Wi-Fi, audio, graphics acceleration, the trackpad, etc

I agree with your sentiment, but that isn't as serious as you say on, say, M1 Minis used as servers and that's probably where OpenBSD would shine.

[+] Wowfunhappy|5 years ago|reply
I absolutely expect Asahi to get all of those things working in due course. Lots of smart people are working on it.
[+] amatecha|5 years ago|reply
literally just installed OpenBSD on my iMac G4 last week, haha (oh yeah, everything works flawlessly btw, including graphics acceleration)
[+] beermonster|5 years ago|reply
I run Linux natively on a MacBook just fine. In fact I had to, when High Sierra went out of support not that long after I’d upgraded my RAM and HDD to SDD. It now flies and honestly I don’t know why I waited until High Sierra went end of life as I feel Mac OS X has got worse and worse. Also the hardware has got less and less upgradable/fixable in that time too.
[+] austinshea|5 years ago|reply
But, presumably, you can understand why it is very appealing to others.

These devices are mass produced, and have long lifespans.

It's a good target for development.

[+] atoponce|5 years ago|reply
> On the other hand, virtualization _already_ lets you run whatever arm64 BSD, Linux, or Windows that you want. The trackpad and everything else will work flawlessly thanks to guest additions.

The OpenBSD kernel doesn't support loadable kernel modules, so virtual machine guest additions are not an option for a virtualized OpenBSD.

[+] coldtea|5 years ago|reply
>It's almost guaranteed you will never fully get Wi-Fi, audio, graphics acceleration, the trackpad, etc. working flawlessly

And yet people have done it with Linux just fine... Linus himself run a G5 as his desktop (circa 2003-2005) and later a Macbook Air as his daily driver laptop (circa 2011-2013...)

[+] IgorPartola|5 years ago|reply
I think there is another way to look at it. If not for Apple’s hardware policies, you would just be able to run your favorite OS on their hardware. It’s the fact that they publish EULAs and NDAs so long that it probably wouldn’t have fit I to the RAM of their first computers which actively slow down or prohibit any work by developers. Why isn’t it Apple whom we should find unappealing?
[+] messe|5 years ago|reply
Fantastic. OpenBSD on an M1 Mac Mini would be a great home server.

As for desktop, I love cwm on my thinkpads, but macbook touchpads have won me over. That said, if arcan gets to a usable state on OpenBSD, I wouldn't mind sinking a few weekends (and/or crates of beer) into helping with improving touchpad/gesture support. X11 is just too daunting to have me bothered.

[+] etaioinshrdlu|5 years ago|reply
I don't mean to be dismissive, but isn't almost anything a decent home server nowadays? As long as your'e OK with the performance, size, cost, storage, there are just myriad options available. Just about any PC or mac would do. Finally, we all have our own preferences, but I'm not sure why one would really want to use OpenBSD for a home server. There's less driver support or application support than just about any other choice. It sounds like an ideal choice if you like to spend countless hours fiddling with things.

I'm really curious what you see to like in this setup.

[+] kitsunesoba|5 years ago|reply
> OpenBSD on an M1 Mac Mini would be a great home server.

That does sound really nice. Once the price on SSDs comes down a bit I'd love to replace my Dell PowerEdge T20 Plex/Time Machine box with a Mac mini with stackable TB4 enclosure containing a few M.2 SSDs. It'd take a fraction of the space and power while being much more responsive.

[+] alsetmusic|5 years ago|reply
So much for the many remarks made on HN claiming that Apple would use the M1 to further exert control over users’ ability to boot an alternative OS. Between this and Asahi Linux, I’d say things are off to a good start.

Btw, Asahi has a Patreon page for anyone who wants to contribute. I’m tossing twelve bucks a month and recommend any Mac users with interest in booting alternative OSes support such projects.

Now I’m gonna see if there’s an option to throw money at this.

[+] linuxhansl|5 years ago|reply
I'm not sure I understand what Apple contributed here. It's not supported, helped, or encouraged by Apple. And Apple does not document their H/W in ways that allow reuse. Hence these are all reverse engineering projects.

Apple _is_ a walled garden ecosystem. That has many obvious advantages, things just work, etc.

Personally I happen to not like it, but it's a choice folks have to make by themselves.

I buy my H/W from vendors that actually support running Linux (in my case) like Dell, Lenovo, and others.

[+] mhh__|5 years ago|reply
> Now I’m gonna see if there’s an option to throw money at this.

Even if I were God I wouldn't stop anyone doing it, but does it not leave a bad taste in your mouth that Apple charge the best part of 2 thousand dollars for a laptop with a basically brand-new (so not rotted) stack but utterly refuse to document anything beyond the absolute basics - this is the world's largest tech company, from which I conclude that they have no interest in allowing users to control their own hardware since it's literally chump change for them to (say) publish some extremely basic info about the peripherals like even nvidia do now.

[+] bubblethink|5 years ago|reply
Wait till you get to wifi, power management, suspend resume, etc. The fact that linux (I know this post is about OpenBSD) boots on some random piece of hardware is commendable, but not that surprising in 2021.
[+] mjg59|5 years ago|reply
At the point the hardware shipped, it was impossible to boot non-Apple operating systems on M1 systems. Post-release updates added this, but Apple had not publicly committed to doing so before that.
[+] asveikau|5 years ago|reply
To be fair that wasn't the only type of knee jerk negative reaction here on this topic. IIRC there was another, more Apple-fan style commentary of "a free OS will never run on this bespoke Apple product, and shouldn't".

I for one am glad people are making progress.

[+] unglaublich|5 years ago|reply
This achievement, solely made possible by the OpenBSD team, does not contradict that statement about Apple, in any way.
[+] TheRealSteel|5 years ago|reply
That wasn't an assumption or knee-jerk reaction. Apple went on record as saying other operating systems wouldn't boot on Apple Silicon. Admittedly there's enough vagueness that they didn't 100% rule it out completely, but I think it was a fair interpretation of what they said at the time.

Craig Federighi said this when talking to John Gruber:

"We're not direct booting an alternate operating system, it's... purely virtualization is the route. But these hypervisors can be very efficient, so the need to direct boot shouldn't be the concern."

https://www.reddit.com/r/linux/comments/hfkdlg/craig_federig...

[+] bch|5 years ago|reply
This is what I love about OpenBSD (as an observer, and being adjacent via NetBSD) - in surprising ways, when they want something, they leap on it. Forefront of wireless chips, accelerated gfx (perplexing to me, but happily so), and now this? Keep it up, OpenBSD. This is impressive.
[+] dooglius|5 years ago|reply
Is there something about multi-user that makes it harder than single-user? If it boots, it's all software at that point, no?
[+] tedunangst|5 years ago|reply
Implies a level of stability greater than getting to the "press enter for sh" prompt. Virtual memory is working, filesytems are working, etc.
[+] monadic5|5 years ago|reply
In the sense that single user mode is used as a failure mode for the boot process, it indicates that the system was successfully able to bootstrap from the EFI to its own (critical) drivers successfully.
[+] AdamJacobMuller|5 years ago|reply
lots more context switching which is a big thing on a new architecture.

It goes from "it boots as a toy" to "actually useful"

[+] 1vuio0pswjnm7|5 years ago|reply
Looks like he is booting from USB stick.
[+] Maursault|5 years ago|reply
Responding to children, not the parent... and yet I have replied to the parent.

This is interesting because (last I heard) Apple doesn't let M1 Macs boot macOS off an external drive.

[+] sigjuice|5 years ago|reply
Need to start somewhere.