You know how sysadmins are like, right? The coke drinking middle-fingerers going through bunch of terminal commands? Torvalds was also a middle-fingerer, fingering it at C++ instead of clients. He also used terminal commands and drunk tons of coke. So Torvalds was a sysadmin, and made Linux kernel terminal for other sysadmins. And this terminal can be accessed via WSL for windows, LDE Crostini for chromeos, and terminal for macos.
Eh?
There isnāt a trace or even tiny āblobletā of Linusās Linux kernel in any of Appleās operating systems!
They use their own XNU (like GNU, XNU stands for X is Not UNIX) , which is a heavily modified kernel based on the āMachā kernel⦠Apple have open sourced XNU for decades now. What Apple wonāt open source is the GUI part of MacOS or iOS / iPadOSā¦
On top of XNU, Apple run some BSD based layer called āDarwinā.
So can I run XNU in place of Linux kernel?
I imagine one might need some sort of compatability package?
Yes you can - you can get Darwin - which is Appleās take on BSD on the XNU kernel, for x86 and suchlike, but thatās all you get, you donāt get any of Appleās GUI doohickeys for Mac, iPhone, iPad, iWatch or Apple TVā¦
Why you would want to, is beyond me and probably a subject for someone other than meā¦
Kernel[edit]
Main article: XNU
The kernel of Darwin is XNU, a hybrid kernel which uses OSFMK 7.3[11] (Open Software Foundation Mach Kernel) from the OSF, various elements of FreeBSD (including the process model, network stack, and virtual file system),[12] and an object-oriented device driver API called I/O Kit.[13] The hybrid kernel design provides the flexibility of a microkernel[14][failed verification ā see discussion] and the performance of a monolithic kernel.[15]
Hardware and software support[edit]
Darwin currently includes support for the 64-bit x86-64 variant of the Intel x86 processors used in Intel-based Macs and the 64-bit ARM processors used in the iPhone 5S and later, the 6th generation iPod Touch, the 5th generation iPad and later, the iPad Air family, the iPad Mini 2 and later, the iPad Pro family, the fourth generation and later Apple TVs, the HomePod family, and Macs with Apple silicon such as the 2020 Apple M1 Macs, as well as the Raspberry Pi 3B.[16][17] An open-source port of the XNU kernel exists that supports Darwin on Intel and AMD x86 platforms not officially supported by Apple, though it does not appear to have been updated since 2009.[18] An open-source port of the XNU kernel also exists for ARM platforms.[19] Older versions supported some or all of 32-bit PowerPC, 64-bit PowerPC, 32-bit x86, and 32-bit ARM.
It supports the POSIX API by way of its BSD lineage (largely FreeBSD userland) and a large number of programs written for various other UNIX-like systems can be compiled on Darwin with no changes to the source code.
Darwin does not include many of the defining elements of macOS, such as the Carbon and Cocoa APIs or the Quartz Compositor and Aqua user interface, and thus cannot run Mac applications. It does, however, support a number of lesser-known features of macOS, such as mDNSResponder, which is the multicast DNS responder and a core component of the Bonjour networking technology, and launchd, an advanced service management framework.
Note - many years ago, Apple āsupportedā Linux on some of their PowerPC Macintoshes, MkLinux⦠I had one (still got it somewhere) - PowerMac 601 AV, 66 Mhz PowerPC cpu (same as in IBMās pSeries for running AIX on - and I think the later AS400ās too)⦠Those were considered āold worldā PowerPC macs, i.e. they had proprietary āNuBusā instead of PCI - and MkLinux was the only Linux available for these āOld Worldā PowerPC Macs⦠I donāt know why they bothered really, it was still an Apple MICROKERNEL (hence āmkā), running GNU binaries (but taken from the Linux world, not the BSD world), so it wasnāt really Linux, it was just GNU on an Apple developed micro kernel⦠Linux IS the kernelā¦
Hey, that is interesting. Thanks Daniel for the detail .
I agree, cant find a reason to use it. Maybe if one wanted to do something with a hybrid kernelā¦
Darwin is just another BSD⦠one might as well use a ārealā BSD .
The only thing that would interest me with Darwin would be it might offer a BSD without ZFS. . I might buy that, but it would probably tie me to some weird Apple filesystem, and I would not buy that either.
The biggest turnoff in the BSD world, for home PC users is ZFS. It is just a monstrous overkill for no gain with desktops.
Apple have had a few friendly flirts with Unix and close relatives. It is a real plus for open software.
Conversely - I passionately LOVE ZFS functionality on FreeBSD (Iām also a HUGE fan of it on Solaris, and I used to manage a pair of corporate NAS devices that were Oracle ZFS Appliances [ZFS Filer] - rock solid, and surprisingly good performance on mechanical SATA drives!)⦠I think itās (BSD) still some years ahead of Linux in that department⦠I love ZFS so much, itās my favourite filesystem⦠but I wasnāt happy with performance on Linux (using ZFS encryption). But - Iām being unfair, I should give ZFS unencrypted, a decent test on Linux, but it was slower (considerably) than ext4 on LVM on LUKS (2.x) on Linux.
I run FreeNAS as my home NAS solution, on a 10+ year old HP NL40 micro-server - using ZFS.
Started out with ZFS on this machine, using FreeNAS 9 in late 2011, with 8 GB RAM (non ECC) and 4 x 1TB drives in RAIDZ1+ (= RAID 5), giving me about 3 TB store, and booting off a USB thumb drive (motherboard conveniently has a USB connector for a thumb drive! These things have a built in SAS controller, that multiplexes up to 4 SATA drives in a ācageā.
Iāve slowly incrementally upgraded it - itās now got 16 GB of ECC RAM, boots off 256 GB internal SATA SSD, 4 x 4 TB HDDās, giving me ~11 TB (in theory it should be 12, but thereās overhead) ⦠Plan is to incrementally double that - with 4 x 8 TB, Iām in no hurry (still got 2 TB free), so I might wait till 10 or 12 or even 16 TB become options (Iāll probably buy a spare power supply for it too) - unless - one of those drives fails before, then Iāll probably go for 8 TBā¦
i.e. because its RAIDZ+1 - I can set a drive to āfailedā in FreeNAS, power it off (HP NL40 doesāt support hotswap) pull the drive out, and insert a new one, and mark it replaced, and it will resilver all my data overnight (ECC RAM makes a huge difference!). Thatās how I upgrade my storage, over a series of days, I manually āfailā each drive, replace it with a new one with more storage, and let it re-silver⦠My current iteration, was updated from 4 x 3 TB drivers (shitty Seagate drives - 2 of whiched failed) to 4 x 4 TB using this methodā¦
ZFS is one of my favourite things that Sun Microsystems did (and open sourced) before Oracle bought them - I suspect Larry Ellison only bought Sun so he could sue Google over Java patentsā¦
So much goodness Sun gave us⦠ZFS⦠NFS (note ZFS even has BUILT in support for sharing data via NFS and SMB). Even NIS and NIS+ were okay (better than Microsoft Windows domains!)ā¦
I dont dislike ZFS. It is for servers and NAS systems and the like.
No use for it in a single desktop.
I just wish the BSDās were not so singleminded about it
It is stopping me going back to BSD⦠Void is a close as I can get and still have ext4.
Yes Sun did a lot of good things. NFS is a real survivor⦠that means nothing better ever came along. They made rather good hardware too.
The workstation concept seems to have died.
Isnāt UFS still available as a file system on FreeBSD?
I should give it a whirl again, one of these daysā¦
Iām sure theyāre not forcing users to go ZFS - are they? According to this the default is still UFS :
I should fire it up on my Thinkpad W500, itās a beast of a system, seems great at the time (also about 10 years ago) dual core, I had 8 GB of RAM and a 64 GB SSD in it, and it came with āswitchableā graphics, onboard Radeon PCIe, or Intel APU - never got GPU selection to work in any NIX, so most of the time I nust
Yes, that is what I used. Had Freebsd on an ancient 486 for about 20 years. It was very stable, but would only run a primitive window system. UFS was fine
My issue today is, having converted to Linux, everything is ext4. So I cant easily share data files with a BSD OS running alongside Linux.
That is a big disincentive from using bsd to do any serious work.
I guess you have to cope with incompatable filesystems all the time. I choose to avoid it. Dont want NTFS either.
Itās possible, but itās definitely not straight forward. As already mentioned, ZFS also exists for Linux.
However, itās probably not seamless to let the two work together, thatās true.
That FreeBSD link I sent :
21.2. LinuxĀ® File Systems
FreeBSD provides built-in support for several LinuxĀ® file systems. This section demonstrates how to load support for and how to mount the supported LinuxĀ® file systems.
21.2.1. ext2 / ext3 / ext4
Kernel support for ext2 file systems has been available since FreeBSD 2.2. The ext2fs(5) driver allows the FreeBSD kernel to both read and write to ext2, ext3, and ext4 file systems.
Journalling and encryption are not supported yet.
To access an ext file system, mount the ext volume by specifying its FreeBSD partition name and an existing mount point. This example mounts /dev/ad1s1 on /mnt:
# mount -t ext2fs /dev/ad1s1 /mnt
Says ext4 is supportedā¦
Yep⦠Bane of my life⦠APFS on Apple (and HFS+), ext4 and/or XFS (thatās one that Silicon Graphics open sourced from IRIX, along with OpenGL [???]), and sometimes ZFS (all the time on my NAS)⦠I donāt bother with NTFS, donāt have ANY Windows in my house whatsoever, only use Fat32 for /boot/efi, or ā/bootā on single board computersā¦
Went through some pain recently - tried exfat on some big (6 TB) external drives⦠I CANNOT believe that something as BASIC as symlinks (soft) is STILL not supported on EXFAT!
If a filesystem wonāt support symbolic links (soft) I WILL not countenance its use!
Thanks Daniel,
ext3 and ext4 without journalling sounds limited⦠probably means you can read them but cant write on them⦠I will check
What filesystems can you have on the FreeBSD root partition? That might be more restricted. Not as big a problem to me as the data partitions.
Thanks Akito,
Yes there might be a big gap between āpossibleā and full support
Filesystem is one thing you need to work perfectly. Same category as backups.
I found this
GNU/Linux can be installed on any filesystem that supports some special constructs (file permissions, symbolic links and device files).
but I can not find an equivalent statement for BSD
I think BSD might be more restrictive⦠UFS , U2FS, and zilch