I recently started using Linux Ubuntu on my first ever Linux-pc. The pc is running a modded minecraft server, and has been working wonderfully.

But today when i started the PC, I just got a black screen with no signs of Ubuntu. After a few minutes I restarted the PC and it booted properly.

But then when I got into the PC, a bunch of files were gone, including .minecraft.

My java verision was also reset to 11.0.6, even though i recently downgraded to java 8 to be able to run the minecraft server.

Is there anything I can do to prevent this data loss or will I just have to live with it?

Might be worth noting that I did check the trash, and there were no files there.