Manjaro loses my files and folders after every reboot

Hello, I am on Manjaro 20.1 in dualboot with win10.
For the past few days, I have realized that I am losing entire files and folders after restarting.
My HDDs are healthy.
I first thought of a problem with the automatic session saving, because it happened that the window group duplicated identically, I told myself that I was doing in a window group was not registered by the second.
But, after disabling session recording, and saving files and folders (before disappearance) to another drive, after several reboots, I first lost the folder containing the files in question, then the entire HDD partition. ! Everything is there since the disc is not empty, but Manjaro no longer displays anything.

I have a problem with groups and users, I regularly have read-only access to my secondary disks, and K3b asks me for access rights to the “optical” group to be able to burn.
Is the problem certainly there?

I lose all my backups, what should I do?

Windows, Manjaro and /home on same disk? Do you have access to files from Windows or live? It sounds like dying disk to me.

I forgot to precise :
I have windows and manjaro on the same disk, but the disappearance of files and folders happened on an external disk.
The disappearance of the complete disk is another secondary disk, where I wanted to save the remaining files.

On a live Manjaro session it is exactly the same, on Windows the disk is present, everything is there, except that the folder recently created with Manjaro is not accessible because it is “damaged or unreadable”.
So the problem is with Manjaro.
I would like to check the groups and user rights, what do I type as a command to see if everything is in order?

What is the format of the external drive/s? If vfat they won’t have groups and permissions.

You can use gparted to see the format.

They are all in NTFS.

My primary concern is to find the problem so that it doesn’t happen again. What I lost I would find with Recuva.

For NTFS partitions, you should use chkdisk from Windows.
https://wiki.archlinux.org/index.php/NTFS-3G#Damaged_NTFS_filesystems

With the latest versions of Windows, you shall also be careful it shutdowns correctly before switching to Linux.
https://wiki.archlinux.org/index.php/NTFS-3G#Metadata_kept_in_Windows_cache,_refused_to_mount

2 Likes

Windows has nothing to do with it, it’s Manjaro who loses my files, and I would like to find the problem so that it does not happen again.

From a linux perspective the problem is NTFS.
Are you unmounting the NTFS drives before shutting down?

reading up on NTFS-3g may help you here.

1 Like

Yes I unmount my hard drives before removing them, but most often, I turn off the pc with the disk plugged in.

Add :

I note NTFS3G,
but for the moment I do not return under manjaro before having identified the problem. I would use Recuva on Windows to recover my files.

A question comes to me; I have always used NTFS for storage because it supports large files over 4gb.
But are there formats for more adaptive / stable storage on both systems?

In my view it is always recommend to use for exchanges between Linux and Windows a filesystem without permission management like FAT32 or exFAT. Because of ACL of Windows and Linux is different there can always happen problems, even if it is stable. Perfectly would be a Home-Server NAS with Samba support.

Just a side note: ntfs-3g is a reverse-engineered module. Therefore it can handle NTFS Partition and it does it as good as possible (since not every function is implemented), but i would always use it in read-only mode. Just my humble opinion.

Face it. Damaged files comes not from Windows, but Linux has not a suitable tool to repair the NTFS filesystem. Only ntfsfix, which has a really basic function. Check you partition on windows before writing with Linux.

4 Likes

Thanks for clarity re ntfs-3g.
I must say exFat is not something i’d looked into. I’d previously used ntfs as share between windows but have always had back ups.

2 Likes

I don’t understand, I just restarted on Manjaro, I have user rights on all my disks, but I don’t have write access.

[jb@Manjaro ~]$ ls -l /run/media/jb/
total 552
drwxrwxrwx 1 jb jb  20480 17 oct.   2016  9C14EE4214EE1F50
drwxrwxrwx 1 jb jb   4096  7 oct.  22:20  B294418394414AD5
drwxrwxrwx 1 jb jb  32768  7 oct.  22:20 'HDD 500Go interne'
drwxrwxrwx 1 jb jb 323584  7 oct.  22:20  Stockage
drwxrwxrwx 1 jb jb 184320  8 oct.  16:15 'Stockage 2'

I checked in the properties of the disks, is everything ok, owner, group and others can access and modify, but I can’t even create a folder !?

However, I can do whatever I want on the desktop, but when I go to the manjaro part with Dolphin, no more write access!

The problem comes from there !?

add:
I just saw that my Manjaro part belongs to the group and to the “root” user.

Just so all you know, we noobs do learn a lot from reading this forum, more than from the WIKIs in general. I was also about to setup an NTFS partition next to ym BTRFS on my secondary storage disk to serve as a bridge between a Win10 disk (only for Adobe and Apex gaming and online rtading app), but reading this advice here and this whole case now I will use exFAt or FAT32. Which one you suggest if the priority is on basic data safety and Linux-Win10 compatibility (not speed or any fancy extra features)?

1 Like

I just changed the owner of my Manjaro part, it’s ok it works in read-write, but for everything else, which shows me exactly the same thing yet, read only …
I do not understand.

Hello,

Just a suggestion, It might be worth it, to really read about Linux filesystems, How windows handles linux files, or vise versa depends on a really good view of what is needed to get a solid resolution. Though some may feel different due to windows having a subsystem of linux, but that is still done from a windows perspective and doesn’t really fit sometimes. There are scores of info on this subject when doing a search on the forum, the net, and especially in the archwiki.

while this works everywhere more or less (like for plugging a USB into a random printer)
Its old and unsecure and not all that fast and … mainly … has a maximum file size of 4gb.
(thats right … try to drop a 6gb movie into it, and it wont work)

2 Likes

in general: If you need support for files over 4 Gigs, then use exFAT, otherwise FAT32. Both Filesystems have no journal, nothing of this at all, so if something goes wrong there, then there is no journal that can recover data. It is just stupid simple as copy a file to it and anyone can read it. It should just used for one thing: Exchange data. Nothing more.

I recommend to use it like that:

  1. Linux has a folder that you want to share to windows.
  2. Copy it to the exFAT/FAT32 Partition and let Windows read it after reboot.
  3. Have always a copy of the data on your own home partition.
1 Like

By everything else do you mean external drives?


For mounting a FAT32 drive I use fstab. The options users,umask=000 are set to make the drive read/write, something like:

UUID=<uuid> <mount location> vfat users,umask=000,nofail,x-systemd.device-timeout=60s,noatime 0 2

nofail - means no error if disk not present
noatime - don’t update file modification date (to reduce writes to solid state disk)


For ntfs it seems you need to add gid and uid options, somelike:

UUID=<uuid> <mount location> ntfs-3g uid=<user>,gid=users,umask=0027

<uuid> - replace with disk’s uuid
<mount location> - replace with the path where the drive is to be mounted
<user> - replace with user name

see this post
https://bbs.archlinux.org/viewtopic.php?pid=1577614#p1577614


More info on fstab for automounting:
https://wiki.archlinux.org/index.php/fstab

1 Like

Thank you, I will look at this as soon as possible, but it is possible that I will redo a clean installation (if we consider that the old yet very recent was not …).