Files
odroid-stamper/fixups/S90-fstab
Dongjin Kim 04f9e36adf functions/fixups: edit /etc/fstab when it exists
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I5b8054b8951f16ba48da4cacdab5f7af23f91f1c
2024-01-21 00:30:59 +09:00

24 lines
571 B
Bash
Executable File

#!/bin/sh
if [ -f /etc/fstab ]; then
# Remove BOOT/ROOTFS mount points
sed -i "/ \/boot /d" /etc/fstab
sed -i "/ \/ /d" /etc/fstab
# Remove EFI partition not to mount
sed -i "/\/boot\/efi/d" /etc/fstab
fi
if [ "x@@DEFAULT_DEV_ROOTFS@@" != "x" ]; then
cat <<__EOF | tee -a /etc/fstab >/dev/null
UUID="@@DEFAULT_DEV_ROOTFS@@" / ext4 rw,relatime,data=ordered 0 0
__EOF
fi
if [ "x@@DEFAULT_DEV_BOOT@@" != "x" ]; then
cat <<__EOF | tee -a /etc/fstab >/dev/null
UUID="@@DEFAULT_DEV_BOOT@@" /boot ext2 rw,relatime,errors=continue 0 0
__EOF
fi
update-initramfs -u