You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# initial rootfs size override. dietpi-imager will shrink it as much as possible, but the larger the initial rootfs size, the larger the resulting image.
63
64
# See "root_size" below for per-SBC defaults, which may not work with all combinations of options, and are updated regularly.
64
65
ROOT_SIZE=
@@ -82,6 +83,7 @@ do
82
83
'--test-kernel') TEST_KERNEL=1;;
83
84
'--test-uboot') TEST_UBOOT=1;;
84
85
'--root-size') shift; ROOT_SIZE=$1;;
86
+
'--rk35xx-mainline') RK35XX_MAINLINE=1;;
85
87
*) Error_Exit "Invalid input \"$1\"";;
86
88
esac
87
89
shift
@@ -208,11 +210,11 @@ case $PTTYPE in
208
210
esac
209
211
210
212
# Check for valid root filesystem type and set variables accordingly
# - Pre-install Allo GUI with all managed audiophile software
597
-
# - Temporarily skip Trixie AlloGUI builds: The netdata package is currently not available (only on Raspbian, not Debian) and systemd-logind fails to start within the container as of a new change/bug, to investigate.
Copy file name to clipboardExpand all lines: .build/images/dietpi-imager
+10-31Lines changed: 10 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -397,14 +397,17 @@
397
397
# - resize2fs: "Please run 'e2fsck -f /dev/loop0p1' first."
398
398
Run_fsck
399
399
# - Use sfdisk to detect last partition, as lsblk with "-r" option on Bullseye does not sort partitions well: https://github.com/MichaIng/DietPi/issues/7527
400
-
local last_part_dev=$(sfdisk -qlo Device "$FP_SOURCE"| tail -1)
400
+
local last_part_dev=$(sfdisk -lqo Device "$FP_SOURCE"| tail -1)
401
401
local last_fs_type=$(lsblk -no FSTYPE "$last_part_dev")
402
-
if [[ $last_fs_type=='ext4' ]]
402
+
if [[ $last_fs_type=='ext'[234] ]]
403
403
then
404
-
# Disable (and later re-enable) journal to clear it and allow further size reduction
405
-
G_EXEC tune2fs -O '^has_journal'"$last_part_dev"
406
-
G_EXEC sync
407
-
G_SLEEP 1
404
+
if [[ $last_fs_type=='ext'[34] ]]
405
+
then
406
+
# Disable journal to allow further image size reduction and allow dietpi-fs_partition_resize to re-create it with proper size based final filesystem size
407
+
G_EXEC tune2fs -O '^has_journal'"$last_part_dev"
408
+
G_EXEC sync
409
+
G_SLEEP 1
410
+
fi
408
411
409
412
# Run multiple times until no change is done any more
410
413
G_DIETPI-NOTIFY 2 'Shrinking last filesystem to minimum size...'
@@ -487,32 +490,8 @@
487
490
[[ $type ]] ||continue
488
491
if [[ $type=='ext'[234] ]]
489
492
then
490
-
# Disable (and later re-enable) journal on ext3 and ext4 to clear it if not last partition (where it was done already)
0 commit comments