diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1169b84..2c1da1f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,7 @@ build-arm64: stage: build script: - apt update - - apt install -y curl xz-utils file + - apt install -y curl xz-utils file sudo - ./arm64-build.sh artifacts: paths: diff --git a/arm64-build.sh b/arm64-build.sh index e3a6089..3da00cb 100755 --- a/arm64-build.sh +++ b/arm64-build.sh @@ -13,10 +13,10 @@ OFFSET_IMG=$(file $RASPIOS_IMG | cut -d';' -f3 | cut -d',' -f8 | cut -d' ' -f3) mkdir -p mnt echo "Mounting second partition" -mount $RASPIOS_IMG -o offset=$((512*$OFFSET_IMG)) mnt +sudo mount $RASPIOS_IMG -o offset=$((512*$OFFSET_IMG)) mnt echo "Chroot into partition to start edition" -chroot mnt /bin/sh <<"EOT" +sudo chroot mnt /bin/sh <<"EOT" usermod -l creator pi usermod -d /home/creator -m creator @@ -28,5 +28,5 @@ systemctl enable ssh echo "kenoma" > /etc/hostname EOT -umount mnt +sudo umount mnt xz $RASPIOS_IMG