<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>IPhone on Ivon's Blog</title><link>https://ivonblog.com/en-us/tags/iphone/</link><description>Recent content in IPhone on Ivon's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</managingEditor><webMaster>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</webMaster><copyright>You are welcome to share articles from Ivon's blog (ivonblog.com). Please cite the source article URL when sharing. All article content is licensed under a Creative Commons Attribution-ShareAlike 4.0 license, unless otherwise stated. For commercial use, please contact me first.</copyright><lastBuildDate>Mon, 07 Oct 2024 08:00:00 +0800</lastBuildDate><atom:link href="https://ivonblog.com/en-us/tags/iphone/index.xml" rel="self" type="application/rss+xml"/><follow_challenge><feedId>56005902658351104</feedId><userId>1132431067563556864</userId></follow_challenge><item><title>Installing Linux on an iPhone 6: Run postmarketOS Through a checkra1n Jailbreak</title><link>https://ivonblog.com/en-us/posts/iphone-6-postmarketos/</link><pubDate>Mon, 07 Oct 2024 08:00:00 +0800</pubDate><author>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</author><guid>https://ivonblog.com/en-us/posts/iphone-6-postmarketos/</guid><description>&lt;!-- Co-translated by ChatGPT --&gt;
&lt;p&gt;For attempts at running Linux on iOS devices, I have previously discussed &lt;a href="https://ivonblog.com/posts/ios-ish-shell/" target="_blank" rel="noreferrer"&gt;iSH Shell terminal&lt;/a&gt; and the &lt;a href="https://ivonblog.com/posts/ios-utm-alpine-linux-vm/" target="_blank" rel="noreferrer"&gt;UTM virtual machine&lt;/a&gt; approach. This time I am going to try installing Linux directly on an iPhone.&lt;/p&gt;

&lt;h2 class="relative group"&gt;1. Background
 &lt;div id="1-background" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-background" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;checkm8 is arguably Apple’s biggest vulnerability in recent years. Combined with checkra1n, it can complete the jailbreak process before boot. In 2020, some wizard put together Project Sandcastle and successfully ran Android 10 on the iPhone 7. The author also started porting the Linux kernel. Even though Apple almost sued them, the project is still under development.&lt;/p&gt;</description><content:encoded>&lt;!-- Co-translated by ChatGPT --&gt;
&lt;p&gt;For attempts at running Linux on iOS devices, I have previously discussed &lt;a href="https://ivonblog.com/posts/ios-ish-shell/" target="_blank" rel="noreferrer"&gt;iSH Shell terminal&lt;/a&gt; and the &lt;a href="https://ivonblog.com/posts/ios-utm-alpine-linux-vm/" target="_blank" rel="noreferrer"&gt;UTM virtual machine&lt;/a&gt; approach. This time I am going to try installing Linux directly on an iPhone.&lt;/p&gt;

&lt;h2 class="relative group"&gt;1. Background
 &lt;div id="1-background" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-background" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;checkm8 is arguably Apple’s biggest vulnerability in recent years. Combined with checkra1n, it can complete the jailbreak process before boot. In 2020, some wizard put together Project Sandcastle and successfully ran Android 10 on the iPhone 7. The author also started porting the Linux kernel. Even though Apple almost sued them, the project is still under development.&lt;/p&gt;
&lt;p&gt;Recently, people have already developed LineageOS ports, such as &lt;a href="https://github.com/LineageOS/android_device_apple_snowcastle" target="_blank" rel="noreferrer"&gt;Android device tree for &amp;ldquo;snowcastle&amp;rdquo;&lt;/a&gt;, which can run the latest Android 16 on supported iPhones.&lt;/p&gt;
&lt;p&gt;A few years later, more developers tried running Linux on other iPhones. The vulnerability checkm8 relies on only supports A7 to A11 chips, meaning devices from the iPhone 5S through the iPhone X. Older or newer devices do not work.&lt;/p&gt;
&lt;p&gt;Ideally, the iPhone 7 is currently one of the better-supported devices. It can mount postmarketOS on AFPS and boot, and some developers have even gotten Wayland running on it. Unfortunately, I do not have one.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://static.ivonblog.com/posts/iphone-6-postmarketos/images/70ee4748eef92335554a6c2cad052a8d.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/unable-to-load-the-image-pepe.webp'"
 &gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;I have two old iOS devices that support checkm8: an iPhone SE (iOS 15) and an iPod touch 6 (iOS 12). There are many successful Linux boot cases online, but they do not mention their iOS versions. On iOS 15 and later, you can only jailbreak with palera1n, and you need to use the command &lt;code&gt;palera1n -p -f&lt;/code&gt; to start the pongoOS Shell. I tested it and ran into other problems. So I switched to the iPod touch 6 for testing. Its processor is similar to the iPhone 6, so it should theoretically work.&lt;/p&gt;
