So... after an unfortunate incident with my computer, i lost some files.
Or so i thought.
What really happenned is the fact all the files and even folders are there but are all hidden.
When i type this on the terminal, it returns this...
hatsune@hatsune:~$ ls
ls: cannot open directory .: Wrong medium type
My file manager shows me nothing, as if there was no files.
However, i can still go to folders as if they were there.
hatsune@hatsune:~$ cd Documents
hatsune@hatsune:~/Documents$
But(t) i'm not done yet !
The files are still there, look !
hatsune@hatsune:~/Documents/DEV/Gameblabla/Website_v2$ find index.htm
index.htm
And they are not corrupted anything !
However, when i try ls again, i get this :
hatsune@hatsune:~/Documents/DEV/Gameblabla/Website_v2$ ls
ls: cannot open directory .: Wrong medium type
My file manager shows me no files.
Photorec unfortunely only gives me eCryptfs files. (because i have encrypted my home directory)
So i thought... Maybe i can brute force filenames ?
I could write a bash script that could try to find all the files in a given directory and try to find the hidden filename in a loop like so.*
a.htm
aa.htm
aaa.htm
..
ab.htm
and so on.
Or maybe there is an utility for my case ?
fsck does not work unfortunely.
What should i do ?
Which kernel do you use? What I read online suggests upgrading to 4.6 or using the kernel you had before the last time you upgraded should solve the problem (Ubuntu usually keeps previous versions of the kernel accessible in GRUB, in case), otherwise I guess there's a patch coming soon.
I admit i had downgraded to Linux 4.1 due to some issues with Virtualbox. (still not compiling modules with Linux 4.6.3)
I upgraded to Linux 4.6 again and it fixed my issue.
How the hell did you know that ?
Is it because they changed the encryption thing starting with Linux 4.4 ?
Thank you, i can always count on you.
Usually I type the error message in Google and the first few links all said to upgrade to 4.6 because there was some issue with that in the older kernels. Probably because you downgraded and they changed something not retrocompatible in 4.4, yeah.
Another thing I do, regardless of the OS, is backing up my important files often, in case stuff like this happens. :P