Skip to content

Commit

Permalink
compress-force=lzo to btrfs mount options
Browse files Browse the repository at this point in the history
  • Loading branch information
emojifreak authored Nov 6, 2020
1 parent a6cae3a commit 991a9da
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion debian-rpi-sd-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,17 @@ mount -o async,discard,lazytime,noatime ${DEVFILE}p1 /mnt/boot/firmware
echo -n "Choose hostname: "
read YOURHOSTNAME
echo "$YOURHOSTNAME" >/mnt/etc/hostname
cat >/mnt/etc/fstab <<EOF
if [ ${FSTYPE} = btrfs ]; then
cat >/mnt/etc/fstab <<EOF
LABEL=RASPIROOT / ${FSTYPE} rw,async,lazytime,discard,compress-force=lzo 0 1
LABEL=RASPIFIRM /boot/firmware vfat rw,async,lazytime,discard 0 2
EOF
else
cat >/mnt/etc/fstab <<EOF
LABEL=RASPIROOT / ${FSTYPE} rw,async,lazytime,discard 0 1
LABEL=RASPIFIRM /boot/firmware vfat rw,async,lazytime,discard 0 2
EOF
fi
if [ "$SWAPGB" -gt 0 ]; then
echo 'LABEL=RASPISWAP none swap sw,discard 0 0' >>/mnt/etc/fstab
fi
Expand Down
9 changes: 8 additions & 1 deletion devuan-rpi-sd-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,17 @@ mount -o async,discard,lazytime,noatime ${DEVFILE}p1 /mnt/boot/firmware
echo -n "Choose hostname: "
read YOURHOSTNAME
echo "$YOURHOSTNAME" >/mnt/etc/hostname
cat >/mnt/etc/fstab <<EOF
if [ ${FSTYPE} = btrfs ]; then
cat >/mnt/etc/fstab <<EOF
LABEL=RASPIROOT / ${FSTYPE} rw,async,lazytime,discard,compress-force=lzo 0 1
LABEL=RASPIFIRM /boot/firmware vfat rw,async,lazytime,discard 0 2
EOF
else
cat >/mnt/etc/fstab <<EOF
LABEL=RASPIROOT / ${FSTYPE} rw,async,lazytime,discard 0 1
LABEL=RASPIFIRM /boot/firmware vfat rw,async,lazytime,discard 0 2
EOF
fi
if [ "$SWAPGB" -gt 0 ]; then
echo 'LABEL=RASPISWAP none swap sw,discard 0 0' >>/mnt/etc/fstab
fi
Expand Down

0 comments on commit 991a9da

Please sign in to comment.