Why Run Linux on Apple Devices
Apple is great at a lot of things, but they are not the best at everything. Running Linux on an Apple device gives you the opportunity to get the best of both worlds. One thing in particular Apple does well is wireless sharing.[1] They are truly ahead of the game in this respect. Linux’s main selling point is its customizability which Apple simply does not allow. Essentially, Apple is very hardware oriented while Linux is very software oriented.[2] If you were to run Linux on an Apple device, you could enjoy Apple’s perks, like its wireless sharing, and enjoy Linux’s perks, like its customizability.
How to Run Linux on Apple Devices
First of all, you need to make sure you have a compatible device.[3]
List of Compatible Devices:[3]
· iPhone 5S
· iPad Air and Air 2
· iPad Mini 2 and Mini 3
· iPhone 6 / 6 Plus
· iPod Touch 6
· iPad Mini 4
After ensuring you have a compatible device, there are a few things you will need to install from GitHub.[3]
List of GitHub links:[3]
· PongoOs
After downloading the last link, you will need to change the DTBPATH to arch/arm64/boot/dts/apple/socname-devicename.dtb.[3]
Once that is done, you will need to enter this script:[3]
make -j$(nproc)
macOS: /Applications/checkra1n.app/Contents/MacOS/checkra1n -v -V -p -c -k /path/to/pongoOS/build/Pongo.bin
Linux: ./checkra1n -v -V -p -c -k /path/to/pongoOS/build/Pongo.bin
arm64:make -j$(nproc) Image.lzma dtbs
!arm64: make ARCH=arm64 CROSS_COMPILE=your-cross-compiler- -j$(nproc) Image.lzma dtbs
cd /path/to/linux-apple
/path/to/dtbpack.sh
# Load Linux to the device and boot it!
python3 /path/to/pongoOS/scripts/load_linux.py -k /path/to/linux-apple/arch/arm64/boot/Image.lzma -d /path/to/linux-apple/dtbpack [-r /path/to/some/ramdisk]
You can also just download a virtual machine and run Linux on an Apple device that way. Apple walks you through how to do that on their website.[4] The virtual machine is going to be used on Apple devices that are not mobile. This again allows you to enjoy the perks of both operating systems without having to spend money on more devices.
The Linux kernel can run on a variety of devices made by Apple, including devices where the unlocking of the bootloader is not possible with an official procedure, such as iPhones and iPads.
iPad
In June 2022, software developers Konrad Dybcio and Markuss Broks managed to run Linux kernel 5.18 on a iPad Air 2. The project made use of the Alpine Linux based Linux distribution called postmarketOS, which is primarily developed for Android devices. The developer suggested that they used the checkm8 exploit which was published back in 2019.[5][6]
iPhone
In 2008, Linux kernel 2.6 was ported to the iPhone 3G, iPhone (1st generation), and iPod Touch (1st generation) using OpeniBoot.[7]
Corellium's Project Sandcastle made it possible to run Android on an iPhone 7/7+ or an iPod Touch (7th generation) using the checkra1n exploit.[8]
iPod
iPodLinux is a Linux distribution created specifically to run on Apple's iPod.
Mac
Motorola 68k Macs
Linux can be dual-booted on Macs that use Motorola 680x0 processors[9] (only 68020 and higher,[10] and only non-"EC" processor variants since an MMU is required[11]). The Linux/mac68k community project provides resources to do so,[12][13] and an m68k community port of the Debian Linux distribution is also available.[11][13]
PowerPC Macs
PowerPC Macs can run Linux through both emulation and dual-booting ("bare metal"). The most popular PowerPC emulation tools for Mac OS/Mac OS X are Microsoft's Virtual PC, and the open-source QEMU.[13]
Linux dual-booting is achieved by partitioning the boot drive, installing the Yaboot bootloader onto the Linux partition, and selecting that Linux partition as the Startup Disk. This results in users being prompted to select whether they want to boot into Mac OS or Linux when the machine starts.[13]
By 2008, a number of major Linux distributions had official versions compatible with Mac PowerPC processors, including:[13]
- Gentoo[13]
- Debian[13] (until Debian 8[14])
- Ubuntu[13] (until Ubuntu 16.10[15][16])
- Fedora[13] (until Fedora 17 for G3 and G4 processors, and Fedora 28 for G5[17])
- Yellow Dog Linux[13] (discontinued in 2009[18])
All of the above PowerPC ports have since been discontinued, except for Gentoo.
Intel Macs
Macs with Intel processors can run Linux through virtualization or through dual-booting. Common virtualization tools for Intel Macs include VMware Fusion, Parallels Desktop, and VirtualBox.[13]
In 2010, Whitson Gordon from Lifehacker noted that Apple has streamlined the process of dual booting Windows on Macs, but not for Linux. rEFIt made it possible to dual boot Linux.[19]
Apple silicon Macs
The Asahi Linux project is porting Linux to the M1 (and up) based SoCs. Asahi Linux is currently available as an incomplete preview.[20]
See also
References
- ^ Stute, Milan; Kreitschmann, David; Hollick, Matthias (2018-10-15). "Demo: Linux Goes Apple Picking: Cross-Platform Ad hoc Communication with Apple Wireless Direct Link". Proceedings of the 24th Annual International Conference on Mobile Computing and Networking: 820–822. doi:10.1145/3241539.3267716.
- ^ Chacos, Brad (December 2013). "The Free OS Revolution". Business Source Premier. 31 (12): 7 – via EBSCO.
- ^ a b c d e f "How To Run Linux on iPhone / iPad & How They Achieved This - iDevice Central". 2022-06-12. Retrieved 2023-04-13.
- ^ "Running Linux in a Virtual Machine". Apple Developer Documentation. Retrieved 2023-04-13.
- ^ Cunningham, Andrew (2022-06-02). "Have an old iPad lying around? You might be able to make it run Linux soon". Ars Technica. Retrieved 2022-06-14.
- ^ "Ein Jahr Arbeit: Tüftler bringen Linux auf das iPad Air 2". Der Standard (in Austrian German). Retrieved 2022-06-15.
- ^ Yam, Marcus; published, Amos Ngai (2008-12-02). "iPhone Hacked to Run Linux". Tom's Guide. Retrieved 2022-06-14.
- ^ "Run Android on an iPhone With 'Project Sandcastle' Jailbreaking Tool". PCMAG. Retrieved 2022-06-14.
- ^ "How to install Linux on a vintage 68K Mac". Macworld. Retrieved 2022-06-14.
- ^ "How to install Linux on a vintage 68K Mac". Macworld. Retrieved 2023-04-01.
- ^ a b "Debian on Motorola 680x0". Debian Ports. Retrieved 2023-04-01.
- ^ "Linux/m68k for Macintosh". Linux/m68k for Mac. Retrieved 2023-04-01.
- ^ a b c d e f g h i j k Rothman, Ernest E.; Jepson, Brian; Rosen, Rich (2008-09-18). Mac OS X For Unix Geeks (Leopard): Demistifying the Geekier Side of Mac OS X (4th ed.). O'Reilly Media, Inc. pp. 174–187. ISBN 978-0-596-52062-5.
- ^ "Debian for PowerPC". Debian Ports. Retrieved 2023-04-01.
- ^ "PowerPCFaq". Ubuntu Wiki. Retrieved 2023-04-01.
- ^ "Ubuntu: A follow-up on 32-bit powerpc architecture [LWN.net]". LWN. Retrieved 2023-04-01.
- ^ "Architectures/PowerPC". Fedora Wiki. Retrieved 2023-04-01.
- ^ "DistroWatch.com: Yellow Dog Linux". DistroWatch. Retrieved 2023-04-01.
- ^ "How to Triple-Boot Your Mac with Windows and Linux, No Boot Camp Required". Lifehacker. 2010-05-05. Retrieved 2022-06-14.
- ^ Purdy, Kevin (2023-02-27). "Linux is not exactly "ready to run" on Apple silicon, but give it time". Ars Technica. Retrieved 2023-04-01.
External links
- Amit Singh's "Many Systems on a PowerBook" article at the Wayback Machine (archived March 23, 2008)