docs
stable 0.2.0

Editing /etc

Local system configuration is allowed and persists across updates — but the way it persists has one consequence worth understanding.

How it works

/etc is a layered filesystem. The lower layer is the pristine configuration from the read-only system image. The upper layer is writable and lives on the data partition. When you edit a file, the modified copy is written to the upper layer; when you read a file, the upper layer wins if it has a copy and the image’s version is used otherwise.

So sudo nano /etc/fstab works exactly as it always has, and your change survives every update.

The consequence

A file you have edited stops receiving vendor updates. Your copy shadows the image’s copy permanently, even when a later release ships an improved default for that file.

That is a deliberate trade — the alternative is a three-way merge on every update, with the conflict resolution that implies — but it means a file you edited once and forgot can quietly hold back a change you wanted.

Seeing what you have shadowed

immos ~$
$ immos-update etc-diff
/etc/fstab
/etc/systemd/system/backup.timer

Anything listed is being served from your layer, not from the image.

Going back to the vendor version

Delete your copy. The upper layer stops shadowing that path and the image’s file becomes visible again:

immos ~$
$ sudo rm /etc/fstab
$ immos-update etc-diff

Check immos-update etc-diff afterwards to confirm the path is gone from the list.

Delete, do not blank

Replacing a file’s contents with nothing still leaves your empty version shadowing the vendor’s. Removing the file is what restores the default.

Preferring drop-ins

Where a service supports it, a drop-in file is better than editing the main configuration, because you add a file rather than shadowing one:

immos ~$
$ sudo mkdir -p /etc/systemd/system/sshd.service.d
$ sudo tee /etc/systemd/system/sshd.service.d/10-port.conf <<'EOF'
[Service]
Environment=SSHD_OPTS=-p 2222
EOF

The vendor’s sshd.service keeps updating; only your addition is yours.

What you still cannot do

/etc is writable. /usr is not. Configuration lives in /etc; programs, libraries and units shipped by the system live in /usr and are read-only by construction. If something wants to write to /usr, it is asking for a thing Immos does not do — see what immutable means.