MacOS – Can you damage the file system by forcing a shutdown or cold rebooting during startup

macoswindows

My idea is that during startup (macOS or Windows), you can't damage the file system if you interrupt it as the drive is not being written to, just reading from. I've heard that's not the case, and that during startup the drive may be written to. what can be written to a startup drive during boot?

Please clear up my mind. Thank you.

Best Answer

It is possible to damage the file system by forcing a shutdown (i.e. for example by cutting off power) during startup.

During startup the operating system can write to files such as for example log files, pid files, caches, or in very extreme cases also swap files for virtual memory. Therefore the file system on disk can be modified by the operating system during startup - and thus there is a risk that something goes wrong if this is interrupted forcibly midways.

Modern file systems (such as the ones normally used on macOS systems) try to avoid corruption by the way of a technique called journaling. Therefore you'll probably experience that nothing goes wrong if you try interrupting the boot to test this out - however there is a risk.