5 ms·
What does this offer that BSD-mutant MacOS native on Apple Silicon lacks?
by jjtheblunt 4y ago
What does this offer that BSD-mutant MacOS native on Apple Silicon lacks?
- heavyset_go 4y agoThe actual FreeBSD and *BSD parts of macOS are ancient.
- irusensei 4y agoIt can't be that old considering they even have pf.
- heavyset_go 4y agoI'm looking at it from the perspective of XNU. Most of FreeBSD's interesting and modern features are not in its userland, but in its kernel and/or exposed to the userland from there. The BSD parts of XNU are literally decades old, and were lifted before jails were a thing.
- musicale 4y agojail(2) and jail_attach(2) pls. Also looks like macOS still supports union mounts and chroot.
- bydo 4y agoThe stuff with licenses Apple likes is relatively up to date; it's definitely not bleeding edge, but no worse than you'd get from Debian or RHEL. The criticism macOS gets for shipping ancient software is because one of the licenses they don't like is the GPL3. So there's a GPL2 version of bash from 2007, rsync is from 2006, etc. The end user can, of course, install newer versions of these separately.
- heavyset_go 4y agoThe FreeBSD and *BSD parts of XNU are ancient, which is what I'm referring to, as is some of the userland.
- andrewf 4y agoThis could be "an exciting new hardware platform for FreeBSD people" more than "an exciting new OS for Apple hardware owners."
- mistrial9 4y agofewer strings attached?
- Sunspark 4y agoFor all the criticism MacOS gets, it can't be denied that it actually is a certified Unix.
- pjmlp 4y agoIndeed, https://www.opengroup.org/openbrand/register/index.html https://www.opengroup.org/openbrand/register/index.html
- Koshkin 4y agoBut what is the importance of this - compared, say, to a popular Linux distribution? (MacOS may be more popular on the desktop, but Linux seems to be way more important in the grand scheme of things.)
- musicale 4y agoBeing – or rather not being – Unix seems to be important enough to the GNU project that it's in their name: GNU's Not Unix
- linguae 4y agoCertain features in FreeBSD are not available in Darwin, such as ZFS and jails. Also, if you’re doing software testing, it’s nice to be able to spin up a VM of the OS that you’re testing your software on.
- musicale 4y agoI'd really like to see jails/BSD containers on macOS. Running docker containers in a Linux VM works OK, but it makes me sad because I don't actually need or want another kernel beside Xnu. For that matter, I don't even need or want docker itself, just a container feature. Though speaking of Linux, I actually wouldn't mind having BSD's Linux compatibility layer on macOS either.
- nix23 4y ago> I'd really like to see jails/BSD containers on macOS. That's not how jails work.
- simonh 4y agoThey’re just asking for an equivalent feature.
- musicale 4y agoIndeed. Also note post I was responding to. Note that macOS' Xnu kernel supports BSD system calls (e.g. chroot(2)), and macOS includes a BSD userland which I think is largely derived from FreeBSD. In principle it should be possible (though non-trivial) to add support for the relevant BSD system calls such as jail(2) and jail_attach(2), as well as the appropriate sysctls to enable BSD jails to actually run natively on macOS. (For comparison, Linux implements containers primarily via the unshare(2) and setns(2) system calls, as well as /proc and cgroups. It's more of an a la carte approach since there are a number of independent namespaces supported by unshare(2). And bind mounts, overlayfs and the older unionfs, and the venerable chroot(2). Etc.) To me it seems that supporting the BSD system calls and infrastructure would be a reasonable evolution of macOS' BSD subsystem. Moreover, as you note, macOS could add an Apple-specific native container feature or framework. Consider that macOS already has a lower-level Hypervisor framework as well as a higher-level Virtualization framework which provided an easy to use API for creating VMs. They could implement their own Container framework or perhaps adapt or extend the existing Virtualization framework.
- astrange 4y agoFreeBSD is a good server OS in various ways macOS isn’t. macOS’s networking is good at being a cell phone more than a server.
- musicale 4y agoCould you provide some details on this?
- Koshkin 4y agoIn terms of the market share, at least, according to Wikipedia [1], Less than 1% is confirmed to be UNIX or Unix-like and non-Linux. The top operating systems in order are: 0.3% BSD (97.8% of which is FreeBSD),[251] <0.1% Darwin,[252] <0.1% HP-UX,[253] <0.1% Solaris,[254] and <0.1% Minix. [1] https://en.wikipedia.org/wiki/Usage_share_of_operating_systems#Market_share_by_category https://en.wikipedia.org/wiki/Usage_share_of_operating_syste...
- musicale 4y agoThanks for quoting wikipedia on market share, but I was hoping for technical details regarding networking on macOS, preferably based on firsthand knowledge.
- e40 4y agoOne example I experienced recently: got my 10G fiber and was torrenting was few things. I was pulling down about 25MB/sec and my mac mini started acting really weird. ARD locked up and the connection dropped and various other things. Did the same thing on Linux, transmission on both but in docker on Linux, and it didn’t flinch. Everything else in the system worked fine, and I have quite a lot on that Linux system, including a plex server.
- musicale 4y agoInteresting - what do you think the root cause was?
- xoa 4y ago>What does this offer that BSD-mutant MacOS native on Apple Silicon lacks? The ability to test applications in a native FreeBSD environment? This is just running another OS within macOS same as one might run Windows or Linux images. It's useful for development all on one system, certain kinds of isolated deployments and so on. Also I use it for doing another layer of runs of certain things before pushing out to deployment, you can virtualize a router/firewall like OPNsense or VyOS for example, load your live config, and experiment before sending it out to metal. This is just someone playing around with yet another way to do it. I use VMware myself right now on an x86 Mac but there are lots of choices and it's nice to see more stuff heading over to AS as well. From your comment though it's not clear to me if you're confusing this with running an alternative OS on the metal, as the Asahi Linux folks are working on? If that's what you were thinking, then the answer would be that longer term having Linux and FreeBSD on AS hardware could help extend its life (Apple won't support them forever anymore then they do any Macs), Mac Minis at least might be useful little appliance systems (eyeballing numbers so far an M1 Mini could in principle compare favorably as a firewall say to a lot of x86 systems in the same power/heat/physical size), and of course some people simply would prefer to stick to another OS they're at home in but also like the Apple hardware. Nothing wrong with that.
- efortis 4y agoThe ability to simulate and setup infrastructures. For example, here's one[1] in VirtualBox that can't run on M1. [1] https://blog.uidrafter.com/scripted-virtualbox-vm-installation https://blog.uidrafter.com/scripted-virtualbox-vm-installati...
- GekkePrutser 4y agoDarwin lacks a great userland. It's really just the kernel. And macOS itself I don't use anymore, it's become too locked-down and too minimalistic for me. I want full control over my computer. So I'm on FreeBSD now for my main driver. However running it on an ARM Mac would be an option for me if it were well supported.
- pjmlp 4y agoAs good as it gets, https://www.opengroup.org/openbrand/register/brand3678.htm https://www.opengroup.org/openbrand/register/brand3678.htm
- GekkePrutser 4y agoYes I know macOS is POSIX certified. But the entire OS is certainly not FOSS and it limits me very much in what I can do with my computer, unless I switch off its security completely. It's an all or nothing model. POSIX compliance is not something I actually care about. Having full control of my computer is.