Skip to content

Commit

Permalink
Avoid rename(2) on init symlink in order to work aorund overlayfs iss…
Browse files Browse the repository at this point in the history
…ue (ltsp#860)

This affects at least Debian bookworm with Linux 6.1.0.
Closes #1049397
  • Loading branch information
Guido Berhoerster committed Aug 17, 2023
1 parent fce44a5 commit 63038b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ltsp/client/initrd-bottom/55-initrd-bottom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ install_ltsp() {
fi
# To avoid specifying an init=, we override the real init.
# We can't mount --bind as it's in use by libraries and can't be unmounted.
re mv "$rootmnt/sbin/init" "$rootmnt/sbin/init.ltsp"
re ln -s ../../usr/share/ltsp/client/init/init "$rootmnt/sbin/init"
# With Linux 6.1 rename(2) on the symlink fails with ENXIO, so do not use
# mv for now (see #860).
re cp -P "$rootmnt/sbin/init" "$rootmnt/sbin/init.ltsp"
re ln -sf ../../usr/share/ltsp/client/init/init "$rootmnt/sbin/init"
# Jessie needs a 3.18+ kernel and this initramfs-tools hack:
if grep -qs jessie /etc/os-release; then
echo "init=${init:-/sbin/init}" >> /scripts/init-bottom/ORDER
Expand Down

0 comments on commit 63038b1

Please sign in to comment.