&lt;p&gt;So how do we run Linux? First, enter the pongoOS Shell through checkra1n, then boot Linux from there.&lt;/p&gt;
&lt;p&gt;Which Linux distro should we pick? Although someone on Reddit successfully compiled Ubuntu and booted it, and someone on Twitter got Asahi Linux running (see references at the end), there are more successful photos on the postmarektOS Wiki. Also, that community pays more attention to mobile Linux, so I used that distro as the base for this attempt.&lt;/p&gt;
&lt;p&gt;There are two possible approaches after that. One is to compile Linux into a ramdisk and boot it; after rebooting, the data disappears.&lt;/p&gt;
&lt;p&gt;The second is to use the &lt;a href="https://ivonblog.com/en-us/posts/postmarketos-netboot/" target="_blank" rel="noreferrer"&gt;Netboot feature provided by pmbootstrap&lt;/a&gt; for network booting. Data still disappears after reboot, but the rootfs stays on the computer.&lt;/p&gt;
&lt;p&gt;So, strictly speaking, none of this is really “installing” Linux on an iPhone. The system is not actually written to the iPhone’s storage; it only boots Linux temporarily. At the moment, no matter which method you use, you still need a computer to guide the device into Linux.&lt;/p&gt;

&lt;h2 class="relative group"&gt;2. Requirements
 &lt;div id="2-requirements" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#2-requirements" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A Linux or Mac computer. I used Ubuntu 24.04.&lt;/li&gt;
&lt;li&gt;An iOS device that supports checkra1n, meaning A7 to A11 chip devices from the iPhone 5S through the iPhone X. I used an iPod touch 6 running iOS 12.5.7.&lt;/li&gt;
&lt;li&gt;Lightning to USB OTG adapter, mouse, and keyboard. Linux has no touch driver, so after the iPhone boots you need to control it with a keyboard and mouse. If you are comfortable controlling X11 with SSH commands, you can skip these.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 class="relative group"&gt;3. Compile pongoOS
 &lt;div id="3-compile-pongoos" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#3-compile-pongoos" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;pongoOS is the program that runs before loading the iOS XNU kernel.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Before compiling pongoOS, you need checkr1an. (paler1an does not require compiling pongoOS.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Download the checkra1n executable from the &lt;a href="https://checkra.in/releases/#all-downloads" target="_blank" rel="noreferrer"&gt;official website&lt;/a&gt; and put it in a system directory.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wget https://assets.checkra.in/downloads/linux/cli/x86_64/dac9968939ea6e6bfbdedeb41d7e2579c4711dc2c5083f91dced66ca397dc51d/checkra1n
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo mv checkra1n /usr/bin/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Install Clang 11 on Linux.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install clang-11 xdd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Install ld64 and cctools-strip from the checkra1n package repository. Other distros need to manually compile them for newer Clang versions.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;deb https://assets.checkra.in/debian /&amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; sudo tee /etc/apt/sources.list.d/checkra1n.list
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt-key adv --fetch-keys https://assets.checkra.in/debian/archive.key
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install ld64 cctools-strip&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Get the pongoOS source code and compile it, using konradybcio’s fork.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone https://github.com/konradybcio/pongoOS
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; pongoOS
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LD_LIBRARY_PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;/usr/lib/llvm-11/lib/&amp;#34;&lt;/span&gt; &lt;span class="nv"&gt;EMBEDDED_CC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;/usr/bin/clang-11&amp;#34;&lt;/span&gt; &lt;span class="nv"&gt;EMBEDDED_LDFLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;-fuse-ld&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/ld64 &lt;span class="nv"&gt;STRIP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;cctools-strip make all&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note: the pongoOS source has not been updated in a long time, so it sometimes fails to compile. You can also compile it inside a macOS virtual machine. The following commands compile it with Xcode on macOS Ventura:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;xcode-select --install
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone https://github.com/konradybcio/pongoOS
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; pongoOS
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;make all&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;You will end up with &lt;code&gt;build/Pongo.bin&lt;/code&gt;.&lt;/p&gt;

