Skip to content

Commit 991a9da

Browse files
authored
compress-force=lzo to btrfs mount options
1 parent a6cae3a commit 991a9da

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

debian-rpi-sd-builder.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,17 @@ mount -o async,discard,lazytime,noatime ${DEVFILE}p1 /mnt/boot/firmware
148148
echo -n "Choose hostname: "
149149
read YOURHOSTNAME
150150
echo "$YOURHOSTNAME" >/mnt/etc/hostname
151-
cat >/mnt/etc/fstab <<EOF
151+
if [ ${FSTYPE} = btrfs ]; then
152+
cat >/mnt/etc/fstab <<EOF
153+
LABEL=RASPIROOT / ${FSTYPE} rw,async,lazytime,discard,compress-force=lzo 0 1
154+
LABEL=RASPIFIRM /boot/firmware vfat rw,async,lazytime,discard 0 2
155+
EOF
156+
else
157+
cat >/mnt/etc/fstab <<EOF
152158
LABEL=RASPIROOT / ${FSTYPE} rw,async,lazytime,discard 0 1
153159
LABEL=RASPIFIRM /boot/firmware vfat rw,async,lazytime,discard 0 2
154160
EOF
161+
fi
155162
if [ "$SWAPGB" -gt 0 ]; then
156163
echo 'LABEL=RASPISWAP none swap sw,discard 0 0' >>/mnt/etc/fstab
157164
fi

devuan-rpi-sd-builder.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,17 @@ mount -o async,discard,lazytime,noatime ${DEVFILE}p1 /mnt/boot/firmware
134134
echo -n "Choose hostname: "
135135
read YOURHOSTNAME
136136
echo "$YOURHOSTNAME" >/mnt/etc/hostname
137-
cat >/mnt/etc/fstab <<EOF
137+
if [ ${FSTYPE} = btrfs ]; then
138+
cat >/mnt/etc/fstab <<EOF
139+
LABEL=RASPIROOT / ${FSTYPE} rw,async,lazytime,discard,compress-force=lzo 0 1
140+
LABEL=RASPIFIRM /boot/firmware vfat rw,async,lazytime,discard 0 2
141+
EOF
142+
else
143+
cat >/mnt/etc/fstab <<EOF
138144
LABEL=RASPIROOT / ${FSTYPE} rw,async,lazytime,discard 0 1
139145
LABEL=RASPIFIRM /boot/firmware vfat rw,async,lazytime,discard 0 2
140146
EOF
147+
fi
141148
if [ "$SWAPGB" -gt 0 ]; then
142149
echo 'LABEL=RASPISWAP none swap sw,discard 0 0' >>/mnt/etc/fstab
143150
fi

0 commit comments

Comments
 (0)