Detect SquashFS errors (bad medium or optical drives) while Tails is running
Usually, when the medium is in bad shape, or if the optical drive has issues reading it properly, the live system starts to respond in strange ways (e.g. application crashes or don’t start at all).
When this happens the kernel issues messages like the following:
[ 55.816599] SQUASHFS error: xz_dec_run error, data probably corrupt
[ 55.816603] SQUASHFS error: squashfs_read_data failed to read block 0x7e05a9b
[ 55.816606] SQUASHFS error: Unable to read data cache entry [7e05a9b]
[ 55.816608] SQUASHFS error: Unable to read page, block 7e05a9b, size 6cac
Let’s add to the wishlist an application that would monitor for these messages, and display a warning notification in case it happens stating something like:
The system is having trouble reading Tails CD. Either the medium has defects or the optical drive is not able to read it properly.
Please try another CD or use Tails from a USB stick.
This is about code and should be pretty easy for someone that knows a bit of either Perl or Python and GTK+ (no need for deep knowledge of Tails internals).
Ideally, the files needed by this application should be closer to the start of the CD and (maybe) locked into memory. That’s in the hope there is less chance it will be unreadable itself.
Related issues
Original created by @tails on 5856 (Redmine)