&lt;h2 class="relative group"&gt;4. Compile the Linux Kernel
 &lt;div id="4-compile-the-linux-kernel" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#4-compile-the-linux-kernel" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Install build dependencies.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install build-essential clang libncurses5 flex git bc bison&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Get the linux-apple kernel source provided by konradybcio.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone https://github.com/konradybcio/linux-apple
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; linux-apple&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Get the defconfig provided by SoMainline.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wget https://raw.githubusercontent.com/SoMainline/linux-apple-resources/master/example.config -O ./.config&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Adjust PAGESIZE.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;make &lt;span class="nv"&gt;ARCH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;arm64 &lt;span class="nv"&gt;LLVM&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; menuconfig&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="5"&gt;
&lt;li&gt;
&lt;p&gt;Press &lt;code&gt;/&lt;/code&gt; to search, enter &lt;code&gt;_PAGE&lt;/code&gt;, and press 1.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For PAGESIZE, set A8 processors to 4K and A9 or newer processors to 16K. Then press Exit and save &lt;code&gt;.config&lt;/code&gt;.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://static.ivonblog.com/posts/iphone-6-postmarketos/images/Screenshot_20241004_215131.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/unable-to-load-the-image-pepe.webp'"
 &gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Compile the kernel.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;make &lt;span class="nv"&gt;ARCH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;arm64 &lt;span class="nv"&gt;LLVM&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; -j&lt;span class="k"&gt;$(&lt;/span&gt;nproc&lt;span class="k"&gt;)&lt;/span&gt; Image.lzma dtbs&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="8"&gt;
&lt;li&gt;
&lt;p&gt;You will end up with &lt;code&gt;arch/arm64/boot/Image.lzma&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Get the dtbpack script and put it in the Linux kernel directory.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wget https://raw.githubusercontent.com/SoMainline/linux-apple-resources/master/dtbpack.sh
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chmod +x dtbpack.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="10"&gt;
&lt;li&gt;Generate dtbpack.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./dtbpack.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 class="relative group"&gt;5. Compile the postmarketOS rootfs
 &lt;div id="5-compile-the-postmarketos-rootfs" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#5-compile-the-postmarketos-rootfs" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install &lt;a href="https://ivonblog.com/en-us/posts/postmarketos-general-installation/" target="_blank" rel="noreferrer"&gt;pmbootstrap&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initialize it. Select apple-iphone6 as the device model and xfce4 as the desktop environment.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pmbootstrap init&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Create the rootfs.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pmbootstrap install&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 class="relative group"&gt;6. Boot into Linux
 &lt;div id="6-boot-into-linux" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#6-boot-into-linux" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Set up &lt;a href="https://ivonblog.com/posts/linux-access-ios-files/" target="_blank" rel="noreferrer"&gt;libimobiledevice&lt;/a&gt; and confirm that Linux recognizes the iPhone.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Connect the iPhone to the computer and manually enter DFU mode: power it off and wait 5 seconds. Hold the power button for 3 seconds, then hold power + Home for 10 seconds. Release the power button and keep holding Home.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After confirming it is in DFU mode, open a terminal in the pongoOS source directory and use checkra1n to enter the pongoOS Shell.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; pongoOS
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo checkra1n -v -V -p -c -k ./build/Pongo.bin&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="4"&gt;
&lt;li&gt;
&lt;p&gt;At this point, you should see the pongoOS Shell on the iOS device screen.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://static.ivonblog.com/posts/iphone-6-postmarketos/images/20241005_115452.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/unable-to-load-the-image-pepe.webp'"
 &gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start postmarketOS netboot.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pmbootstrap initfs hook_add netboot
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pmbootstrap export&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="6"&gt;
&lt;li&gt;Send the Linux initramfs to the iOS device.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; pongoOS
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;python3 scripts/load_linux.py -k &lt;span class="s2"&gt;&amp;#34;linux-apple-kernel-directory/arch/arm64/boot/Image.lzma&amp;#34;&lt;/span&gt; -d &lt;span class="s2"&gt;&amp;#34;linux-apple-kernel-directory/dtbpack&amp;#34;&lt;/span&gt; -r /tmp/postmarketOS-export/initramfs&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="7"&gt;
&lt;li&gt;
&lt;p&gt;Wait for Linux to boot&amp;hellip; and it kernel panics. Damn it.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://static.ivonblog.com/posts/iphone-6-postmarketos/images/Screenshot_20241005-220705.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/unable-to-load-the-image-pepe.webp'"
 &gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If it boots normally, send the Netboot rootfs and you can enter the Linux system.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pmbootstrap netboot serve
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ssh user@172.16.42.1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 class="relative group"&gt;7. Conclusion
 &lt;div id="7-conclusion" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#7-conclusion" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Every time I do this kind of thing, I think of this song. It&amp;rsquo;s all a waste of time again.




