Skip to content

Commit

Permalink
fix issue #60 and #82
Browse files Browse the repository at this point in the history
  • Loading branch information
ading2210 committed Sep 21, 2024
1 parent 8ec9131 commit e1b4e11
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build_complete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ if [ ! "$rootfs_dir" ]; then
distro=$distro
fi

print_title "patching debian rootfs"
print_title "patching $distro rootfs"
retry_cmd ./patch_rootfs.sh $shim_bin $reco_bin $rootfs_dir "quiet=$quiet"

print_title "building final disk image"
Expand Down
4 changes: 2 additions & 2 deletions rootfs/opt/setup_rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ systemctl enable kill-frecon.service

#install base packages
if [ ! "$disable_base_pkgs" ]; then
apt-get install -y cloud-utils zram-tools sudo command-not-found bash-completion
apt-get install -y cloud-utils zram-tools sudo command-not-found bash-completion libfuse2 libfuse3-3

#set up zram
echo "ALGO=lzo" >> /etc/default/zramswap
Expand Down Expand Up @@ -112,7 +112,7 @@ END
apt-get install -y $packages

#disable selinux to prevent a harmless error from showing up during the boot
echo "SELINUX=disabled" | tee -a /etc/selinux/config
echo "SELINUX=disabled" >> /etc/selinux/config

if [ ! $username ]; then
read -p "Enter the username for the user account: " username
Expand Down
6 changes: 4 additions & 2 deletions rootfs/usr/local/bin/expand_rootfs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
#this script automatically expands the root filesystem

set -e
if [ "$DEBUG" ]; then
set -x
fi

if [ "$EUID" -ne 0 ]; then
echo "This needs to be run as root."
Expand All @@ -11,8 +14,7 @@ fi

part_dev="$(findmnt -T / -no SOURCE)"
disk_dev="$(lsblk --list --noheadings --paths --output PKNAME "$part_dev")"
part_name="$(echo "$part_dev" | rev | cut -d'/' -f1 | rev)"
part_num="$(cat /proc/partitions | grep "$part_name" | awk '{print $2}')"
part_num="$(echo "${part_dev#$disk_dev}" | tr -d 'p')"

echo "Automatically detected root filesystem:"
fdisk -l "$disk_dev" 2>/dev/null | grep "${disk_dev}:" -A 1
Expand Down

0 comments on commit e1b4e11

Please sign in to comment.