From e01971d8033a1c9aeb0089d2a7d6d80797253394 Mon Sep 17 00:00:00 2001 From: ading2210 Date: Thu, 14 Dec 2023 17:05:18 +0000 Subject: [PATCH] fix i386 multiarch support --- build.sh | 2 +- rootfs/opt/setup_rootfs.sh | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index d62440c..9005774 100755 --- a/build.sh +++ b/build.sh @@ -89,7 +89,7 @@ patch_initramfs $initramfs_dir echo "creating disk image" rootfs_size=$(du -sm $rootfs_dir | cut -f 1) -rootfs_part_size=$(($rootfs_size * 11 / 10)) +rootfs_part_size=$(($rootfs_size * 12 / 10)) #create a 20mb bootloader partition #rootfs partition is 20% larger than its contents create_image $output_path 20 $rootfs_part_size diff --git a/rootfs/opt/setup_rootfs.sh b/rootfs/opt/setup_rootfs.sh index fee86d0..6b79eb4 100755 --- a/rootfs/opt/setup_rootfs.sh +++ b/rootfs/opt/setup_rootfs.sh @@ -10,7 +10,7 @@ fi custom_repo="https://shimboot.ading.dev/debian" custom_repo_domain="shimboot.ading.dev" -sources_entry="deb [trusted=yes] ${custom_repo} ${release_name} main" +sources_entry="deb [trusted=yes arch=amd64] ${custom_repo} ${release_name} main" #add shimboot repos echo -e "${sources_entry}\n$(cat /etc/apt/sources.list)" > /etc/apt/sources.list @@ -23,13 +23,13 @@ END #install the patched systemd apt-get install -y ca-certificates apt-get update -apt-get upgrade -y +apt-get upgrade -y --allow-downgrades #enable shimboot services systemctl enable kill-frecon.service #install desktop -apt-get install -y task-xfce-desktop cloud-utils zram-tools +apt-get install -y task-xfce-desktop cloud-utils zram-tools --allow-downgrades #set up zram tee -a /etc/default/zramswap << END @@ -51,12 +51,16 @@ ff02::2 ip6-allrouters END echo "Enter a root password:" -passwd root +while ! passwd root; do + echo "Failed to set password, please try again." +done read -p "Enter the username for the user account: " username useradd -m -s /bin/bash -G sudo $username echo "Enter the password for ${username}:" -passwd $username +while ! passwd $username; do + echo "Failed to set password, please try again." +done #clean apt caches apt-get clean \ No newline at end of file