<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[kernelpanik]]></title><description><![CDATA[Tech things to waste your time on.]]></description><link>http://kernelpanik.net/</link><image><url>http://kernelpanik.net/favicon.png</url><title>kernelpanik</title><link>http://kernelpanik.net/</link></image><generator>Ghost 3.42</generator><lastBuildDate>Sun, 30 Nov 2025 19:15:14 GMT</lastBuildDate><atom:link href="http://kernelpanik.net/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Vulkan 1.3+ and Steam support on Ubuntu Asahi]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p><em>Update 2025-11-30</em><br>
This page has been moved to <a href="https://github.com/UbuntuAsahi/ubuntu-asahi/wiki/Steam-support">https://github.com/UbuntuAsahi/ubuntu-asahi/wiki/Steam-support</a></p>
<p><em>Update 2025-11-14</em><br>
<em>The RootFS tarball includes Mesa 25.2.7 from kisak's PPA: <a href="https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa">https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa</a></em><br>
<em>Make sure to install Mesa from the same PPA locally in order to have the</em></p>]]></description><link>http://kernelpanik.net/vulkan_and_steam_on_ubuntu_asahi/</link><guid isPermaLink="false">6716c40881e1e90001842a31</guid><category><![CDATA[linux]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Mon, 21 Oct 2024 21:28:44 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p><em>Update 2025-11-30</em><br>
This page has been moved to <a href="https://github.com/UbuntuAsahi/ubuntu-asahi/wiki/Steam-support">https://github.com/UbuntuAsahi/ubuntu-asahi/wiki/Steam-support</a></p>
<p><em>Update 2025-11-14</em><br>
<em>The RootFS tarball includes Mesa 25.2.7 from kisak's PPA: <a href="https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa">https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa</a></em><br>
<em>Make sure to install Mesa from the same PPA locally in order to have the same version.</em></p>
<p><em>Update 2025-11-03</em><br>
<em>The RootFS tarball has been updated to Ubuntu 25.10 (questing), which also works if the host system is Ubuntu 24.04.</em><br>
<em>The RootFS tarball includes Mesa 25.2.6 from kisak's PPA: <a href="https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa">https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa</a></em><br>
<em>Make sure to install Mesa from the same PPA locally in order to have the same version.</em></p>
<p><em>Update 2025-09-15</em><br>
<em>The following packages have been updated:</em></p>
<ul>
<li><em>libkrun 1.15.1</em></li>
<li><em>virglrenderer 1.2.0</em></li>
</ul>
<p><em>The asahi &amp; honeykrisp drivers are in upstream Mesa now. But existing Mesa packages in the Ubuntu default package repositories are still using older versions.</em></p>
<p><em>The RootFS tarball includes Mesa 25.2.2 from kisak's PPA: <a href="https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa">https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa</a></em><br>
<em>Make sure to install Mesa from the same PPA locally in order to have the same version.</em></p>
<p><em>Update 2025-07-21</em><br>
<em>FEX release 2507.1 fixes a regression in 2507 that caused Steam to not start anymore: <a href="https://github.com/FEX-Emu/FEX/releases/tag/FEX-2507.1">https://github.com/FEX-Emu/FEX/releases/tag/FEX-2507.1</a></em></p>
<p><em>The following packages have been updated:</em></p>
<ul>
<li><em>libkrunfw 4.10.0</em></li>
<li><em>libkrun 1.14.0</em></li>
<li><em>muvm 0.4.1</em></li>
</ul>
<p><em>Ubuntu 25.04 (plucky) is supported now. All required packages have been released for plucky as well.</em><br>
<em>The RootFS tarball has been updated to Ubuntu 25.04, which also works if the host system is Ubuntu 24.04.</em></p>
<p><em>Update 2025-06-26</em><br>
<em>FEX release 2506 seems to fix the problems with muvm / Steam of version 2502 and higher. You can unblock updates via &quot;apt-mark unhold fex-emu-armv8.4&quot;.</em></p>
<p><em>Update 2025-05-05</em><br>
<em>The following packages have been updated:</em></p>
<ul>
<li><em>libkrun 1.11.2</em></li>
<li><em>muvm 0.4.1</em></li>
<li><em>passt 0.0~git20250217.a1e48a0-1asahi1.24.04</em></li>
</ul>
<p><em>Please note that FEX releases newer than 2502 don't work properly with muvm / Steam. I had to block updates via &quot;apt-mark hold fex-emu-armv8.4&quot;</em></p>
<p><em>Update 2025-03-31</em><br>
<em>The following packages have been updated:</em></p>
<ul>
<li><em>mesa 25.0.0~pre20250221</em></li>
<li><em>libxshmfence 1.3.3</em></li>
<li><em>libkrunfw 4.9.0</em></li>
<li><em>libkrun 1.10.1</em></li>
<li><em>muvm 0.3.1</em></li>
<li><em>steam 0.13-2</em></li>
</ul>
<p><em>Update 2024-12-17</em><br>
<em>Mesa 25.0.0~pre20241211-1asahi0.24.04 packages are available in the Ubuntu Asahi PPA now.</em></p>
<p><em>Update 2024-12-13</em><br>
<em>In case you installed hidpipe and sommelier previously, you can remove both packages now.</em><br>
<em>hidpipe has been integrated into muvm and muvm defaults to x11bridge, not depending on sommelier anymore.</em></p>
<p><em>For the FEX root filesystem you can download a prepared tarball here or build your own.</em></p>
<hr>
<!--kg-card-end: markdown--><p>Recently on XDC 2024, Alyssa Rosenzweig announced support for Vulkan 1.3 in Mesa, as well as gaming in Steam, using muvm (ex krunvm) and FEX: <a href="https://asahilinux.org/2024/10/aaa-gaming-on-asahi-linux/">https://asahilinux.org/2024/10/aaa-gaming-on-asahi-linux/</a></p><p>On 2024-12-02 Vulkan 1.4 support was announced: <a href="https://social.treehouse.systems/@AsahiLinux/113584784231664115">https://social.treehouse.systems/@AsahiLinux/113584784231664115</a><br>The Vulkan loader package in Ubuntu doesn't support Vulkan 1.4 directly yet, but the new functionality is also exposed as Vulkan 1.3 extensions.</p><p>On 2024-12-12 there was another announcement from Asahi Lina regarding x11bridge and recent improvements: <a href="https://asahilinux.org/2024/12/muvm-x11-bridging/">https://asahilinux.org/2024/12/muvm-x11-bridging/</a></p><!--kg-card-begin: markdown--><h2 id="vulkan">Vulkan</h2>
<p>To get an up to date Mesa version on Ubuntu 24.04 (noble) and 25.04 (plucky), you need to add kisak's Mesa PPA <code>sudo add-apt-repository ppa:kisak/kisak-mesa &amp;&amp; sudo apt update &amp;&amp; sudo apt upgrade</code> and should get:<br>
&quot;Mesa 25.2.6 - kisak-mesa PPA&quot;</p>
<p>If new packages are not shown, then create /etc/apt/preferences.d/kisak with the following contents:</p>
<pre><code>Package: *
Pin: release o=LP-PPA-kisak-kisak-mesa
Pin-Priority: 1001
</code></pre>
<p>On Ubuntu 25.10 (questing) Mesa has already been updated to 25.2.2, so you can choose to skip this. If you want to have the latest bugfixes from Mesa stable releases, you can also install Mesa from this PPA.</p>
<p>vulkaninfo should show Vulkan API and conformance version 1.4.x:</p>
<pre><code>$ vulkaninfo --summary
...
Devices:
========
GPU0:
	apiVersion         = 1.4.318
	driverVersion      = 25.2.6
	vendorID           = 0x10005
	deviceID           = 0x0000
	deviceType         = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
	deviceName         = Apple M2 Pro (G14S B1)
	driverID           = DRIVER_ID_MESA_AGXV
	driverName         = Honeykrisp
	driverInfo         = Mesa 25.2.6 - kisak-mesa PPA
	conformanceVersion = 1.4.0.0
	deviceUUID         = 3707413d-f533-836a-de77-be4a659c5xxx
	driverUUID         = 2c451509-2027-7133-95b1-5274a701bxxx
...
</code></pre>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><h2 id="ppa">PPA</h2>
<p>The packages for Steam, muvm and dependencies are not uploaded to the Ubuntu Asahi PPA yet, so we'll have to add mine as well.</p>
<pre><code>sudo add-apt-repository ppa:kaazoo/ubuntu-asahi-gaming
</code></pre>
<p>In order to make sure the newer packages are preferred, we'll also have to increase the priority of the PPA in /etc/apt/preferences.d/kaazoo:</p>
<pre><code>Package: *
Pin: release o=LP-PPA-kaazoo-ubuntu-asahi-gaming
Pin-Priority: 1001
</code></pre>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><h2 id="installsteamanddependencies">Install Steam and dependencies</h2>
<h3 id="installationfromubuntupackages">Installation from Ubuntu packages</h3>
<p>Install steam, along with all dependencies:</p>
<pre><code>$ sudo apt install steam
</code></pre>
<p>Install FEX from their PPA:</p>
<pre><code>$ sudo add-apt-repository ppa:fex-emu/fex
$ sudo apt install fex-emu-armv8.4
</code></pre>
<h3 id="fexrootfileystem">FEX root fileystem</h3>
<p>FEX needs a root filesystem based on the same Ubuntu release that is running locally, but with i386 and amd64 packages, in order to support 32 and 64 bit applications.<br>
It's based on Ubuntu 25.10, which works on both 24.04 and 25.10 as host system.</p>
<p>You can download a tarball that I created or you build your own.</p>
<h4 id="usepreparedtarball">Use prepared tarball</h4>
<p><em>Last update: 2025-11-03</em></p>
<pre><code>$ cd ~/Downloads
$ wget https://kernelpanik.net/content/images/Stage2_ubuntu-base-25.10-base-amd64.tar.gz
$ mkdir -p ~/.fex-emu/RootFS/Ubuntu_25_10
$ tar -xvzf Stage2_ubuntu-base-25.10-base-amd64.tar.gz -C ~/.fex-emu/RootFS/Ubuntu_25_10
</code></pre>
<p>Afterwards, run <code>FEXConfig</code> and select <code>Ubuntu_25_10</code> as root FS.</p>
<h4 id="buildyourown">Build your own</h4>
<p>A FEX root fs can be created with <a href="https://github.com/FEX-Emu/RootFS">https://github.com/FEX-Emu/RootFS</a> but needs to few customizations, in order to have the same mesa version in the VM as locally.</p>
<pre><code>$ cd ~/Downloads
$ git clone https://github.com/kaazoo/RootFS.git
$ cd RootFS
$ ./build_image.py Configs/Ubuntu_25_10_asahi.json cache_dir rootfs_dir
$ rsync -av rootfs_dir/Stage1_RootFS/ ~/.fex-emu/RootFS/Ubuntu_25_10
</code></pre>
<p>Afterwards, run <code>FEXConfig</code> and select <code>Ubuntu_25_10</code> as root FS.</p>
<h2 id="launchsteam">Launch Steam</h2>
<p>Run a Python wrapper to start FEXBash inside muvm and execute Steam's launch script at ~/.local/share/fex-steam/steam-launcher/bin_steam.sh</p>
<pre><code>$ steam
</code></pre>
<p>Alternatively, we can also start Steam manually from a FEXBash shell:</p>
<pre><code>$ muvm -ti FEXBash
$ ~/.local/share/fex-steam/steam-launcher/bin_steam.sh
</code></pre>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><h2 id="manualinstallationofdependenciesdeprecated">Manual installation of dependencies (deprecated)</h2>
<p>Steam is a bit more complicated, as it depends on multiple components, which are not all packaged in Ubuntu yet.<br>
We'll install them to <code>/usr/local</code> for now.</p>
<h4 id="virglrenderer">Virglrenderer</h4>
<p><code>apt install virglrenderer</code> should install virglrenderer 1.0.1~asahi-20240925-1asahi1.24.04</p>
<h4 id="sommelier">Sommelier</h4>
<p>Based on <a href="https://src.fedoraproject.org/rpms/chromiumos-platform/blob/rawhide/f/chromiumos-platform.spec">https://src.fedoraproject.org/rpms/chromiumos-platform/blob/rawhide/f/chromiumos-platform.spec</a></p>
<pre><code>$ mkdir -p asahi
$ cd asahi
$ git clone https://chromium.googlesource.com/chromiumos/platform2.git sommelier
$ cd sommelier
$ git checkout 67bc17ea79b4ff1b449053e5fcf3375ff6b30690
$ cd sommelier/vm_tools/sommelier

