Correct cmdline.txt and fstab editing for the new OS version

This commit is contained in:
Oleg Kalachev
2024-04-18 05:04:43 +03:00
parent d8c26c114e
commit be27a6d3a3

View File

@@ -48,8 +48,12 @@ sed -i "19a${MAGIC_SCRIPT}" /etc/rc.local
# It needs for autosizer.sh & maybe that is correct # It needs for autosizer.sh & maybe that is correct
echo_stamp "Change boot partition" echo_stamp "Change boot partition"
sed -i 's/root=[^ ]*/root=\/dev\/mmcblk0p2/' /boot/cmdline.txt sed -i 's/root=[^ ]*/root=\/dev\/mmcblk0p2/' /boot/cmdline.txt
sed -i 's/.* \/boot vfat defaults 0 2$/\/dev\/mmcblk0p1 \/boot vfat defaults 0 2/' /etc/fstab sed -i 's/root=[^ ]*/root=\/dev\/mmcblk0p2/' /boot/firmware/cmdline.txt
sed -i 's/.* \/boot/firmware vfat defaults 0 2$/\/dev\/mmcblk0p1 \/boot/firmware vfat defaults 0 2/' /etc/fstab
sed -i 's/.* \/ ext4 defaults,noatime 0 1$/\/dev\/mmcblk0p2 \/ ext4 defaults,noatime 0 1/' /etc/fstab sed -i 's/.* \/ ext4 defaults,noatime 0 1$/\/dev\/mmcblk0p2 \/ ext4 defaults,noatime 0 1/' /etc/fstab
cat /boot/cmdline.txt
cat /boot/firmware/cmdline.txt
cat /etc/fstab
echo_stamp "Set max space for syslogs" echo_stamp "Set max space for syslogs"
# https://unix.stackexchange.com/questions/139513/how-to-clear-journalctl # https://unix.stackexchange.com/questions/139513/how-to-clear-journalctl