Skip to content

Commit

Permalink
setup: work around initramfs-tools bug
Browse files Browse the repository at this point in the history
A recent update (or at least recent to Raspberry Pi OS. The change appears
to have occurred between 0.142 (which works) and 0.142+deb12u1 (which does
not work) to the initramfs-tools package made it so that copying an
indirectly symlinked host file to the initramfs would create a symlink
instead of copying the file if a file with the same name was already
indirectly symlinked in the initramfs.
Work around this by using the canonical name when copying.

Also make it so debian-resizefs.sh only updates the currently used
initramfs, to speed up setup.

fixes #881
  • Loading branch information
marcone committed Oct 1, 2024
1 parent cfe5f14 commit fff7930
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/debian-resizefs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ case "$1" in
esac
. /usr/share/initramfs-tools/hook-functions
copy_exec /sbin/findfs /sbin/findfs-full
copy_exec $(readlink -f /sbin/findfs) /sbin/findfs-full
copy_exec /sbin/e2fsck /sbin
copy_exec /sbin/resize2fs /sbin
EOF
Expand Down Expand Up @@ -84,7 +84,7 @@ EOF
chmod +x /etc/initramfs-tools/scripts/init-premount/resize

# Regenerate initrd
update-initramfs -v -u
update-initramfs -v -u -k "$(uname -r)"

# Remove files
rm -f /etc/initramfs-tools/hooks/resize2fs /etc/initramfs-tools/scripts/init-premount/resize
Expand Down

0 comments on commit fff7930

Please sign in to comment.