$ wget https://src.fedoraproject.org/rpms/chromiumos-platform/raw/rawhide/f/0001-Revert-sommelier-bump-up-CROSS_DOMAIN_MAX_IDENTIFIER.patch
$ wget https://src.fedoraproject.org/rpms/chromiumos-platform/raw/rawhide/f/0002-vm_tools-sommelier-align-mem-operations-to-16K.patch
$ wget https://src.fedoraproject.org/rpms/chromiumos-platform/raw/rawhide/f/0003-vm_tools-sommelier-don-t-call-to-fixup_plane0.patch
$ wget https://src.fedoraproject.org/rpms/chromiumos-platform/raw/rawhide/f/0004-vm_tools-sommelier-Do-not-assert-on-unsued-wayland-i.patch
$ patch -p3 &lt;0001-Revert-sommelier-bump-up-CROSS_DOMAIN_MAX_IDENTIFIER.patch 
$ patch -p3 &lt;0002-vm_tools-sommelier-align-mem-operations-to-16K.patch 
$ patch -p3 &lt;0003-vm_tools-sommelier-don-t-call-to-fixup_plane0.patch 
$ patch -p3 &lt;0004-vm_tools-sommelier-Do-not-assert-on-unsued-wayland-i.patch

$ mkdir build
$ meson -Dxwayland_path=/usr/bin/Xwayland -Dgamepad=true -Dquirks=true -Dwith_tests=false build
$ ninja -C build
$ sudo cp build/sommelier /usr/local/bin/sommelier
</code></pre>
<h4 id="rust">Rust</h4>
<pre><code>$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
$ . &quot;$HOME/.cargo/env&quot;
</code></pre>
<p>Instead of using rustup, you could also install the <code>rust-1.80-all</code> package.</p>
<h4 id="libkrunfw451">libkrunfw 4.5.1</h4>
<pre><code>$ cd asahi
$ git clone https://github.com/containers/libkrunfw.git
$ cd libkrunfw
$ git checkout v4.5.1
$ make
$ sudo make install
</code></pre>
<h4 id="libkrun198">libkrun 1.9.8</h4>
<pre><code>$ cd asahi
$ git clone https://github.com/containers/libkrun.git
$ cd libkrun
$ git checkout v1.9.8
$ echo '    println!(&quot;cargo:rustc-link-arg=-L/usr/local/lib64&quot;);' &gt;&gt; src/libkrun/build.rs
$ GPU=1 VIRGL_RESOURCE_MAP2=1 BLK=1 NET=1 SND=1 make
$ sudo make install
</code></pre>
<h4 id="muvm013">muvm 0.1.3</h4>
<pre><code>$ cd asahi
$ git clone https://github.com/AsahiLinux/muvm.git
$ cd muvm
$ echo '    println!(&quot;cargo::rustc-link-arg=-L/usr/local/lib64&quot;);' &gt;&gt; crates/krun-sys/build.rs
$ sed -i 's/&quot;--glamor&quot;,/&quot;--glamor&quot;,\n        &quot;--xwayland-path=\/usr\/bin\/Xwayland&quot;/' crates/muvm/src/guest/sommelier.rs
$ sed -i 's/&quot;resolv.conf&quot;, None/&quot;resolv.conf&quot;, Some(&quot;nameserver 9.9.9.9\\n&quot;)/' crates/muvm/src/guest/mount.rs
$ cargo build --release
$ sudo cp target/release/muvm /usr/local/bin/
$ sudo cp target/release/muvm-guest /usr/local/bin/
$ sudo cp target/release/muvm-server /usr/local/bin/
</code></pre>
<h4 id="hidpipe">hidpipe</h4>
<pre><code>$ cd asahi
$ git clone https://github.com/AsahiLinux/hidpipe.git
$ cd hidpipe
$ cargo build --release
$ sudo cp target/release/hidpipe-client /usr/local/bin/
$ sudo cp target/release/hidpipe-server /usr/local/bin/
</code></pre>
<h3 id="steam">Steam</h3>
<p>Based on <a href="https://pagure.io/fedora-asahi/steam/blob/main/f/steam.spec">https://pagure.io/fedora-asahi/steam/blob/main/f/steam.spec</a></p>
<pre><code>$ cd asahi
$ git clone https://pagure.io/fedora-asahi/steam.git
$ sudo apt install python3-pyqt6
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Updating vendor firmware and LineageOS GSI on Samsung Galaxy S20 FE 5G]]></title><description><![CDATA[<p>Due to the lack of well-maintained community Android ROMs / firmware for Samsung Galaxy S20 FE 5G, the best option stills seems to be using the stock firmware as base and install a GSI image on top.</p><p>See my older post here: <a href="http://kernelpanik.net/gsi-on-samsung-galaxy-s20-fe-5g/">https://kernelpanik.net/gsi-on-samsung-galaxy-s20-fe-5g/</a></p><p>Here are the steps I</p>]]></description><link>http://kernelpanik.net/updating-vendor-firmware-and-lineageos-gsi-on-samsung-galaxy-s20-fe-5g/</link><guid isPermaLink="false">664522150abe170001fd3d13</guid><category><![CDATA[android]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Wed, 15 May 2024 21:45:23 GMT</pubDate><content:encoded><![CDATA[<p>Due to the lack of well-maintained community Android ROMs / firmware for Samsung Galaxy S20 FE 5G, the best option stills seems to be using the stock firmware as base and install a GSI image on top.</p><p>See my older post here: <a href="http://kernelpanik.net/gsi-on-samsung-galaxy-s20-fe-5g/">https://kernelpanik.net/gsi-on-samsung-galaxy-s20-fe-5g/</a></p><p>Here are the steps I took to update everything on my device. Well, it's really a full installation from scratch. So in any case, backup your data first, as all existing data will be wiped during the process (maybe I could have avoided that, but I did backups anyways and wanted to have a clean setup at the end).</p><p>As I'm a Linux user with an arm64 machine, I was glad to learn that there is an Odin version for Linux, as Heimdall wasn't working for me. Unfortunately, the Odin binary is compiled for amd64 and there is no source code available, so I had to use an amd64 VM for installing the stock firmware, recovery and vbmeta images. I also tried with a Docker container, but that didn't work because of some USB access problems.</p><!--kg-card-begin: markdown--><h2 id="downloads">Downloads</h2>
<ul>
<li>Odin for Linux (amd64): <a href="https://xdaforums.com/t/official-samsung-odin-v4-1-2-1-dc05e3ea-for-linux.4453423/">https://xdaforums.com/t/official-samsung-odin-v4-1-2-1-dc05e3ea-for-linux.4453423/</a></li>
<li>Samsung stock firmware: <a href="https://samfw.com/firmware/SM-G781B">https://samfw.com/firmware/SM-G781B</a></li>
<li>TWRP: <a href="https://eu.dl.twrp.me/r8q/twrp-3.7.1_12-0-r8q.img.tar.html">https://eu.dl.twrp.me/r8q/twrp-3.7.1_12-0-r8q.img.tar.html</a></li>
<li>vbmeta: <a href="https://github.com/ata-kaner/r8q_archive/releases/tag/vbmeta">https://github.com/ata-kaner/r8q_archive/releases/tag/vbmeta</a></li>
<li>LineageOS GSI: <a href="https://sourceforge.net/projects/andyyan-gsi/files/lineage-20-td/">https://sourceforge.net/projects/andyyan-gsi/files/lineage-20-td/</a></li>
</ul>
<h2 id="steps">Steps</h2>
<h3 id="helpervmnotneededwhenrunningonamd64machine">Helper VM (not needed when running on amd64 machine)</h3>
<ul>
<li>Create Debian 12 amd64 VM in Virtual Machine Manager (VMM)</li>
<li>Default desktop deployment with XFCE is sufficient</li>
<li>Share directory on host (containing firmware images) via VirtioFS to VM</li>
<li>Mount VirtioFS 'fs' in VM under '/mnt':</li>
</ul>
<pre><code>$ sudo mount -t virtiofs fs /mnt
</code></pre>
<h3 id="installstockfirmarefromvm">Install stock firmare (from VM)</h3>
<ul>
<li>Boot device to download mode (Vol up+down + Power)</li>
<li>Redirect USB device in VMM</li>
<li>Check if device ready:</li>
</ul>
<pre><code>$ sudo /mnt/odin/odin4 -l
</code></pre>
<ul>
<li>Flash stock firmware</li>
</ul>
<pre><code>$ sudo /mnt/odin/odin4 -b /mnt/BL_G781BXXSAHXC6_G781BXXSAHXC6_MQB78624741_REV00_user_low_ship_MULTI_CERT.tar.md5 \
    -a /mnt/AP_G781BXXSAHXC6_G781BXXSAHXC6_MQB78624741_REV00_user_low_ship_MULTI_CERT_meta_OS13.tar.md5 \
    -c /mnt/CP_G781BXXSAHXC6_CP26187603_MQB78624741_REV00_user_low_ship_MULTI_CERT.tar.md5 \
    -s /mnt/CSC_OXM_G781BOXMAHXC6_MQB78631186_REV00_user_low_ship_MULTI_CERT.tar.md5 \
    -d /dev/bus/usb/001/002
</code></pre>
<ul>
<li>Boot stock firmware</li>
<li>Finish intial setup</li>
<li>Check for OS updates</li>
<li>Check for OEM unlock status</li>
</ul>
<h3 id="installvbmetafromvm">Install vbmeta (from VM)</h3>
<ul>
<li>
<p>Boot device to download mode (Vol up+down + Power)</p>
</li>
<li>
<p>Redirect USB device in VMM</p>
</li>
<li>
<p>Flash vbmeta_patched_G781B.tar:</p>
</li>
</ul>
<pre><code>$ sudo /mnt/odin/odin4 -u /mnt/vbmeta_patched_G781B.tar -d /dev/bus/usb/002/009
Check file : ../vbmeta_patched_G781B.tar
/dev/bus/usb/002/009
Setup Connection
initializeConnection
Receive PIT Info
success getpit
Upload Binaries
vbmeta.img
Close Connection
</code></pre>
<h3 id="installtwrprecoveryfromvm">Install TWRP recovery (from VM)</h3>
<ul>
<li>
<p>Boot device to download mode (Vol up+down + Power)</p>
</li>
<li>
<p>Redirect USB device in VMM</p>
</li>
<li>
<p>Flash TWRP:</p>
</li>
</ul>
<pre><code>$ sudo ./odin4 -a ../twrp-3.7.1_12-0-r8q.img.tar -d /dev/bus/usb/002/011
Check file : ../twrp-3.7.1_12-0-r8q.img.tar
/dev/bus/usb/002/011
Setup Connection
initializeConnection
Receive PIT Info
success getpit
Upload Binaries
recovery.img
Close Connection
</code></pre>
<ul>
<li>Boot to recovery (Vol up + Power)</li>
<li>Wipe &gt; Advanced wipe &gt; Wipe DATA, METADATA, KEYDATA and KEYREFUGE</li>
<li>Reboot</li>
<li>Boot stock firmware</li>
<li>Finish intial setup once more</li>
</ul>
<h3 id="installgsifromhost">Install GSI (from host)</h3>
<ul>
<li>
<p>Boot to recovery (Vol up + Power)</p>
</li>
<li>
<p>Reboot to fastboot</p>
</li>
<li>
<p>Delete product partition (not needed anyways):</p>
</li>
</ul>
<pre><code>$ fastboot delete-logical-partition product
Deleting 'product'                                 OKAY [  0.004s]
Finished. Total time: 0.004s
</code></pre>
<ul>
<li>
<p>Reboot to fastboot</p>
</li>
<li>
<p>Unpack GSI:</p>
</li>
</ul>
<pre><code>$ unxz lineage-20.0-20240414-UNOFFICIAL-arm64_bvS.img.xz
</code></pre>
<ul>
<li>Flash GSI:</li>
</ul>
<pre><code>$ fastboot flash system lineage-20.0-20240414-UNOFFICIAL-arm64_bvS.img 
Resizing 'system'                                  OKAY [  0.003s]
Sending sparse 'system' 1/9 (262112 KB)            OKAY [  6.929s]
Writing 'system'                                   OKAY [  0.552s]
Sending sparse 'system' 2/9 (262112 KB)            OKAY [  6.950s]
Writing 'system'                                   OKAY [  0.530s]
Sending sparse 'system' 3/9 (262112 KB)            OKAY [  6.859s]
Writing 'system'                                   OKAY [  0.541s]
Sending sparse 'system' 4/9 (262124 KB)            OKAY [  6.930s]
Writing 'system'                                   OKAY [  0.526s]
Sending sparse 'system' 5/9 (262128 KB)            OKAY [  6.999s]
Writing 'system'                                   OKAY [  0.544s]
Sending sparse 'system' 6/9 (262088 KB)            OKAY [  6.941s]
Writing 'system'                                   OKAY [  0.519s]
Sending sparse 'system' 7/9 (262120 KB)            OKAY [  6.873s]
Writing 'system'                                   OKAY [  0.527s]
Sending sparse 'system' 8/9 (262140 KB)            OKAY [  6.926s]
Writing 'system'                                   OKAY [  0.534s]
Sending sparse 'system' 9/9 (69560 KB)             OKAY [  1.817s]
Writing 'system'                                   OKAY [  0.243s]
Finished. Total time: 62.226s
</code></pre>
<ul>
<li>Reboot to recovery</li>
<li>Wipe &gt; Format DATA</li>
<li>Reboot to system</li>
<li>Done</li>
</ul>
<!--kg-card-end: markdown--><p>There was one problem after everything else seemed to be working nicely: receiving SMS didn't work for some strange reason, while sending SMS and initiating / receiving phone calls worked.</p><p>From what I read on XDA forums and GSI related bug reports at <a href="https://github.com/TrebleDroid/treble_experimentations/issues">https://github.com/TrebleDroid/treble_experimentations/issues</a> it seems that Samsung did some changes that broke integration with the IMS implementation on TrebleDroid (basis for LineageOS GSI), which is responsible for receiving SMS (amongst other things).</p><p>See <a href="http://kernelpanik.net/fix-sms-reception-on-samsung-s20-fe-5g/">https://kernelpanik.net/fix-sms-reception-on-samsung-s20-fe-5g/</a> for fixing the SMS reception problem.</p>]]></content:encoded></item><item><title><![CDATA[Fix SMS reception on Samsung Galaxy S20 FE 5G]]></title><description><![CDATA[<p>Recent Samsung vendor firmware, like in G781BXXSAHXC6 from April 2024, breaks SMS reception with recent GSI firmware, for example Andy Yan's LineageOS 20 GSI from <a href="https://sourceforge.net/projects/andyyan-gsi/files/lineage-20-light/">https://sourceforge.net/projects/andyyan-gsi/files/lineage-20-light/</a></p><p>Based on the same fix for a different device (<a href="https://github.com/IverCoder/a03nnxx-ril-rollback">https://github.com/IverCoder/a03nnxx-ril-rollback</a>), the 2 files <strong>libsec-ril.</strong></p>]]></description><link>http://kernelpanik.net/fix-sms-reception-on-samsung-s20-fe-5g/</link><guid isPermaLink="false">664341ad0abe170001fd3cae</guid><category><![CDATA[android]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Tue, 14 May 2024 11:03:01 GMT</pubDate><content:encoded><![CDATA[<p>Recent Samsung vendor firmware, like in G781BXXSAHXC6 from April 2024, breaks SMS reception with recent GSI firmware, for example Andy Yan's LineageOS 20 GSI from <a href="https://sourceforge.net/projects/andyyan-gsi/files/lineage-20-light/">https://sourceforge.net/projects/andyyan-gsi/files/lineage-20-light/</a></p><p>Based on the same fix for a different device (<a href="https://github.com/IverCoder/a03nnxx-ril-rollback">https://github.com/IverCoder/a03nnxx-ril-rollback</a>), the 2 files <strong>libsec-ril.so</strong> and <strong>libsecril-client.so</strong> have to be extracted from an older Samsung firmware before June 2023, e.g. G781BXXS5HWD4</p><!--kg-card-begin: markdown--><p>Here are the steps it took me to fix SMS reception:</p>
<ul>
<li>
<p>Download AP_G781BXXS5HWD4_G781BXXS5HWD4_MQB64445591_REV00_user_low_ship_MULTI_CERT_meta_OS13.tar.md5.zip from <a href="https://samfw.com/firmware/SM-G781B/DBT/G781BXXS5HWD4">https://samfw.com/firmware/SM-G781B/DBT/G781BXXS5HWD4</a></p>
</li>
<li>
<p>Unzip downloaded file</p>
</li>
</ul>
<pre><code>  $ unzip AP_G781BXXS5HWD4_G781BXXS5HWD4_MQB64445591_REV00_user_low_ship_MULTI_CERT_meta_OS13.tar.md5.zip
</code></pre>
<ul>
<li>Install android-sdk-libsparse-utils and lz4</li>
</ul>
<pre><code>  $ sudo apt install android-sdk-libsparse-utils lz4
</code></pre>
<ul>
<li>Extract sparse image of super partition</li>
</ul>
<pre><code>  $ mkdir AP_G781BXXS5HWD4
  $ cd AP_G781BXXS5HWD4
  $ tar -xvf ../AP_G781BXXS5HWD4_G781BXXS5HWD4_MQB64445591_REV00_user_low_ship_MULTI_CERT_meta_OS13.tar.md5 super.img.lz4
  $ unlz4 super.img.lz4
</code></pre>
<ul>
<li>Convert sparse super image to raw super image</li>
</ul>
<pre><code>  $ simg2img super.img super.img_raw
</code></pre>
<ul>
<li>Build lpunpack from source</li>
</ul>
<pre><code>  $ cd ..
  $ git clone https://github.com/LonelyFool/lpunpack_and_lpmake.git 
  $ cd lpunpack_and_lpmake
  $ ./make.sh
</code></pre>
<ul>
<li>Extract vendor image from raw super image</li>
</ul>
<pre><code>  $ cd AP_G781BXXS5HWD4
  $ mkdir super.img_raw_extracted
  $ ../lpunpack_and_lpmake/bin/lpunpack -p vendor super.img_raw super.img_raw_extracted/
</code></pre>
<ul>
<li>Now we have an Ext4 image</li>
</ul>
<pre><code>  $ file super.img_raw_extracted/vendor.img 
  super.img_raw_extracted/vendor.img: Linux rev 1.0 ext2 filesystem data, UUID=70b6de35-be95-5001-bd80-c63c433cd480, volume name &quot;vendor&quot; (extents) (large files) (huge files)
</code></pre>
<ul>
<li>Mount vendor image to access files</li>
</ul>
<pre><code>  $ mkdir vendor_mounted
  $ sudo mount -o loop super.img_raw_extracted/vendor.img vendor_mounted
  $ mkdir ril_patch
  $ cp vendor_mounted/lib64/libsec-ril.so ril_patch/
  $ cp vendor_mounted/lib64/libsecril-client.so ril_patch/
</code></pre>
<ul>
<li>
<p>Make sure you have MTP, USB debugging and ADB root enabled</p>
</li>
<li>
<p>Connect device via USB and copy ril_patch directory to common storage (mounted as /sdcard)</p>
</li>
<li>
<p>Open ADB shell, become root, make /vendor writeable, replace existing files and reboot</p>
</li>
</ul>
<pre><code>  $ adb shell
  tdgsi_arm64_ab:/ $ su
  :/data/data # mount -o remount,rw /vendor
  :/data/data # cp /sdcard/ril_patch/libsec* /vendor/lib64/
  :/data/data # mount -o remount,ro /vendor
  :/data/data # reboot
</code></pre>
<ul>
<li>After reboot, enter simcard PIN, unlock screen and send SMS from another phone. You should be able to receive SMS now.</li>
</ul>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Upgrade Ubuntu Asahi 23.10 (Mantic) to 24.04 LTS (Noble)]]></title><description><![CDATA[<figure class="kg-card kg-image-card"><img src="http://kernelpanik.net/content/images/2024/03/logo-256-1.png" class="kg-image" alt></figure><p>Few notes on upgrading Ubuntu Asahi from 23.10 (Mantic) to 24.04 LTS (Noble):</p><!--kg-card-begin: markdown--><ul>
<li>Upgrade all available packages:</li>
</ul>
<pre><code>sudo apt update
sudo apt upgrade
</code></pre>
<ul>
<li>Kernel update to 6.8 for Mantic had broken dependencies, so I had to disable this PPA:</li>
</ul>
<pre><code>sudo mv /etc/apt/sources.list.d/john-cabaj-ubuntu-apple-arm-mantic.</code></pre>]]></description><link>http://kernelpanik.net/upgrade-ubuntu-asahi-23-10-mantic-to-24-04-lts-noble/</link><guid isPermaLink="false">662e87890abe170001fd3c12</guid><category><![CDATA[linux]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Sun, 28 Apr 2024 21:24:28 GMT</pubDate><content:encoded><![CDATA[<figure class="kg-card kg-image-card"><img src="http://kernelpanik.net/content/images/2024/03/logo-256-1.png" class="kg-image" alt></figure><p>Few notes on upgrading Ubuntu Asahi from 23.10 (Mantic) to 24.04 LTS (Noble):</p><!--kg-card-begin: markdown--><ul>
<li>Upgrade all available packages:</li>
</ul>
<pre><code>sudo apt update
sudo apt upgrade
</code></pre>
<ul>
<li>Kernel update to 6.8 for Mantic had broken dependencies, so I had to disable this PPA:</li>
</ul>
<pre><code>sudo mv /etc/apt/sources.list.d/john-cabaj-ubuntu-apple-arm-mantic.sources /etc/apt/sources.list.d/john-cabaj-ubuntu-apple-arm-mantic.sources.disabled
</code></pre>
<ul>
<li>Same for libreoffice:</li>
</ul>
<pre><code>sudo apt remove libreoffice-calc libreoffice-draw libreoffice-impress libreoffice-math libreoffice-core libreoffice-writer libreoffice-uiconfig-common
</code></pre>
<ul>
<li>Do the upgrade and keep existing PPAs enabled:</li>
</ul>
<pre><code>sudo do-release-upgrade -d --allow-third-party
</code></pre>
<ul>
<li>
<p>Reboot</p>
</li>
<li>
<p>You should have a running 24.04 system with old kernel 6.6.</p>
</li>
<li>
<p>Enable kernel PPA again:</p>
</li>
</ul>
<pre><code>sudo mv /etc/apt/sources.list.d/john-cabaj-ubuntu-apple-arm-mantic.sources.disabled /etc/apt/sources.list.d/john-cabaj-ubuntu-apple-arm-mantic.sources
</code></pre>
<ul>
<li>Remove asahi PPA in old format:</li>
</ul>
<pre><code>sudo rm /etc/apt/sources.list.d/asahi-ppa.list*
</code></pre>
<ul>
<li>Add asahi and asahi-testing PPA:</li>
</ul>
<pre><code>sudo add-apt-repository ppa:tobhe/asahi
sudo add-apt-repository ppa:tobhe/asahi-testing
</code></pre>
<ul>
<li>Increase priority for asahi PPAs in /etc/apt/preferences.d/asahi:</li>
</ul>
<pre><code>Package: *
Pin: release o=LP-PPA-tobhe-asahi
Pin-Priority: 1001

