It sounds like its running on an SSD and data got lost/corrupted from being offline for too long. This happens more often on aged SSDs or if the device got stored at >= 40° C.
Offline SSD data retention are abysmally bad given unlucky conditions or if the SSD is old (the table describes data retention for new drives).
There's likely going to be error reports in SMART. You can check them with sudo smartctl -a /dev/sda
.
If you don't know how to interpret those values you can post them here.
If I'm right, the only advise I can tell is to plug the disk on another computer (or boot from liveusb) try to save as much data as possible and full format that drive unless SMART says that disk is dying hard.
To format such a drive you will have to first do (WARNING THIS WILL WIPE ALL OF THE DISK's CONTENTS):
sudo blkdiscard /dev/sda
And then perform a security erase via hdparm. Be sure to read the whole wiki before proceeding, and that you've read all the disclaimers. I recommend you first google your SSD model to see if others have already tried to use hdparm's security erase on your model to double check it won't be bricked.
If you have doubts then only execute blkdiscard and then format the entire disk via GPart.
- Note: I've been assuming your SSD lives in /dev/sda. If your disk is for example NVMe, it may live in e.g.
/dev/nvme0n1
Small update
Assuming I'm right about all this, then just give up in trying to get that Ubuntu installation working again without formatting; and this became a disk rescue operation.
What I'd recommend is to first (from another machine or liveusb) backup the whole disk via dd into another disk (with sda unmounted):
sudo dd dd if=/dev/sda of=somewhere.raw bs=32M
And after you've run that command, run:
sudo fsck -vfn /dev/sda
With luck, many of the lost files will be in lost+found after that command.
If that doesn't do, then you may want to run a hex editor or "undelete" programs to try to rescue raw data from the disk.
Which is basically what forensics do to recover data from damaged disks.