Skip to content

Commit e1b4e11

Browse files
committed
fix issue #60 and #82
1 parent 8ec9131 commit e1b4e11

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

build_complete.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ if [ ! "$rootfs_dir" ]; then
208208
distro=$distro
209209
fi
210210

211-
print_title "patching debian rootfs"
211+
print_title "patching $distro rootfs"
212212
retry_cmd ./patch_rootfs.sh $shim_bin $reco_bin $rootfs_dir "quiet=$quiet"
213213

214214
print_title "building final disk image"

rootfs/opt/setup_rootfs.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ systemctl enable kill-frecon.service
7979

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

8484
#set up zram
8585
echo "ALGO=lzo" >> /etc/default/zramswap
@@ -112,7 +112,7 @@ END
112112
apt-get install -y $packages
113113

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

117117
if [ ! $username ]; then
118118
read -p "Enter the username for the user account: " username

rootfs/usr/local/bin/expand_rootfs

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
#this script automatically expands the root filesystem
44

55
set -e
6+
if [ "$DEBUG" ]; then
7+
set -x
8+
fi
69

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

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

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

0 commit comments

Comments
 (0)