Package: *
Pin: release o=LP-PPA-tobhe-asahi-testing
Pin-Priority: 1001
</code></pre>
<ul>
<li>Install available updates (kernel 6.8, mesa, pipewire):</li>
</ul>
<pre><code>sudo apt update
sudo apt upgrade
</code></pre>
<ul>
<li>Downgrade u-boot to the version provided by asahi PPA:</li>
</ul>
<pre><code>sudo apt install u-boot-asahi
</code></pre>
<ul>
<li>Delete pd-mapper (which fails during startup anyways):</li>
</ul>
<pre><code>sudo apt remove protection-domain-mapper
</code></pre>
<ul>
<li>
<p>Reboot</p>
</li>
<li>
<p>You should have kernel 6.8 with working OpenGL and sound from built-in speakers.</p>
</li>
<li>
<p>Check if OpenGL works:</p>
</li>
</ul>
<pre><code>$ glxinfo | grep -i opengl
OpenGL vendor string: Mesa
OpenGL renderer string: Apple M2 Pro (G14S B1)
...
</code></pre>
<ul>
<li>
<p>Go to Gnome system settings / sound and select &quot;MacBook Pro J414 Speakers&quot;. Increase volume to see if sound works.</p>
</li>
<li>
<p>Disable cloud-init (not required on desktop installations):</p>
</li>
</ul>
<pre><code>sudo touch /etc/cloud/cloud-init.disabled
</code></pre>
<!--kg-card-end: markdown--><h3 id="todo">TODO</h3><!--kg-card-begin: markdown--><ul>
<li>Find workaround for 2-3 min boot delay:</li>
</ul>
<pre><code>...
Apr 26 13:50:58 where systemd-networkd[1851]: lo: Link UP
Apr 26 13:50:58 where systemd-networkd[1851]: lo: Gained carrier
Apr 26 13:50:58 where systemd-networkd[1851]: Enumeration completed
Apr 26 13:50:58 where systemd-networkd[1851]: eth0: Could not process link message: No such device or address
Apr 26 13:50:58 where systemd-networkd[1851]: eth0: Failed
Apr 26 13:50:58 where systemd[1]: Started systemd-networkd.service - Network Configuration.
Apr 26 13:50:58 where systemd[1]: Starting systemd-networkd-wait-online.service - Wait for Network to be Configured...
...
</code></pre>
<ul>
<li>Investigate why reboot hangs with black screen.</li>
</ul>
<!--kg-card-end: markdown--><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Ubuntu Asahi on MacBook Pro (14" M2 Pro, Model j414)]]></title><description><![CDATA[<figure class="kg-card kg-image-card"><img src="http://kernelpanik.net/content/images/2024/03/logo-256-1.png" class="kg-image" alt></figure><p><strong>2024-04-28 Update:</strong> I upgraded to my existing 23.10 (Mantic) installation to 24.04 LTS (Noble). See upgrade notes here: <a href="http://kernelpanik.net/upgrade-ubuntu-asahi-23-10-mantic-to-24-04-lts-noble/">https://kernelpanik.net/upgrade-ubuntu-asahi-23-10-mantic-to-24-04-lts-noble/</a></p><p>A quick personal summary on using <a href="https://ubuntuasahi.org/">Ubuntu Asahi</a> on a MacBook Pro (14" M2 Pro, Model j414) with arm64 CPU.</p><h3 id="what-i-need-and-works">What I need and works</h3><ul><li>OpenGL</li></ul>]]></description><link>http://kernelpanik.net/ubuntu-asahi-on-macbook-pro-j414/</link><guid isPermaLink="false">65f7fa020abe170001fd3b4e</guid><category><![CDATA[linux]]></category><category><![CDATA[ubuntu]]></category><category><![CDATA[arm64]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Mon, 18 Mar 2024 08:51:00 GMT</pubDate><content:encoded><![CDATA[<figure class="kg-card kg-image-card"><img src="http://kernelpanik.net/content/images/2024/03/logo-256-1.png" class="kg-image" alt></figure><p><strong>2024-04-28 Update:</strong> I upgraded to my existing 23.10 (Mantic) installation to 24.04 LTS (Noble). See upgrade notes here: <a href="http://kernelpanik.net/upgrade-ubuntu-asahi-23-10-mantic-to-24-04-lts-noble/">https://kernelpanik.net/upgrade-ubuntu-asahi-23-10-mantic-to-24-04-lts-noble/</a></p><p>A quick personal summary on using <a href="https://ubuntuasahi.org/">Ubuntu Asahi</a> on a MacBook Pro (14" M2 Pro, Model j414) with arm64 CPU.</p><h3 id="what-i-need-and-works">What I need and works</h3><ul><li>OpenGL 4.6 and OpenGL ES 3.2</li><li>Internal speakers</li><li>Additional USB3 ports, RJ45 Ethernet via USB-C hub</li><li>Internal HDMI</li><li>Internal card reader</li><li>Wifi and Bluetooth</li><li>Screen brightness and keyboard backlight control</li></ul><h3 id="what-i-need-and-doesn-t-work-yet">What I need and doesn't work yet</h3><ul><li>DisplayPort / HDMI via USB-C adapters / hubs (workaround: DisplayLink dock via USB and DisplayLink/evdi driver)</li><li>Thunderbolt / USB4 (for proper Thunderbolt dock to connect multiple screens without DisplayLink)</li><li>Working Widevine plugin in Firefox (snap): Glibc version in "core22" base snap is too old (workaround: use non-snap Firefox or wait for future Firefox snap to be based on "core24")</li><li>Updated mesa (for OpenGL ES) in Firefox (workaround: use non-snap Firefox or install 'gnome-42-2204' snap package of "asahi/stable" channel)</li></ul><h3 id="what-i-don-t-really-need">What I don't really need</h3><ul><li>Internal microphone (I use a Bluetooth headset)</li><li>Fingerprint sensor</li><li>HDR / 120 Hz refresh rate</li></ul>]]></content:encoded></item><item><title><![CDATA[Fixing broken file upload after occ files:scan]]></title><description><![CDATA[<p>In order to organize an ownCloud upload folder with lots of files, I created new folders for each year manually on the server and moved files over in the terminal.<br>Of course ownCloud didn't know about those moved files and still expected them to be at their original location afterwards.</p>]]></description><link>http://kernelpanik.net/untitled/</link><guid isPermaLink="false">65f7c2020abe170001fd3ad3</guid><category><![CDATA[linux]]></category><category><![CDATA[owncloud]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Mon, 18 Mar 2024 04:40:19 GMT</pubDate><content:encoded><![CDATA[<p>In order to organize an ownCloud upload folder with lots of files, I created new folders for each year manually on the server and moved files over in the terminal.<br>Of course ownCloud didn't know about those moved files and still expected them to be at their original location afterwards.</p><!--kg-card-begin: markdown--><p>In order to make the moved files known to ownCloud, I ran file:scan for each new folder:</p>
<pre><code>sudo -u nginx php /var/www/owncloud/occ files:scan -p /myuser/upload/2022 -v
</code></pre>
<p>And in order to get rid of the old file references, I ran the same command with the repair option for the parent folder:</p>
<pre><code>sudo -u nginx php /var/www/owncloud/occ files:scan -p /myuser/upload -v --repair
</code></pre>
<!--kg-card-end: markdown--><p>This worked so far, but for some reason I wasn't able to upload additional files into those year specific folders. File permissions on the server seem to be correct, to I checked the <em>oc_filecache</em> table in the DB.<br>It turned out that the records for the folders hat column <strong>permissions = 17</strong> (read access) while originally created folders in ownCloud had <strong>permissions = 31</strong>.</p><p>Changing the records for those folder records into <strong>permissions = 31 </strong>fixed the file upload problem.</p>]]></content:encoded></item><item><title><![CDATA[MicroVMs on Ubuntu Asahi using krunvm]]></title><description><![CDATA[<p>Based on slp's <a href="https://sinrega.org/2023-10-06-using-microvms-for-gaming-on-fedora-asahi/">Using microVMs for Gaming on Fedora Asahi</a> I tried to get things running on Ubuntu 23.04.</p><p>There is no PPA for this yet (afaik), so we'll have to build stuff manually here.</p><h2 id="preparations">Preparations</h2><!--kg-card-begin: markdown--><ol>
<li>mesa (required for native-context support)</li>
</ol>
<pre><code># clone Git repo and check out branch
$ git</code></pre>]]></description><link>http://kernelpanik.net/microvms-on-ubuntu-using-krun/</link><guid isPermaLink="false">653eb4ce0abe170001fd39dc</guid><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Sun, 29 Oct 2023 23:48:35 GMT</pubDate><content:encoded><![CDATA[<p>Based on slp's <a href="https://sinrega.org/2023-10-06-using-microvms-for-gaming-on-fedora-asahi/">Using microVMs for Gaming on Fedora Asahi</a> I tried to get things running on Ubuntu 23.04.</p><p>There is no PPA for this yet (afaik), so we'll have to build stuff manually here.</p><h2 id="preparations">Preparations</h2><!--kg-card-begin: markdown--><ol>
<li>mesa (required for native-context support)</li>
</ol>
<pre><code># clone Git repo and check out branch
$ git clone https://gitlab.freedesktop.org/slp/mesa.git mesa_slp
$ cd mesa_slp
$ git checkout asahi-native-context

