Fix permissions for unsquashfs and authorized_keys in get_rootfs.bash

This commit is contained in:
Joakim Hellsén 2026-04-26 00:00:09 +02:00
commit 7819461b07
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk

View file

@ -52,9 +52,9 @@ wget -O "ubuntu-${ubuntu_version}.squashfs.upstream" "https://s3.amazonaws.com/s
# The rootfs in our CI doesn't contain SSH keys to connect to the VM
# For the purpose of this demo, let's create one and patch it in the rootfs
unsquashfs "ubuntu-${ubuntu_version}.squashfs.upstream"
sudo unsquashfs -f "ubuntu-${ubuntu_version}.squashfs.upstream"
ssh-keygen -f id_rsa -N ""
cp -v id_rsa.pub squashfs-root/root/.ssh/authorized_keys
sudo cp -v id_rsa.pub squashfs-root/root/.ssh/authorized_keys
mv -v id_rsa "./ubuntu-${ubuntu_version}.id_rsa"
# create ext4 filesystem image
sudo chown -R root:root squashfs-root