Run cleanup command if SD card was not unmounted properly #70

Closed
opened 2021-07-29 19:31:42 +02:00 by muellerr · 2 comments
Owner

If the OBSW is restarted and the SD card was not unmounted, an error can occur when remounting the SD card. I have issue reproducing the issue right now, but I think the error can be detected by piping the output of mount /dev/mmcblk<0/1>p1 /mnt/sd<0/1> to a file and checking whether it is empty or not in the OBSW.

The simple solution would be to check whether this error occured and then repair the system with the command

fsck -a /dev/mmcblk<0/1>p1

to remove the dirty bit

If the OBSW is restarted and the SD card was not unmounted, an error can occur when remounting the SD card. I have issue reproducing the issue right now, but I think the error can be detected by piping the output of `mount /dev/mmcblk<0/1>p1 /mnt/sd<0/1>` to a file and checking whether it is empty or not in the OBSW. The simple solution would be to check whether this error occured and then repair the system with the command ```sh fsck -a /dev/mmcblk<0/1>p1 ``` to remove the dirty bit
muellerr changed title from Run `fsck -a /dev/mmcblk<sd>p2` if SD card was not unmounted to Run cleanup command if SD card was not unmounted properly 2021-07-29 19:33:29 +02:00
Author
Owner

After performing some research, I found out that the output is produced by the kernel, and can
be queried with

journalctl -t kernel -n 3

after mounting the SD card.
Now the question remains whether this outout is always checked directly after mounting the SD card or whether the fsck command is just run everytime..

Also, remember this for #68 , getting the kernel output log requires using -t instead of -u

After performing some research, I found out that the output is produced by the kernel, and can be queried with ``` journalctl -t kernel -n 3 ``` after mounting the SD card. Now the question remains whether this outout is always checked directly after mounting the SD card or whether the `fsck` command is just run everytime.. Also, remember this for #68 , getting the kernel output log requires using `-t` instead of `-u`
Author
Owner

This was solved by using an ext4 journaling filesystem

This was solved by using an `ext4` journaling filesystem
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: eive/eive-obsw#70
No description provided.