# build
$ mkdir build
$ cd build
$ meson -D gallium-drivers=&quot;swrast,virgl,asahi&quot; ..
$ ninja

# install to /usr/local
$ sudo ninja install
</code></pre>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><ol start="2">
<li>virglrenderer (required for native-context support)</li>
</ol>
<pre><code># clone Git repo and check out branch
$ git clone https://gitlab.freedesktop.org/slp/virglrenderer.git virglrenderer_slp
$ cd virglrenderer_slp
$ git checkout asahi-native-context

# build
$ meson -D drm-msm-experimental=True -D drm-asahi-experimental=True build
$ cd build
$ ninja

# install to /usr/local
$ sudo ninja install
</code></pre>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><ol start="3">
<li>libkrunfw (dependency of libkrun)</li>
</ol>
<pre><code># clone Git repo
$ git clone https://github.com/containers/libkrunfw.git

# install pyelftools
$ sudo apt install python3-pyelftools

# build
$ make

# install
$ sudo make install
</code></pre>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><ol start="4">
<li>libkrun (dependency of krunvm)</li>
</ol>
<pre><code># clone Git repo (slp's fork for now) and check out branch
$ git clone https://github.com/slp/libkrun.git libkrun_slp
$ cd libkrun_slp
$ git checkout virtio-gpu
</code></pre>
<p>We have make these changes to expose the gpu feature and link libkrunfw from /usr/local/lib64:</p>
<pre><code>$ git diff
diff --git a/Makefile b/Makefile
index 7233ab0..81955ad 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,9 @@ endif
 ifeq ($(NET),1)
     FEATURE_FLAGS += --features net
 endif
