<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>AI on RESEARCHUT</title><link>https://researchut.com/tags/ai/</link><description>Recent content in AI on RESEARCHUT</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>rrs@researchut.com (Ritesh Raj Sarraf)</managingEditor><webMaster>rrs@researchut.com (Ritesh Raj Sarraf)</webMaster><lastBuildDate>Sat, 20 Dec 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://researchut.com/tags/ai/index.xml" rel="self" type="application/rss+xml"/><item><title>Immutable Debian</title><link>https://researchut.com/blog/Immutable_Atomic_Debian/</link><pubDate>Sat, 20 Dec 2025 00:00:00 +0000</pubDate><author>rrs@researchut.com (Ritesh Raj Sarraf)</author><guid>https://researchut.com/blog/Immutable_Atomic_Debian/</guid><description>&lt;h2 id="immutable-atomic-linux-distirbutions">Immutable Atomic Linux Distirbutions&lt;/h2>
&lt;p>Of late, I&amp;rsquo;ve been hearing a lot of (good) things about Immutable Linux
Distributions, from friends, colleagues and mentors. It has been
something on my plate for some time, to explore. But given the nature of
the subject, it has been delayed for a while. Reasons are simple; I can
only really judge this product if I use it for some time; and it has to
be on my primary daily driver machine.&lt;/p>
&lt;p>Personal life, this year, has been quite challenging as well. Thus it got pushed to until now.&lt;/p>
&lt;h3 id="chrome-os">Chrome OS&lt;/h3>
&lt;p>I&amp;rsquo;ve realized that I&amp;rsquo;ve been quite late to a lot of Linux parties.
Containers, Docker, Kubernetes, Golang, Rust, Immutable Linux and many
many more.&lt;/p>
&lt;p>Late to the extent that I&amp;rsquo;ve had a Chrome Book lying at home for many
months but never got to tinker with it at all.&lt;/p>
&lt;p>Having used it for just around 2 weeks now, I can see what a great
product Google built with it. In short, this is exactly how a Linux
desktop integration should be. The GUI integration is just top notch.
There&amp;rsquo;s consistency across all applications rendered on the Chrome OS&lt;/p>
&lt;p>The integration of [X]Wayland and friends is equally good. Maybe Google
should consider opensourcing all those components. IIRC, exo,
sommelier, xwayland, ash and many more.&lt;/p>
&lt;p>I was equally happy to see their &lt;code>Linux Development Environment&lt;/code>
offering on supported hardware. While tightly integrated, it still
allows power users to tinker things around. I was quite impressed to see
nested containers in &lt;code>crostini&lt;/code>. Job well done.&lt;/p>
&lt;p>All of this explains why there&amp;rsquo;s much buzz about &lt;code>Immutable Atomic Linux Distributions&lt;/code> these days.&lt;/p>
&lt;p>Then, there&amp;rsquo;s the Android integration, which is just awesome in case you
care of it. Both &lt;code>libndk&lt;/code> and &lt;code>libhoudini&lt;/code> are well integrated and
nicely usable.&lt;/p>
&lt;h3 id="immutable-linux-distributions">Immutable Linux Distributions&lt;/h3>
&lt;p>This holiday season I wanted to find and spend some time catching up on
stuff I had been prolonging.&lt;/p>
&lt;p>I chose to explore this subject while trying to remain in familiar
Debian land. So my first look was to see if there was any product
derived out of the Debian base.&lt;/p>
&lt;p>That brought me to &lt;code>Vanilla OS Orchid&lt;/code>. This is a fresh out of oven
project, recently switched to being based on Debian Sid. Previous
iteration used Ubuntu as the base.&lt;/p>
&lt;p>Vanilla OS turned out to be quite good an experience. The stock
offering is created well enough to serve the general audience. And the
framework is such wonderfully structured that seasoned users can tinker
around with it, without much fuss.&lt;/p>
&lt;p>Vanilla OS uses an A/B Partition model for how system updates are
rolled. At any point, when a new OTA update is pushed, it gets applied
to the inactive A/B partition. And it gets activated at next boot. If things
break, user has the option to switch to the previous state. Just the
usual set of expectations one would have with an immutable distribution.&lt;/p>
&lt;p>What they&amp;rsquo;ve done beautifully is:&lt;/p>
&lt;ul>
&lt;li>Integration Device Mapper LVM for A/B Partition&lt;/li>
&lt;li>Linux Container OCI images to provison/flash A/B Paritions&lt;/li>
&lt;li>Developed &lt;code>abroot&lt;/code> utility for A/B Partition management&lt;/li>
&lt;li>APX (Distrobox) integration for container workflows, with multiple Linux flavors&lt;/li>
&lt;li>No &lt;code>sudo&lt;/code>. Everything done via &lt;code>pkexec&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>But the most awesome thing I liked in Vanilla OS is &lt;a href="https://github.com/rickysarraf/custom-image">custom images&lt;/a>. This allows power users to easily tinker with the developer workflow and generate new images, tailored for their specific use cases. All of this done levraging the GitHub/GitLab CI/CD workflows, which I think is just plain awesome. Given that payload is of the OCI format, the CICD workflow just generates new OCI images and publishes to a registry. And then the same is pulled to the client as an OTA.&lt;/p>
&lt;p>Hats off to this small team/community for doing such nice integration
work, ultimately producing a superb Immutable Atomic Linux Distribution
based on the Debian base.&lt;/p>
&lt;h3 id="immutable-linux">Immutable Linux&lt;/h3>
&lt;p>My primary work machine has grown over the years, being on the rolling
Debian Testing/Unstable channel. And I don&amp;rsquo;t much feel the itch ever to
format my (primary) machine so quick, no matter how great the counter
offer is.&lt;/p>
&lt;p>So that got me wondering how to have some of bling of the immutable
world that I&amp;rsquo;ve tasted (Thanks Chrome OS and Vanilla OS). With a fair
idea of what they offer in features, I drew a line to what I&amp;rsquo;d want on
my primary machine.&lt;/p>
&lt;ul>
&lt;li>read-only rootfs&lt;/li>
&lt;li>read-only /etc/&lt;/li>
&lt;/ul>
&lt;p>This also kinda hardens my systems to an extent that I can&amp;rsquo;t
accidentally cause catastrophic damage to it.&lt;/p>
&lt;p>The feature I&amp;rsquo;m letting go of is the A/B Partition (rpm-ostree for Fedora
land). While a good feature, having to integrate it into my current
machine is going to be very very challenging.&lt;/p>
&lt;p>I actually feel that, the core assumption the Immutable Distros make,
that all hardware is going to &lt;code>Just Work&lt;/code>, is flawed. While Linux has
substantially improved over the past years, there&amp;rsquo;s still a hit/miss
when introducing very recent hardware.&lt;/p>
&lt;p>Immutable Linux is targeted for the novice user, who won&amp;rsquo;t accidentally
mess with the system. But what would the novice user do in case they
have issues with their recently purchased hardware, that they are
attempting to run (Immutable) Linux on.&lt;/p>
&lt;h3 id="riteshs-immutable-debian">Ritesh&amp;rsquo;s Immutable Debian&lt;/h3>
&lt;p>With the premise set, on to sailing in immutable land.&lt;/p>
&lt;p>There&amp;rsquo;s another ground breaking innovation that has been happening;
which I think everyone is aware of. And may be using it as well, direct
or indirect.&lt;/p>
&lt;p>&lt;em>Artificial Intelligence&lt;/em>&lt;/p>
&lt;p>While I&amp;rsquo;ve only been a user for a couple of months as I draft this post,
I&amp;rsquo;m now very much impressed with all this innovation. Being at the
consumer end has me appreciating it for what it has offered thus far.
And I haven&amp;rsquo;t even scratched the surface. I&amp;rsquo;m making attempts at
developing understanding of &lt;em>Machine Learning&lt;/em> and &lt;em>Artificial
Intelligence&lt;/em> but there&amp;rsquo;s a looonnngg way to go still.&lt;/p>
&lt;p>What I&amp;rsquo;m appreciating the most is the availability of the AI Technology.
It has helped me be more efficient. And thus I get to use the gain
(time) with family.&lt;/p>
&lt;p>To wrap, what I tailored my primary OS to, wouldn&amp;rsquo;t have been possible
without assistance from AI.&lt;/p>
&lt;p>With that, I disclaim that the rest of this article is primarily drafted
by my AI Companion. This is going to serve me as a reference for future,
when I forget about how all of this was structured.&lt;/p>
&lt;h1 id="-system-architecture-immutable-debian-btrfs--mergerfs">🏗️ System Architecture: Immutable Debian (Btrfs + MergerFS)&lt;/h1>
&lt;p>This system is a custom-hardened &lt;strong>Immutable Workstation&lt;/strong> based on Debian Testing/Unstable. It utilizes native Btrfs properties and surgical VFS mounting to isolate the Operating System from persistent data.&lt;/p>
&lt;h2 id="1-storage-strategy-subvolume-isolation">1. Storage Strategy: Subvolume Isolation&lt;/h2>
&lt;p>The system resides on a LUKS-encrypted NVMe partition, using a flattened subvolume layout to separate the &amp;ldquo;Gold Master&amp;rdquo; OS from volatile and persistent data.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align:left">Mount Point&lt;/th>
&lt;th style="text-align:left">Subvolume Path&lt;/th>
&lt;th style="text-align:left">State&lt;/th>
&lt;th style="text-align:left">Purpose&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align:left">&lt;code>/&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;code>/ROOTVOL&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;strong>RO&lt;/strong>&lt;/td>
&lt;td style="text-align:left">The core OS image.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&lt;code>/etc&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;code>/ROOTVOL/etc&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;strong>RO&lt;/strong>&lt;/td>
&lt;td style="text-align:left">System configuration (Snapshot-capable).&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&lt;code>/home/rrs&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;code>/ROOTVOL/home/rrs&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;strong>RW&lt;/strong>&lt;/td>
&lt;td style="text-align:left">User data and Kitty terminal configs.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&lt;code>/var/lib&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;code>/ROOTVOL/var/lib&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;strong>RW&lt;/strong>&lt;/td>
&lt;td style="text-align:left">Docker, Apt state, and system DBs.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&lt;code>/var/spool&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;code>/ROOTVOL/var/spool&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;strong>RW&lt;/strong>&lt;/td>
&lt;td style="text-align:left">Mail queues and service state.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&lt;code>/swap&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;code>/ROOTVOL/swap&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;strong>RW&lt;/strong>&lt;/td>
&lt;td style="text-align:left">Isolated path for No_COW Swapfile.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align:left">&lt;code>/disk-tmp&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;code>/ROOTVOL/disk-tmp&lt;/code>&lt;/td>
&lt;td style="text-align:left">&lt;strong>RW&lt;/strong>&lt;/td>
&lt;td style="text-align:left">MergerFS overflow tier.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="11-etcfstab">1.1 /etc/fstab&lt;/h3>
&lt;pre tabindex="0">&lt;code>❯ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use &amp;#39;blkid&amp;#39; to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;
# --- ROOT &amp;amp; BOOT ---
/dev/mapper/nvme0n1p3_crypt / btrfs autodefrag,compress=zstd,discard=async,noatime,defaults,ro 0 0
/dev/nvme0n1p2 /boot ext4 defaults 0 2
/dev/nvme0n1p1 /boot/efi vfat umask=0077 0 1
# --- SWAP ---
# Mount the &amp;#34;Portal&amp;#34; to the swap subvolume using UUID (Robust)
UUID=4473b40b-bb46-43d6-b69c-ef17bfcac41c /swap btrfs subvol=/ROOTVOL/swap,defaults,noatime 0 0
# Activate the swap file by path (Correct for files)
/swap/swapfile none swap defaults 0 0
# --- DATA / MEDIA ---
UUID=439e297a-96a5-4f81-8b3a-24559839539d /media/rrs/TOSHIBA btrfs noauto,compress=zstd,space_cache=v2,subvolid=5,subvol=/,user
# --- MERGERFS ---
# --- DISK-TMP (MergerFS Overflow Tier) ---
# Ensure this ID matches your actual disk-tmp subvolume
UUID=4473b40b-bb46-43d6-b69c-ef17bfcac41c /disk-tmp btrfs subvolid=417,discard=async,defaults,noatime,compress=zstd 0 0
tmpfs /ram-tmp tmpfs defaults 0 0
/ram-tmp:/disk-tmp /tmp fuse.mergerfs x-systemd.requires=/ram-tmp,x-systemd.requires=/disk-tmp,defaults,allow_other,use_ino,nonempty,minfreespace=1G,category.create=all,moveonenospc=true 0 0
# --- IMMUTABILITY PERSISTENCE LAYERS ---
# We explicitly mount these subvolumes so they remain Writable later.
# UUID is the same as your /var/lib entry (your main Btrfs volume).
# 1. /var/lib (Docker, Apt state) - ID 50659
UUID=4473b40b-bb46-43d6-b69c-ef17bfcac41c /var/lib btrfs subvolid=50659,discard=async,defaults,noatime,compress=zstd 0 0
# 2. /home/rrs (User Data) - ID 13032
UUID=4473b40b-bb46-43d6-b69c-ef17bfcac41c /home/rrs btrfs subvolid=13032,discard=async,defaults,noatime,compress=zstd 0 0
# 3. /etc (System Config) - ID 13030
UUID=4473b40b-bb46-43d6-b69c-ef17bfcac41c /etc btrfs subvolid=13030,discard=async,defaults,noatime,compress=zstd,ro 0 0
# 4. /var/log (Logs) - ID 406
UUID=4473b40b-bb46-43d6-b69c-ef17bfcac41c /var/log btrfs subvolid=406,discard=async,defaults,noatime,compress=zstd 0 0
# 5. /var/cache (Apt Cache) - ID 409
UUID=4473b40b-bb46-43d6-b69c-ef17bfcac41c /var/cache btrfs subvolid=409,discard=async,defaults,noatime,compress=zstd 0 0
# 6. /var/tmp (Temp files) - ID 401
UUID=4473b40b-bb46-43d6-b69c-ef17bfcac41c /var/tmp btrfs subvolid=401,discard=async,defaults,noatime,compress=zstd 0 0
# /var/spool
UUID=4473b40b-bb46-43d6-b69c-ef17bfcac41c /var/spool btrfs subvolid=50689,discard=async,defaults,noatime,compress=zstd 0 0
&lt;/code>&lt;/pre>&lt;h2 id="2-tiered-memory-model-tmp">2. Tiered Memory Model (/tmp)&lt;/h2>
&lt;p>To balance performance and capacity, &lt;code>/tmp&lt;/code> is managed via &lt;strong>MergerFS&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Tier 1 (RAM):&lt;/strong> &lt;code>tmpfs&lt;/code> mounted at &lt;code>/ram-tmp&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Tier 2 (Disk):&lt;/strong> Btrfs subvolume mounted at &lt;code>/disk-tmp&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Logic:&lt;/strong> Files are written to RAM first. If RAM falls below 1GB available, files spill over to the Btrfs disk tier.&lt;/li>
&lt;/ul>
&lt;h2 id="3-hibernation--swap-logic">3. Hibernation &amp;amp; Swap Logic&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Size:&lt;/strong> 33 GiB (Configured for Suspend-to-Disk with 24GB RAM).&lt;/li>
&lt;li>&lt;strong>Attribute:&lt;/strong> The &lt;code>/swap&lt;/code> subvolume is marked &lt;strong>No_COW (+C)&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>Kernel Integration:&lt;/strong>
&lt;ul>
&lt;li>&lt;code>resume=UUID=...&lt;/code> (Points to the unlocked LUKS container).&lt;/li>
&lt;li>&lt;code>resume_offset=...&lt;/code> (Physical extent mapping for Btrfs).&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="31-systemd-sleephibernation">3.1 systemd sleep/Hibernation&lt;/h3>
&lt;pre tabindex="0">&lt;code>❯ cat /etc/systemd/sleep.conf.d/sleep.conf
[Sleep]
HibernateDelaySec=12min
&lt;/code>&lt;/pre>&lt;p>and&lt;/p>
&lt;pre tabindex="0">&lt;code>❯ cat /etc/systemd/logind.conf.d/logind.conf
[Login]
HandleLidSwitch=suspend-then-hibernate
HandlePowerKey=suspend-then-hibernate
HandleSuspendKey=suspend-then-hibernate
SleepOperation==suspend-then-hibernate
&lt;/code>&lt;/pre>&lt;h2 id="4-immutability--safety-mechanisms">4. Immutability &amp;amp; Safety Mechanisms&lt;/h2>
&lt;p>The system state is governed by two key components:&lt;/p>
&lt;h3 id="a-the-control-script-immutectl">A. The Control Script (&lt;code>immutectl&lt;/code>)&lt;/h3>
&lt;p>Handles the state transition by flipping Btrfs properties and VFS mount flags in the correct order.&lt;/p>
&lt;ul>
&lt;li>&lt;code>sudo immutectl unlock&lt;/code>: Sets &lt;code>ro=false&lt;/code> and remounts &lt;code>rw&lt;/code>.&lt;/li>
&lt;li>&lt;code>sudo immutectl lock&lt;/code>: Sets &lt;code>ro=true&lt;/code> and remounts &lt;code>ro&lt;/code>.&lt;/li>
&lt;/ul>
&lt;pre tabindex="0">&lt;code>❯ cat /usr/local/bin/immutectl
#!/bin/bash
# Ensure script is run as root
if [[ $EUID -ne 0 ]]; then
echo &amp;#34;This script must be run as root (sudo).&amp;#34;
exit 1
fi
ACTION=$1
case $ACTION in
unlock)
echo &amp;#34;🔓 Unlocking / and /etc for maintenance...&amp;#34;
# 1. First, tell the Kernel to allow writes to the mount point
mount -o remount,rw /
mount -o remount,rw /etc
# 2. Now that the VFS is RW, Btrfs will allow you to change the property
btrfs property set / ro false
btrfs property set /etc ro false
echo &amp;#34;Status: System is now READ-WRITE.&amp;#34;
;;
lock)
echo &amp;#34;🔒 Locking / and /etc (Immutable Mode)...&amp;#34;
sync
btrfs property set / ro true
btrfs property set /etc ro true
# We still attempt remount, but we ignore failure since Property is the Hard Lock
mount -o remount,ro / 2&amp;gt;/dev/null
mount -o remount,ro /etc 2&amp;gt;/dev/null
echo &amp;#34;Status: System is now READ-ONLY (Btrfs Property Set).&amp;#34;
;;
status)
echo &amp;#34;--- System Immutability Status ---&amp;#34;
for dir in &amp;#34;/&amp;#34; &amp;#34;/etc&amp;#34;; do
# Get VFS state
VFS_STATE=$(grep &amp;#34; $dir &amp;#34; /proc/mounts | awk &amp;#39;{print $4}&amp;#39; | cut -d, -f1)
# Get Btrfs Property state
BTRFS_PROP=$(btrfs property get &amp;#34;$dir&amp;#34; ro | cut -d= -f2)
# Determine overall health
if [[ &amp;#34;$BTRFS_PROP&amp;#34; == &amp;#34;true&amp;#34; ]]; then
FINAL_STATUS=&amp;#34;LOCKED (RO)&amp;#34;
else
FINAL_STATUS=&amp;#34;UNLOCKED (RW)&amp;#34;
fi
echo &amp;#34;Path: $dir&amp;#34;
echo &amp;#34; - VFS Layer (Mount): $VFS_STATE&amp;#34;
echo &amp;#34; - Btrfs Property: ro=$BTRFS_PROP&amp;#34;
echo &amp;#34; - Effective State: $FINAL_STATUS&amp;#34;
# Check for mismatch (The &amp;#34;Busy&amp;#34; scenario)
if [[ &amp;#34;$VFS_STATE&amp;#34; == &amp;#34;rw&amp;#34; &amp;amp;&amp;amp; &amp;#34;$BTRFS_PROP&amp;#34; == &amp;#34;true&amp;#34; ]]; then
echo &amp;#34; ⚠️ NOTICE: VFS is RW but Btrfs is RO. System is effectively Immutable.&amp;#34;
fi
echo &amp;#34;&amp;#34;
done
;;
*)
echo &amp;#34;Usage: $0 {lock|unlock|status}&amp;#34;
exit 1
;;
esac
&lt;/code>&lt;/pre>&lt;h3 id="b-the-smart-seal-immutability-sealservice">B. The Smart Seal (&lt;code>immutability-seal.service&lt;/code>)&lt;/h3>
&lt;p>A systemd one-shot service that ensures the system is locked on boot.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Fail-safe:&lt;/strong> The service checks &lt;code>/proc/cmdline&lt;/code> for the standalone word &lt;code>rw&lt;/code>. If found (via GRUB manual override), the seal is aborted to allow emergency maintenance.&lt;/li>
&lt;/ul>
&lt;pre tabindex="0">&lt;code>❯ cat /etc/systemd/system/immutability-seal.service
[Unit]
Description=Ensure Btrfs Immutable Properties are set on Boot (unless rw requested)
DefaultDependencies=no
After=systemd-remount-fs.service
Before=local-fs.target
# Don&amp;#39;t run in emergency/rescue modes
#ConditionPathExists=!/run/systemd/seats/seat0
[Service]
Type=oneshot
# The robust check: exit if &amp;#39;rw&amp;#39; exists as a standalone word
ExecStartPre=/bin/sh -c &amp;#39;! grep -qE &amp;#34;\brw\b&amp;#34; /proc/cmdline&amp;#39;
ExecStartPre=mount -o remount,rw /
ExecStart=/usr/bin/btrfs property set / ro true
ExecStart=/usr/bin/btrfs property set /etc ro true
ExecStartPost=mount -o remount,ro /
RemainAfterExit=yes
[Install]
WantedBy=local-fs.target
&lt;/code>&lt;/pre>&lt;h2 id="5-monitoring--maintenance">5. Monitoring &amp;amp; Maintenance&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Nagging:&lt;/strong> A systemd user-timer runs &lt;code>immutability-nag&lt;/code> every 15 minutes to notify the desktop session if the system is currently in an &amp;ldquo;Unlocked&amp;rdquo; state.&lt;/li>
&lt;li>&lt;strong>Verification:&lt;/strong> Use &lt;code>sudo immutectl status&lt;/code> to verify that both the VFS Layer and Btrfs Properties are in sync.&lt;/li>
&lt;/ul>
&lt;h3 id="51-nagging">5.1 Nagging&lt;/h3>
&lt;pre tabindex="0">&lt;code>❯ cat ~/bin/immutability-nag
#!/bin/bash
# Check Btrfs property
BTRFS_STATUS=$(btrfs property get / ro | cut -d= -f2)
if [[ &amp;#34;$BTRFS_STATUS&amp;#34; == &amp;#34;false&amp;#34; ]]; then
# Use notify-send (Standard, fast, non-intrusive)
notify-send -u critical -i security-low \
&amp;#34;🔓 System Unlocked&amp;#34; \
&amp;#34;Root is currently WRITABLE. Run &amp;#39;immutectl lock&amp;#39; when finished.&amp;#34;
fi
&lt;/code>&lt;/pre>&lt;p>and&lt;/p>
&lt;pre tabindex="0">&lt;code>❯ usystemctl cat immutability-nag.service
# /home/rrs/.config/systemd/user/immutability-nag.service
[Unit]
Description=Check Btrfs immutability and notify user
# Ensure it doesn&amp;#39;t run before the graphical session is ready
After=graphical-session.target
[Service]
Type=oneshot
ExecStart=%h/bin/immutability-nag
# Standard environment for notify-send to find the DBus session
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%U/bus
[Install]
WantedBy=default.target
   ~   20:35:15
❯ usystemctl cat immutability-nag.timer
# /home/rrs/.config/systemd/user/immutability-nag.timer
[Unit]
Description=Check immutability every 15 mins
[Timer]
OnStartupSec=5min
OnUnitActiveSec=15min
[Install]
WantedBy=timers.target
&lt;/code>&lt;/pre>&lt;p>And the resultant nag in action.
&lt;link rel="stylesheet" href="https://researchut.com/css/hugo-easy-gallery.css" />
&lt;div class="box" >
&lt;figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
&lt;div class="img">
&lt;img itemprop="thumbnail" src="https://researchut.com/images/immutable-seal.jpeg" alt="Immutable Debian Nag"/>
&lt;/div>
&lt;a href="https://researchut.com/images/immutable-seal.jpeg" itemprop="contentUrl">&lt;/a>
&lt;figcaption>&lt;h4>Immutable Debian Nag&lt;/h4>
&lt;/figcaption>
&lt;/figure>
&lt;/div>
&lt;/p>
&lt;h3 id="52-verification">5.2 Verification&lt;/h3>
&lt;pre tabindex="0">&lt;code>❯ sudo immutectl status
[sudo] password for rrs:
--- System Immutability Status ---
Path: /
- VFS Layer (Mount): rw
- Btrfs Property: ro=false
- Effective State: UNLOCKED (RW)
Path: /etc
- VFS Layer (Mount): rw
- Btrfs Property: ro=false
- Effective State: UNLOCKED (RW)
   ~   21:14:08
❯ sudo immutectl lock
🔒 Locking / and /etc (Immutable Mode)...
Status: System is now READ-ONLY (Btrfs Property Set).
   ~   21:14:15
❯ sudo immutectl status
--- System Immutability Status ---
Path: /
- VFS Layer (Mount): rw
- Btrfs Property: ro=true
- Effective State: LOCKED (RO)
⚠️ NOTICE: VFS is RW but Btrfs is RO. System is effectively Immutable.
Path: /etc
- VFS Layer (Mount): rw
- Btrfs Property: ro=true
- Effective State: LOCKED (RO)
⚠️ NOTICE: VFS is RW but Btrfs is RO. System is effectively Immutable.
&lt;/code>&lt;/pre>&lt;hr>
&lt;p>&lt;strong>Date Configured:&lt;/strong> December 2025&lt;br>
&lt;strong>Philosophy:&lt;/strong> The OS is a diagnostic tool. If an application fails to write to a locked path, the application is the variable, not the system.&lt;/p>
&lt;h2 id="wrap">Wrap&lt;/h2>
&lt;p>Overall, I&amp;rsquo;m very very happy with, the result of a day of working
together with AI. I wouldn&amp;rsquo;t have gotten things done so quick in such
time if it wasn&amp;rsquo;t around. Such great is this age of AI.&lt;/p></description></item></channel></rss>