&lt;div style="position: relative; padding-bottom: 56.25%; overflow: hidden;"&gt;
 &lt;iframe style="position: absolute; width: 100%; height: 100%;"
 src="http://www.youtube.com/embed/rIjW7wKzU7s" allowfullscreen frameborder="0" loading="lazy"&gt;
 &lt;/iframe&gt;
&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;At the moment, this is not practical. It is a bit like stubbornly flashing postmarketOS onto an Android phone with terrible driver support. The biggest problem is still poor driver support. Just look at the &lt;a href="https://github.com/SoMainline/linux-apple-resources" target="_blank" rel="noreferrer"&gt;table provided by SoMainline&lt;/a&gt;: almost every hardware feature has an X next to it.&lt;/p&gt;
&lt;p&gt;And who is going to reverse engineer Apple device drivers? Are there developers with Asahi Linux-level enthusiasm for this? On top of that, booting Linux still depends on a hardware vulnerability.&lt;/p&gt;
&lt;p&gt;Aside from booting and running some Linux programs, there is not much room for this to grow.&lt;/p&gt;
&lt;p&gt;A more realistic strategy is probably to run a JIT-accelerated UTM virtual machine on the iOS device, then run a Linux VM inside it. Much more practical, which is annoying but true.&lt;/p&gt;

&lt;h2 class="relative group"&gt;References
 &lt;div id="references" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#references" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/SoMainline/linux-apple-resources" target="_blank" rel="noreferrer"&gt;Resources for Linux on checkm8able iDevices - Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://wiki.postmarketos.org/wiki/Apple_iPhone_6_%28apple-iphone6%29" target="_blank" rel="noreferrer"&gt;Apple iPhone 6 (apple-iphone6) - postmarketOS Wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://project-insanity.org/2020/04/16/running-postmarketos-on-iphone-7/" target="_blank" rel="noreferrer"&gt;Running postmarketOS on iPhone 7 - project-insanity.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://project-insanity.org/2020/04/22/linux-with-wayland-is-now-running-on-iphone-7/" target="_blank" rel="noreferrer"&gt;Linux with Wayland is now running on iPhone 7 - project-insanity.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/r/linux/comments/kvmsfd/success_iphone_7_booting_ubuntu_2004_to_full/" target="_blank" rel="noreferrer"&gt;SUCCESS: iPhone 7 booting Ubuntu 20.04 to full gnome-shell desktop GUI - Reddit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/konradybcio/status/1531963130934329344" target="_blank" rel="noreferrer"&gt;Linux on iPad Air 2 - Twitter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://ivonblog.com/en-us/posts/iphone-6-postmarketos/featured.webp"/></item></channel></rss>