How can I check and mark bad blocks on Linux startup? There are a number of options available and most of them require accessing hardware and running live CD's. But I would like to avoid and perform everything using command line without going to the server room and talking to admins who have the keys.I have ArchLinux with / on ext4fs.
archlinux check disks on boot
arch linux;ext4;fsck
If your init scripts support it, you can add -c -c to /fsckoptions (then create /forcefsck and reboot). Unfortunately, this feature isn't available everywhere. You probably have to reboot to a LiveCD/LiveUSB instead.Perform Bad Blocks Scan on Root Partition in Linux