Acting as an external drive!
(1) Get your hard disk out.
(2) Connect it to another computer as an external drive. (In this way, you can read the files on the hard disk even if the operating system is down.)
(3) Copy the necessary files on the hard disk to another storage medium.
(4) Put the hard disk back in the original computer.
(5) Reinstall the system.
(6) Copy the files back.