-
+ifeq ($(GPU),1)
+    FEATURE_FLAGS += --features gpu
+endif
 ifeq ($(ROSETTA),1)
     INIT_DEFS += -D__ROSETTA__
 endif
diff --git a/src/libkrun/build.rs b/src/libkrun/build.rs
index ce74b29..5dadd61 100644
--- a/src/libkrun/build.rs
+++ b/src/libkrun/build.rs
@@ -7,4 +7,6 @@ fn main() {
     println!(&quot;cargo:rustc-link-lib=krunfw&quot;);
     #[cfg(feature = &quot;tee&quot;)]
     println!(&quot;cargo:rustc-link-lib=krunfw-sev&quot;);
+
+    println!(&quot;cargo:rustc-link-arg=-L/usr/local/lib64&quot;);
 }
</code></pre>
<pre><code># install dependencies
$ sudo apt install libepoxy-dev libvirglrenderer-dev patchelf

# build
make GPU=1

# install
$ sudo make install
</code></pre>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><ol start="5">
<li>krunvm</li>
</ol>
<pre><code># clone Git repo
$ git clone https://github.com/containers/krunvm.git
$ cd krunvm

# install asciidoctor
$ sudo apt install asciidoctor
</code></pre>
<p>We have to make these changes to link libkrunfw from /usr/local/lib64 and fix a Rust type error:</p>
<pre><code>diff --git a/build.rs b/build.rs
index d7a571a..e1b86e2 100644
--- a/build.rs
+++ b/build.rs
@@ -28,6 +28,9 @@ fn main() {
 
     #[cfg(target_os = &quot;macos&quot;)]
     println!(&quot;cargo:rustc-link-search=/opt/homebrew/lib&quot;);
+
+    println!(&quot;cargo:rustc-link-arg=-L/usr/local/lib64&quot;);
+    println!(&quot;cargo:rustc-link-lib=krunfw&quot;);
 }
 
 fn generate_man_page&lt;P: AsRef&lt;Path&gt;&gt;(outdir: P, command: &amp;str) -&gt; io::Result&lt;()&gt; {
diff --git a/src/start.rs b/src/start.rs
index 7dc5f02..aefef28 100644
--- a/src/start.rs
+++ b/src/start.rs
@@ -91,7 +91,7 @@ unsafe fn exec_vm(vmcfg: &amp;VmConfig, rootfs: &amp;str, cmd: Option&lt;&amp;str&gt;, args: Vec&lt;C
         let map = format!(&quot;{}:{}&quot;, host_port, guest_port);
         ports.push(CString::new(map).unwrap());
     }
-    let mut ps: Vec&lt;*const i8&gt; = Vec::new();
+    let mut ps: Vec&lt;*const u8&gt; = Vec::new();
     for port in ports.iter() {
         ps.push(port.as_ptr());
     }
@@ -113,10 +113,10 @@ unsafe fn exec_vm(vmcfg: &amp;VmConfig, rootfs: &amp;str, cmd: Option&lt;&amp;str&gt;, args: Vec&lt;C
 
     let hostname = CString::new(format!(&quot;HOSTNAME={}&quot;, vmcfg.name)).unwrap();
     let home = CString::new(&quot;HOME=/root&quot;).unwrap();
-    let env: [*const i8; 3] = [hostname.as_ptr(), home.as_ptr(), std::ptr::null()];
+    let env: [*const u8; 3] = [hostname.as_ptr(), home.as_ptr(), std::ptr::null()];
 
     if let Some(cmd) = cmd {
-        let mut argv: Vec&lt;*const i8&gt; = Vec::new();
+        let mut argv: Vec&lt;*const u8&gt; = Vec::new();
         for a in args.iter() {
             argv.push(a.as_ptr());
         }
</code></pre>
<pre><code># build
$ cargo build --release

# run
$ LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib/aarch64-linux-gnu target/release/krunvm
</code></pre>
<!--kg-card-end: markdown--><h2 id="testing">Testing</h2><pre><code># install buildah
$ sudo apt install buildah

# create user namespace
$ buildah unshare

# create VM
# LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib/aarch64-linux-gnu target/release/krunvm create --cpus 6 --mem 6144 --name asahi-krun quay.io/slopezpa/asahi-krun
Trying to pull quay.io/slopezpa/asahi-krun:latest...
Getting image source signatures
Copying blob 3357a5ee36de done  
Copying config eb0f8b2ca1 done  
Writing manifest to image destination
microVM created with name: asahi-krun

# start VM
# LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib/aarch64-linux-gnu target/release/krunvm start asahi-krun
chown: cannot access '/dev/dri/*': No such file or directory
chown: cannot access '/dev/snd/*': No such file or directory
chmod: cannot access '/dev/dri/*': No such file or directory
failed to open virtgpu
error: could not initialize wayland channel: No such file or directory
</code></pre><p>Seems like we still need to tell krunvm to use our custom <a href="https://gitlab.freedesktop.org/slp/virglrenderer/-/commits/asahi-native-context?ref_type=heads">virglrenderer</a> and <a href="https://gitlab.freedesktop.org/slp/mesa/-/commits/asahi-native-context">mesa</a> to make this work. Stay tuned!</p>]]></content:encoded></item><item><title><![CDATA[OpenZFS 2.2 on Ubuntu Asahi / Ubuntu 23.04]]></title><description><![CDATA[<p>The <a href="https://ubuntuasahi.org/">Ubuntu Asahi</a> flavor of Ubuntu 23.04 (Lunar) includes kernel version 6.5 from Ubuntu 23.10 (Mantic), with the Asahi-specific patches applied on top (for the stuff that hasn't been upstreamed yet).</p><p>That kernel already brings ZFS 2.2.0~rc3 and there is also a <a href="https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/2040181">ticket for</a></p>]]></description><link>http://kernelpanik.net/openzfs-2-2-on-ubuntu-asahi-ubuntu-23-04/</link><guid isPermaLink="false">65342d0d0abe170001fd3943</guid><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Mon, 23 Oct 2023 08:18:33 GMT</pubDate><content:encoded><![CDATA[<p>The <a href="https://ubuntuasahi.org/">Ubuntu Asahi</a> flavor of Ubuntu 23.04 (Lunar) includes kernel version 6.5 from Ubuntu 23.10 (Mantic), with the Asahi-specific patches applied on top (for the stuff that hasn't been upstreamed yet).</p><p>That kernel already brings ZFS 2.2.0~rc3 and there is also a <a href="https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/2040181">ticket for updating the version to the 2.2.0 release</a>.</p><p>How do we get ZFS 2.2 userland into Ubuntu 23.04? We could install <a href="https://packages.ubuntu.com/mantic/zfsutils-linux">packages from 23.10</a>, but that will likely cause dependency problems.</p><p>So let's build the packages ourselves instead (until somebody creates a PPA):</p><!--kg-card-begin: markdown--><pre><code># get sources and switch to 2.2 release
$ git clone https://github.com/openzfs/zfs
$ git checkout zfs-2.2-release

# workaround for some crypto functionality that is marked as GPL-only on arm64
$ sed -i 's/CDDL/GPL/' META

# build
$ sh autogen.sh
$ ./configure
$ make native-deb-utils

# install
$ sudo apt install ../openzfs-libuutil3_2.2.0-0_arm64.deb 
$ sudo apt install ../openzfs-libnvpair3_2.2.0-0_arm64.deb 
$ sudo apt install ../openzfs-libzfs4_2.2.0-0_arm64.deb 
$ sudo apt install ../openzfs-libzpool5_2.2.0-0_arm64.deb 
$ sudo apt install ../openzfs-libzfsbootenv1_2.2.0-0_arm64.deb 
$ sudo apt install ../openzfs-libpam-zfs_2.2.0-0_arm64.deb 
$ sudo apt install ../openzfs-zfsutils_2.2.0-0_arm64.deb
</code></pre>
<!--kg-card-end: markdown--><p>Don't install <code>openzfs-zfs-dkms_2.2.0-0_all.deb</code>, as it conflicts with the built-in ZFS driver in the Ubuntu kernel, resulting in apt trying to remove the kernel and module packages which would break your system. </p>]]></content:encoded></item><item><title><![CDATA[Access to macOS recovery OS files from Linux]]></title><description><![CDATA[<p>There might be the need to fetch some files which contain firmware from the recovery OS partition, without booting into macOS.</p><p>Fortunately, we can mount APFS volumes read-only on Linux using apfs-fuse.</p><!--kg-card-begin: markdown--><ol>
<li>Install apfs-fuse from <a href="https://github.com/sgan81/apfs-fuse">https://github.com/sgan81/apfs-fuse</a> (follow README.md)</li>
<li>Create mountpoint for recovery volume and recovery</li></ol>]]></description><link>http://kernelpanik.net/access-to-macos-recovery-os-files-from-linux/</link><guid isPermaLink="false">6528f50b0abe170001fd3839</guid><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Fri, 13 Oct 2023 08:30:29 GMT</pubDate><content:encoded><![CDATA[<p>There might be the need to fetch some files which contain firmware from the recovery OS partition, without booting into macOS.</p><p>Fortunately, we can mount APFS volumes read-only on Linux using apfs-fuse.</p><!--kg-card-begin: markdown--><ol>
<li>Install apfs-fuse from <a href="https://github.com/sgan81/apfs-fuse">https://github.com/sgan81/apfs-fuse</a> (follow README.md)</li>
<li>Create mountpoint for recovery volume and recovery OS:</li>
</ol>
<pre><code>$ sudo mkdir /mnt/macos_recovery /mnt/macos_recovery_base
</code></pre>
<ol start="3">
<li>Get partition ID of recovery OS:</li>
</ol>
<pre><code>$ sudo parted /dev/nvme0n1 print
Model: APPLE SSD AP1024Z (nvme)
Disk /dev/nvme0n1: 1001GB
Sector size (logical/physical): 4096B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 1      24.6kB  524MB   524MB                iBootSystemContainer
 2      524MB   104GB   103GB                Container
 3      104GB   106GB   2500MB
 4      106GB   107GB   500MB   fat32                              boot, esp
 5      107GB   178GB   71.2GB  ext4
 6      178GB   186GB   7999MB
 7      186GB   995GB   809GB
 8      995GB   1001GB  5369MB               RecoveryOSContainer
</code></pre>
<p>/dev/nvme0n1p8 contains the recovery OS</p>
<ol start="4">
<li>Get volumne ID of revovery OS:</li>
</ol>
<pre><code>$ sudo ./apfsutil /dev/nvme0n1p8
Volume 0 AB2E78ED-A2C3-4A5E-86F3-XXXXXXXXXXXX
---------------------------------------------
Role:               Recovery
Name:               Recovery (Case-insensitive)
Capacity Consumed:  789880832 Bytes
FileVault:          No
Snapshots:
    27 : 'com.apple.os.update-MSUPrepareUpdate'

Volume 1 90A1160E-1599-4084-8253-XXXXXXXXXXXX
---------------------------------------------
Role:               Update
Name:               Update (Case-insensitive)
Capacity Consumed:  28672 Bytes
FileVault:          No
Snapshots:
</code></pre>
<p>Volume 0 contains the recovery OS</p>
<ol start="5">
<li>Mount recovery OS volume:</li>
</ol>
<pre><code>$ sudo ./apfs-fuse -o allow_other /dev/nvme0n1p8 /mnt/macos_recovery
</code></pre>
<ol start="6">
<li>Locate recovery OS base image:</li>
</ol>
<pre><code>$ ls -lh /mnt/macos/root/3D3287DE-280D-4619-AAAB-XXXXXXXXXXXX/boot/DE46A95A1728513B090F8135841CCFBB324C94445632466B5C74F73634DB567975968FCB14E2E9C048CXXXXXXXXXXXX/usr/standalone/firmware/
total 0
drwxrwxrwx 1 root root   14 Mar 22  2023 FUD
-rw-rw-rw- 1 root root 1.7G Mar 22  2023 arm64eBaseSystem.dmg
-rw-rw-rw- 1 root root  11K Mar 22  2023 base_system_root_hash.img4
-rw-rw-rw- 1 root root  61K Mar 22  2023 devicetree.img4
-rw-rw-rw- 1 root root 847K Mar 22  2023 iBoot.img4
-rw-rw-rw- 1 root root  11K Mar 22  2023 root_hash.img4
-rw-rw-rw- 1 root root 6.0M Mar 22  2023 sep-firmware.img4
</code></pre>
<p>arm64eBaseSystem.dmg contains the system files of recovery OS</p>
<ol start="7">
<li>Mount base image:</li>
</ol>
<pre><code>$ sudo ./apfs-fuse -o allow_other /mnt/macos/root/3D3287DE-280D-4619-AAAB-XXXXXXXXXXXX/boot/DE46A95A1728513B090F8135841CCFBB324C94445632466B5C74F73634DB567975968FCB14E2E9C048CXXXXXXXXXXXX/usr/standalone/firmware/arm64eBaseSystem.dmg /mnt/macos_recovery_base
</code></pre>
<ol start="8">
<li>Access files from base image:</li>
</ol>
<pre><code>$ ls -lh /mnt/macos_recovery_base/root/
total 0
drwxrwxr-x 1 root   80  3 Feb  9  2023  Applications
drwxr-xr-x 1 root root  1 Feb  9  2023 'Install macOS Ventura.app'
lrwxr-xr-x 1 root   80  0 Feb  9  2023  Library -&gt; System/Volumes/Data/Library
drwxr-xr-x 1 root   80  8 Feb  9  2023  System
lrwxr-xr-x 1 root   80  0 Feb  9  2023  Users -&gt; System/Volumes/Data/Users
drwxr-xr-x 1 root root  0 Feb  9  2023  Volumes
drwxr-xr-x 1 root root 33 Feb  9  2023  bin
lrwxr-xr-x 1 root   80  0 Feb  9  2023  cores -&gt; System/Volumes/Data/cores
dr-xr-xr-x 1 root root  0 Feb  9  2023  dev
lrwxr-xr-x 1 root root  0 Feb  9  2023  etc -&gt; private/etc
lrwxr-xr-x 1 root   80  0 Feb  9  2023  opt -&gt; System/Volumes/Data/opt
lrwxr-xr-x 1 root   80  0 Feb  9  2023  private -&gt; System/Volumes/Data/private
drwxr-xr-x 1 root root 61 Feb  9  2023  sbin
lrwxr-xr-x 1 root root  0 Feb  9  2023  tmp -&gt; private/tmp
drwxr-xr-x 1 root   80  6 Feb  9  2023  usr
lrwxr-xr-x 1 root root  0 Feb  9  2023  var -&gt; private/var
</code></pre>
<ol start="9">
<li>Get for example /usr/sbin/appleh13camerad which contains camera calibration files:</li>
</ol>
<pre><code>$ cp /mnt/macos_recovery_base/root/usr/sbin/appleh13camerad ~/
</code></pre>
<ol start="10">
<li>Umount base image and recovery OS volume:</li>
</ol>
<pre><code>$ sudo umount /mnt/macos_recovery_base /mnt/macos_recovery
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Android GSI on Samsung Galaxy S20 FE 5G]]></title><description><![CDATA[<figure class="kg-card kg-image-card"><img src="http://kernelpanik.net/content/images/2022/05/s20fe5g-2.png" class="kg-image" alt></figure><p><strong>Update 2024-05-16:</strong> This guide below should still work, but I recently updated to newer versions of everything, so you might also want to check out <a href="http://kernelpanik.net/updating-vendor-firmware-and-lineageos-gsi-on-samsung-galaxy-s20-fe-5g/">https://kernelpanik.net/updating-vendor-firmware-and-lineageos-gsi-on-samsung-galaxy-s20-fe-5g/</a></p><p>In order to overcome the Samsung stock image with all its built-in and hard to remove bloat, I became interested in</p>]]></description><link>http://kernelpanik.net/gsi-on-samsung-galaxy-s20-fe-5g/</link><guid isPermaLink="false">6277fedc6f48f00001b42f36</guid><category><![CDATA[android]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Sun, 08 May 2022 17:41:03 GMT</pubDate><content:encoded><![CDATA[<figure class="kg-card kg-image-card"><img src="http://kernelpanik.net/content/images/2022/05/s20fe5g-2.png" class="kg-image" alt></figure><p><strong>Update 2024-05-16:</strong> This guide below should still work, but I recently updated to newer versions of everything, so you might also want to check out <a href="http://kernelpanik.net/updating-vendor-firmware-and-lineageos-gsi-on-samsung-galaxy-s20-fe-5g/">https://kernelpanik.net/updating-vendor-firmware-and-lineageos-gsi-on-samsung-galaxy-s20-fe-5g/</a></p><p>In order to overcome the Samsung stock image with all its built-in and hard to remove bloat, I became interested in GSI (<a href="https://developer.android.com/topic/generic-system-image/">General System Image</a>) aka Treble, which is a way to provide an up-to-date Android userland on top of vendor-provided kernel &amp; firmware blobs.</p><p>Security-wise it's often a compromise. <br>Any vulnerabilities in the Android libraries and applications can be quickly fixed by updating just the GSI or the individual apps.</p><p>However, kernel vulnerabilities will not be fixed by updating the GSI.<br>That requires updates to the vendor partition. This is something that has to be taken from the stock images every once in a while (more to write on that in another post).<br>If a hardware manufacturer stops updating their stock images for your perhaps older phone, then you have to decide whether to take the risk. New Android on ancient Linux kernel.</p><p><strong>Disclaimer:</strong> The description below worked for me, but there is always a chance that something doesn't work for you. I'm not responsible for turning your phone into a brick.</p><h2 id="backup-your-data">Backup your data</h2><p>The whole phone will be wiped, so backup all your data as a first step.<br>Also check that your backup actually includes everything, for example photos, contacts, SMS, downloads, documents.</p><h2 id="unlock-bootloader">Unlock bootloader</h2><p>Follow the guide on <a href="https://www.hardreset.info/devices/samsung/samsung-galaxy-s20-fe/faq/bootloader-unlock/samsung-bootloader/">https://www.hardreset.info/devices/samsung/samsung-galaxy-s20-fe/faq/bootloader-unlock/samsung-bootloader/</a> to unlock your bootloader.</p><h2 id="ingredients">Ingredients</h2><p>First you should get all these required files, so you have them at hand when you need them.</p><h3 id="stock-image">Stock image </h3><p>As mentioned above, the Linux kernel comes from the vendor partition of the stock image. So in order to have a good starting point, you should update to the latest image version for the Galaxy S20 FE 5G, which was for me "G781BXXU4FVC4" (includes kernel 4.19.113-23739069, built 2022-03-28, vendor security update 2022-04-01).</p><p>Download the stock image from <a href="https://samfw.com/firmware/SM-G781B">https://samfw.com/firmware/SM-G781B</a><br>Double check your model and choose the required country version.</p><h3 id="android-platform-tools-adb-fastboot-">Android platform tools (adb, fastboot)</h3><p>Download from <a href="https://developer.android.com/studio/releases/platform-tools">https://developer.android.com/studio/releases/platform-tools</a></p><p>I used version 33.0.1.</p><h3 id="twrp">TWRP</h3><p>The recovery image can be downloaded from <a href="https://androidfilehost.com/?w=files&amp;flid=319768">https://androidfilehost.com/?w=files&amp;flid=319768</a></p><p>I used twrp-3.6.0_11-6_afaneh92-r8q.tar.</p><h3 id="vbmeta-disabled">Vbmeta Disabled</h3><p>It's required to disable the Android Verified Boot (AVB).<br>See for more details: <a href="https://wiki.postmarketos.org/wiki/Android_Verified_Boot_(AVB)">https://wiki.postmarketos.org/wiki/Android_Verified_Boot_(AVB)</a></p><p>Download from <a href="https://forum.xda-developers.com/attachments/vbmeta_disabled_r-tar.5236537/?hash=f7249adaefe16f3aeac3256a63063f0a">https://forum.xda-developers.com/attachments/vbmeta_disabled_r-tar.5236537/?hash=f7249adaefe16f3aeac3256a63063f0a</a></p><h3 id="gsi-image">GSI image</h3><p>In theory you can use any GSI, but I would suggest to use either PHH AOSP, which is kind of the reference GSI, or LineageOS GSI, which is based on PHH AOSP.</p><p>LineageOS 19.1, lineage-19.1-20220410-UNOFFICIAL-arm64_bvS.img (Android 12, security update 2022-04-05)<br><a href="https://sourceforge.net/projects/andyyan-gsi/files/lineage-19.x/">https://sourceforge.net/projects/andyyan-gsi/files/lineage-19.x/</a></p><p>PHH AOSP 12.1 v412, system-squeak-arm64-ab-vanilla.img (Android 12, security update 2022-04-05)<br><a href="https://github.com/phhusson/treble_experimentations/releases/tag/v412">https://github.com/phhusson/treble_experimentations/releases/tag/v412</a></p><h2 id="update-to-lastest-stock-image">Update to lastest stock image</h2><p>Use <a href="https://odindownload.com/download/Odin3_v3.14.1.zip">ODIN</a> on a Windows VM with the <a href="https://developer.samsung.com/mobile/android-usb-driver.html">Samsung USB drivers</a> installed. Boot the phone into download mode (hold volume up + down + power).</p><p>Under "Options", disable "Auto Reboot" in ODIN. </p><p>Extract the downloaded ZIP file of the stock image.<br>Flash each component (BL, AP, CP, CSC) in ODIN.<br>I had to reboot into download mode each time after one component was flashed.</p><p>After you are done with CSC, boot again into download mode. </p><h2 id="flash-vbmeta-disabled">Flash Vbmeta Disabled</h2><p>In ODIN, put Vbmeta Disabled file in AP slot and flash.</p><p>Reboot phone. It should go into stock recovery and prompt you to wipe it. Proceed and boot again into download mode.</p><h2 id="flash-twrp">Flash TWRP</h2><p>In ODIN, put the TWRP file in AP slot and flash.</p><p>Reboot phone into TWRP recovery (hold volume up + power).</p><p>Reboot phone into fastboot mode through TWRP restart menu.</p><h2 id="delete-product-partition">Delete product partition</h2><p>Phones with dynamic super partitions don't provide enough space for the system partition of GSI images.</p><p>You can safely delete the product partition. It's not needed and can be re-created in case you want to go back to stock image.</p><pre><code>$ fastboot delete-logical-partition product
Deleting 'product'           OKAY [  0.007s]
Finished. Total time: 0.007s</code></pre><h2 id="flash-gsi-image">Flash GSI image</h2><p>Flash the GSI image to the system partition:</p><pre><code>$ fastboot flash system system-squeak-arm64-ab-vanilla.img
Invalid sparse file format at header magic
Resizing 'system'                          OKAY [  0.003s]
Sending sparse 'system' 1/7 (262108 KB)    OKAY [  9.835s]
Writing 'system'                           OKAY [  0.533s]
Sending sparse 'system' 2/7 (262124 KB)    OKAY [  9.831s]
Writing 'system'                           OKAY [  0.465s]
Sending sparse 'system' 3/7 (262116 KB)    OKAY [  9.924s]
Writing 'system'                           OKAY [  0.468s]
Sending sparse 'system' 4/7 (262120 KB)    OKAY [  9.753s]
Writing 'system'                           OKAY [  0.495s]
Sending sparse 'system' 5/7 (262084 KB)    OKAY [  9.197s]
Writing 'system'                           OKAY [  0.520s]
Sending sparse 'system' 6/7 (262124 KB)    OKAY [  9.028s]
Writing 'system'                           OKAY [  0.468s]
Sending sparse 'system' 7/7 (160776 KB)    OKAY [  5.456s]
Writing 'system'                           OKAY [  0.356s]
Finished. Total time: 68.455s</code></pre><p>Reboot to recovery:</p><pre><code>$ fastboot reboot recovery</code></pre><h2 id="format-data">Format data</h2><p>In TWRP, format the data partition.</p><h2 id="reboot">Reboot</h2><p>Now you should be done. The expected boot animation for your selected GSI should show up.</p><h2 id="phh-treble-settings">PHH Treble Settings</h2><p>I had to enable these options after the first boot:</p><ul><li>Enable extended brightness</li><li>Enable all cameras</li></ul>]]></content:encoded></item><item><title><![CDATA[OpenZFS 2.x on Ubuntu 20.04 LTS]]></title><description><![CDATA[<p>On 30 Nov 2020, OpenZFS version 2.0 has been released with plenty of new features and performance improvements: <a href="https://github.com/openzfs/zfs/releases/tag/zfs-2.0.0">https://github.com/openzfs/zfs/releases/tag/zfs-2.0.0</a></p><p>Ubuntu Linux 20.04 LTS normally comes with kernel 5.4, with built-in ZFS version 0.8.3 (released Jan 23,</p>]]></description><link>http://kernelpanik.net/openzfs-2-x-on-ubuntu-20-04-lts/</link><guid isPermaLink="false">60d393083bd6590001b204d7</guid><category><![CDATA[linux]]></category><category><![CDATA[storage]]></category><category><![CDATA[zfs]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Wed, 23 Jun 2021 20:59:37 GMT</pubDate><content:encoded><![CDATA[<p>On 30 Nov 2020, OpenZFS version 2.0 has been released with plenty of new features and performance improvements: <a href="https://github.com/openzfs/zfs/releases/tag/zfs-2.0.0">https://github.com/openzfs/zfs/releases/tag/zfs-2.0.0</a></p><p>Ubuntu Linux 20.04 LTS normally comes with kernel 5.4, with built-in ZFS version 0.8.3 (released Jan 23, 2020). Of course that's stable, but also quite old already.</p><p>Ubuntu also provides more recent kernel versions by using their HWE (<code>linux-generic-hwe-20.04</code>) and HWE Edge (<code>linux-generic-hwe-20.04-edge</code>) packages. For better support of modern hardware, you should use those kernel versions. Latest version so far was 5.8, but still with ZFS 0.8.4 (released May 12, 2020).</p><p>On 18 Jun 2021, <code>linux-generic-hwe-20.04-edge</code> has been updated to kernel 5.11 (5.11.0.22.23~20.04.6), which includes ZFS 2.0.2-1ubuntu5 kernel modules. Not the latest 2.x release to date, but that will surely come soon.</p><p>Now the only problem is that the ZFS tools included in package <code>zfsutils-linux</code> are still on version 0.8.3-1ubuntu12.9. So even if a newer kernel module version is installed, new functionality is not fully accessible.</p><p>Fortunately, <a href="https://ko-fi.com/post/ZFS-2-0-0-for-Ubuntu-18-04-and-20-04-B0B22VH0W">Jonathon F</a> provides newer ZFS packages in this PPA: <a href="https://launchpad.net/~jonathonf/+archive/ubuntu/zfs?field.series_filter=focal">https://launchpad.net/~jonathonf/+archive/ubuntu/zfs?field.series_filter=focal</a></p><p>After adding the PPA, the newer ZFS tools (2.0.4, released Mar 9, 2021) can be installed via <code>apt update &amp;&amp; apt upgrade</code>. Nice.</p>]]></content:encoded></item><item><title><![CDATA[Install OpenZFS on Amazon Linux 2]]></title><description><![CDATA[Install OpenZFS on Amazon Linux 2]]></description><link>http://kernelpanik.net/install-openzfs-on-amazon-linux-2/</link><guid isPermaLink="false">5fa802e20bc30e00015961b5</guid><category><![CDATA[linux]]></category><category><![CDATA[zfs]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Sun, 08 Nov 2020 14:51:44 GMT</pubDate><content:encoded><![CDATA[<p><a href="https://github.com/openzfs/zfs">OpenZFS</a> (aka ZFS on Linux) supports different Linux distributions, but Amazon Linux 2 isn't mentioned in the documentation. As the OS is quite close to CentOS / RHEL, you can just follow the steps here: <a href="https://openzfs.github.io/openzfs-docs/Getting%20Started/RHEL%20and%20CentOS.html">https://openzfs.github.io/openzfs-docs/Getting Started/RHEL and CentOS.html</a></p><p>However, the OS package names (and versions) seem to be closer to CentOS 7 than 8, so you have to install the release RPM for CentOS 7.8:</p><!--kg-card-begin: markdown--><pre><code>$ sudo yum install http://download.zfsonlinux.org/epel/zfs-release.el7_8.noarch.rpm
$ sudo yum install &quot;kernel-devel-uname-r == $(uname -r)&quot; zfs
$ sudo modprobe zfs
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[IoT insecurity by example]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Apexis is a known manufacturer of IP cameras. Other companies like Logilink, Foscam or Denver also sell branded IP cameras which are based on the same hardware design and firmware contents.</p>
<p>These IP cameras have some insecurity specialties:</p>
<ul>
<li>UPNP is active by default for enabling port-forwarding of port 80 (HTTP)</li></ul>]]></description><link>http://kernelpanik.net/iot-insecurity-by-example/</link><guid isPermaLink="false">5dd1c93c67f27a00015574d0</guid><category><![CDATA[iot]]></category><category><![CDATA[security]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Wed, 20 Sep 2017 10:00:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Apexis is a known manufacturer of IP cameras. Other companies like Logilink, Foscam or Denver also sell branded IP cameras which are based on the same hardware design and firmware contents.</p>
<p>These IP cameras have some insecurity specialties:</p>
<ul>
<li>UPNP is active by default for enabling port-forwarding of port 80 (HTTP).</li>
<li>This makes the camera directly reachable from the Internet if the router allows config changes by UPNP (which a lot of consumer routers do).</li>
<li>Each device has a unique DNS hostname like 'x1234.oipcam.com'. When connected to the Internet, it will automatically trigger a DDNS update for this hostname.</li>
<li>You can configure additional DDNS providers, but you can't disable 'oipcam.com'.</li>
<li>Weak default username / password for web access ('admin'/'admin' or 'admin'/'1234' or 'admin'/'').</li>
<li>Weak root user password '123456'. If you change the password, it will be reset on next boot.</li>
<li>No means of encrypted communication available (e.g. HTTPS, VPN, SSH).</li>
<li>Outdated software</li>
<li>Linux kernel 2.4.20-uc0 (compiled 2012)</li>
<li>DHCP Client Daemon v.1.3.22-pl4 (2003)</li>
<li>ifconfig 1.39 (1999-03-18)</li>
<li>route 1.96 (1999-01-01)</li>
<li>wpa_supplicant v0.4.7 (2005)</li>
<li>No firmware updates are provided by any vendor.</li>
</ul>
<p>Repair manual from Foscam:<br>
<a href="http://foscam-uk.com/download/FAQ/Repair/FI8918W%20repair%20guidance-.pdf">http://foscam-uk.com/download/FAQ/Repair/FI8918W repair guidance-.pdf</a></p>
<p>CGI documentation from Foscam:<br>
<a href="http://www.produktinfo.conrad.com/datenblaetter/500000-524999/515898-an-01-en-CGI_V1_21_WLAN_LAN_FARBKAMERA_INKL_IRCUT.pdf">http://www.produktinfo.conrad.com/datenblaetter/500000-524999/515898-an-01-en-CGI_V1_21_WLAN_LAN_FARBKAMERA_INKL_IRCUT.pdf</a></p>
<p>... to be continued.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Dell OMSA 7.4 on Ubuntu 16.04]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Ubuntu 16.04 is not officially support by Dell, but 14.04 is. So I tried to install the OMSA packages for 14.04, which almost works out of the box:</p>
<ul>
<li>Add APT repository at /etc/apt/sources.list.d/openmanage.list:</li>
</ul>
<pre><code>deb http://linux.dell.com/repo/community/ubuntu</code></pre>]]></description><link>http://kernelpanik.net/dell-omsa-7-4-on-ubuntu-16-04/</link><guid isPermaLink="false">5dd1c93c67f27a00015574cf</guid><category><![CDATA[linux]]></category><category><![CDATA[mainboard]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Wed, 27 Apr 2016 10:10:30 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Ubuntu 16.04 is not officially support by Dell, but 14.04 is. So I tried to install the OMSA packages for 14.04, which almost works out of the box:</p>
<ul>
<li>Add APT repository at /etc/apt/sources.list.d/openmanage.list:</li>
</ul>
<pre><code>deb http://linux.dell.com/repo/community/ubuntu trusty openmanage
</code></pre>
<ul>
<li>Download and add GPG key for repository:</li>
</ul>
<pre><code># gpg --keyserver pgpkeys.mit.edu --recv-key 1285491434D8786F
# gpg -a --export 1285491434D8786F | apt-key add -
</code></pre>
<ul>
<li>Update list of available packages:</li>
</ul>
<pre><code># apt update
</code></pre>
<ul>
<li>Just installing the 'srvadmin-' packages would result in a missing dependency on 'libsmbios2'. But it's possible to install the package 'libsmbios2v5' instead:</li>
</ul>
<pre><code># apt install smbios-utils libsmbios2v5
</code></pre>
<ul>
<li>Now you can download and install the OMSA packages by ignoring that dependency:</li>
</ul>
<pre><code># mkdir omsa
# cd omsa
# apt-get download srvadmin-omcommon srvadmin-storage srvadmin-base srvadmin-storageservices srvadmin-deng srvadmin-omacs srvadmin-omilcore srvadmin-storelib srvadmin-ominst srvadmin-smcommon srvadmin-storelib-sysfs srvadmin-isvc srvadmin-rnasoap srvadmin-xmlsup srvadmin-realssd srvadmin-nvme srvadmin-storageservices-snmp srvadmin-storageservices-cli srvadmin-storage-snmp srvadmin-deng-snmp srvadmin-isvc-snmp srvadmin-idrac-snmp srvadmin-storage-cli srvadmin-omacore
# dpkg -i --ignore-depends=libsmbios2 *.deb
</code></pre>
<ul>
<li>In order to permanently ignore the dependency you should now carefully edit /var/lib/dpkg/status:</li>
</ul>
<pre><code>...
Package: srvadmin-storage
...
Depends: (remove &quot;libsmbios2, &quot;)
...
Package: srvadmin-omcommon
...
Depends: (remove &quot;libsmbios2, &quot;)
...
</code></pre>
<ul>
<li>After start the 'dataeng' service you can use the 'omreport' command to display system information:</li>
</ul>
<pre><code># service dataeng start


