New answers tagged

1

Enable a journal on your root partition: tune2fs -O has_journal /dev/mmcblk0p2 The journal enables the filesystem to revert to a consistent state after a crash. You may still lose data that was being written when you pulled the plug (so pulling the plug during a system upgrade may still result in an unbootable system), but it will not be possible for a ...


0

Depending on your specific project, you could also just mount the rootfs partition (or any other which is written to) as read-only via changing the mount options in /etc/fstab : in the (normally) third line it mounts the root partition, so you add ,ro after the default defaults,noatime. Note, that after a reboot, you won't be able to write to that partition ...


Top 50 recent answers are included