# omreport system version
Version Report

---------------------
Main System Chassis
---------------------

Name    : BIOS
Version : 1.12.0


Name    : iDRAC6
Version : 2.85.00 (Build 4)


Name    : Lifecycle Controller
Version : 1.5.5.27

----------
Software
----------

Name    : Linux
Version : Kernel 4.4.0-21-generic (x86_64)


Name    : Dell Server Administrator
Version : 7.4.0-1

-----------------------------
Storage Controller Firmware
-----------------------------

Name    : PERC H700 Integrated
Version : 12.10.7-0001


# omreport storage controller
 Controller  PERC H700 Integrated (Slot 4)

Controllers
ID                                            : 0
Status                                        : Ok
Name                                          : PERC H700 Integrated
Slot ID                                       : PCI Slot 4
State                                         : Ready
Firmware Version                              : 12.10.7-0001
Latest Available Firmware Version             : Not Applicable
Driver Version                                : 06.810.09.00-rc1
Minimum Required Driver Version               : Not Applicable
Storport Driver Version                       : Not Applicable
Minimum Required Storport Driver Version      : Not Applicable
Number of Connectors                          : 2
Rebuild Rate                                  : 30%
BGI Rate                                      : 30%
Check Consistency Rate                        : 30%
Reconstruct Rate                              : 30%
Alarm State                                   : Not Applicable
Cluster Mode                                  : Not Applicable
SCSI Initiator ID                             : Not Applicable
Cache Memory Size                             : 512 MB
Patrol Read Mode                              : Auto
Patrol Read State                             : Stopped
Patrol Read Rate                              : 30%
Patrol Read Iterations                        : 187
Abort Check Consistency on Error              : Disabled
Allow Revertible Hot Spare and Replace Member : Enabled
Load Balance                                  : Not Applicable
Auto Replace Member on Predictive Failure     : Disabled
Redundant Path view                           : Not Applicable
CacheCade Capable                             : Not Applicable
Persistent Hot Spare                          : Disabled
Encryption Capable                            : Yes
Encryption Key Present                        : No
Encryption Mode                               : None
Preserved Cache                               : Not Applicable
Spin Down Unconfigured Drives                 : Disabled
Spin Down Hot Spares                          : Disabled
Spin Down Configured Drives                   : Not Applicable
Automatic Disk Power Saving (Idle C)          : Not Applicable
T10 Protection Information Capable            : No
</code></pre>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Mac OSX mobile accounts using ZFS snapshots]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>I was trying to get <a href="http://www.macos.utah.edu/documentation/servers/portable_homes/mainColumnParagraphs/01/document/2007.06.20-univ_of_utah-portable_home_directories.pdf">Portable Home Directories (PHD)</a>  working on Mac OSX using the Mobile Accounts feature.</p>
<p>The idea is that a network user should be able to login into one computer today and into another tomorrow, while having the same data and configuration synchronized accross all machines. All</p>]]></description><link>http://kernelpanik.net/foobar/</link><guid isPermaLink="false">5dd1c93c67f27a00015574ce</guid><category><![CDATA[osx]]></category><category><![CDATA[zfs]]></category><dc:creator><![CDATA[kaazoo]]></dc:creator><pubDate>Mon, 21 Mar 2016 19:54:57 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>I was trying to get <a href="http://www.macos.utah.edu/documentation/servers/portable_homes/mainColumnParagraphs/01/document/2007.06.20-univ_of_utah-portable_home_directories.pdf">Portable Home Directories (PHD)</a>  working on Mac OSX using the Mobile Accounts feature.</p>
<p>The idea is that a network user should be able to login into one computer today and into another tomorrow, while having the same data and configuration synchronized accross all machines. All users have network accounts stored in LDAP.<br>
On each computer the same version of Mac OSX along with the same applications are installed. So the user expects to be able to work on every machine in the same way.</p>
<p>It doesn't matter if you use MCX attributes in LDAP or profiles created by Apple's Profile Manager, the results are more or less poor:</p>
<ul>
<li>Sync on Login doesn't work (Show Stopper!)</li>
<li>Sync of ~/Library/IdentityServices/ids.db doesn't work</li>
<li>Sync of ~/Library/Application Support/Quick Look/cloudthumbnails.db sometimes doesn't work</li>
<li>Password of already configured Calendar accounts is not accepted and asked multiple times. Deactivating/activating Calendar accounts sometimes works. Last resort is recreating accounts.</li>
</ul>
<p>This has been tested with Mac OSX 10.10 Yosemite (client) with Ubuntu Linux 12.04 (server), and Mac OSX 10.11 El Capitan (client) with Mac OSX 10.11 (server).</p>
<p>So I thought about other possibilities and created a solution called <a href="https://github.com/kaazoo/zfs_mobile_sync">zfs_mobile_sync</a>.</p>
<p>Here is the general idea:</p>
<ul>
<li>Each user account has the home directory on an own ZFS filesystem.</li>
<li>A snapshot of the home filesystem is created on logout and transfered to the server.</li>
<li>On user login all missing snapshots are transfered from the server to the client so that the home filesystem of the user contains the most recent data.</li>
<li>Snapshots are automatically thinned by ZFS-Timemachine.</li>
<li>On client, local ZFS operations happen as root user.</li>
<li>Authentication on the server by SSH public key as user 'zfs_mobile_sync'.</li>
<li>Remote shell is restricted by rssh for ZFS use only.</li>
</ul>
<h4 id="pros">Pros</h4>
<ul>
<li>Home folders are synchronized completely.</li>
<li>Use of ZFS features: compression, checksums, snapshots.</li>
<li>Transfer of changed data should be faster than file-based approaches like rsync.</li>
</ul>
<h4 id="cons">Cons</h4>
<ul>
<li>Specific files / folders can't be excluded from the transfer.</li>
<li>No graphical status / progress output on login / logout while transfer is happening, only shell output / syslog.</li>
</ul>
<p>For a detailed description, please have a look on the <a href="https://github.com/kaazoo/zfs_mobile_sync">GitHub project</a>.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>