How to rename/delete files and directories stored on a different partition than the OS one?

Hi! I have an ext4 partition dedicated to EOS and another (ntfs partition) where I keep my documents. That way, if something goes wrong, like OS corruption and/or loss after an update, I have more chances don’t lose them.

Now, very often and for the first time, if I remember correctly, I am unable to rename/delete many files and directories stored in the ntfs partition. I get different types of error messages:

1st) “Error renaming file /run/media/Archive/W: Directory not empty”. This applies to many directories created before OS installation and the operation fails.

2°) “Error getting information for file “/run/media/Archive/W/x”: input/output error
Error renaming file /run/media/Archive/W/x: input/output error”. This applies to many files created before installing the operating system and the operation fails.

3rd) “Do you want to move the file ‘W’ [it is a directory] to the trash?” ‘Yes’ “Some files cannot be moved to the trash because the underlying file systems don’t support it. Do you want to delete them instead?” ‘Yes’ “x: error removing file /run/media/W/x: input/output error”. This applies to files/directories created before the operating system was installed and the operation fails.

4th) “Some files cannot be moved to the trash because the underlying file systems do not support this operation. Do you want to delete them instead?” ‘Yes’. This applies to files/directories created after OS installation and it works.

Is there a solution to change (rename or delete) directories and files without exception?

NB The directories and the files they contain are in Read/Write mode and their permissions agree with the user executing the commands.

Quick question:

Are you using ntfs or ntfs-3g for the ntfs partition?

ntfs-3g

What does mount -l show?

Also, are we talking about an external drive here? Or an actual partition on your drive?

Just for FYI, here is the base install package list for EnOS.

At line 150 is ntfs-3g
so ntfs-3g is installed by default by EnOS.

Pudge

$ mount -l
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=4096k,nr_inodes=984945,mode=755,inode64)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,size=1583316k,nr_inodes=819200,mode=755,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sdb1 on / type ext4 (rw,noatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=33,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=14582)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=3958284k,nr_inodes=1048576,inode64)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
/dev/sdb2 on /run/media/STORAGE type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096) [STORAGE]
/dev/sdb3 on /boot/efi type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=791656k,nr_inodes=197914,mode=700,inode64)
/dev/nvme0n1p5 on /run/media/root/ceffcee9-fcbe-4aa1-994d-cdc300b76ece type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,uhelper=udisks2)
/dev/sdc on /run/media/root/Win11.21h2.3in1.Fr.x64 type udf (ro,nosuid,nodev,relatime,uid=0,gid=0,iocharset=utf8,uhelper=udisks2) [Win11.21h2.3in1.Fr.x64]

NB STORAGE is the partition where I stock my documents.

Also, are we talking about an external drive here? Or an actual partition on your drive?

Well, I have two SSDs and currently two installed EOS. The first is installed on the internal drive and the second on an external one. The partition where I keep my documents is on the external drive. Whichever OS I use, the result is the same.

I’m quite concerned about the input/output error part, to tell you the truth.

Do you have access to a windows machine where you can do a scan on the drive?

Actually, this is a critical point on which, by the way, I thought I’d publish another post. When I have installed EOS to the internal drive by choosing systemd-boot as the boot loader, it destroyed my Windows partition. Currently I only have one version of Windows 11 installed on Virtualbox because if I reinstall Windows on the disk it will reformat my entire disk and erase everything else. It is OEM licensed.

But I could do a chkdsk scan with the repair tool or maybe using PowerShell.

Before doing anything, I would suggest backing all your files to an ext4 disk, just in case something happens. I would also suggest using fat32 for a shared data partition. At least the filesystem and its tools under Linux are less prone to breakage, at least in my limited experience.

@anthony93
Congratulations! You understood the problem and the solution at the first attempt. With the Windows recovery tool I launched the console to list the partitions with Diskpart and to scan them with CHKDSK. The result was: many mistakes in the partition in which I keep my documents and zero in the Windows partition that I can’t start. Now I can rename/delete files and directories on the first partition. Secondly, I know that the Windows partition is in good condition, but the problem is that it is encrypted and read-only. This happened with the installation of EOS on my laptop. If I find the good method to change this situation, I will be able to boot Windows again.
@eznix

I also think it’s a good thing. I did it for years and after I have wanted to try ntfs. To return to fat32, I have to convert the second and especially in this case a previous backup is absolutely necessary.

To finish, I have another problem, but this concerns EOS (it is much slower on the laptop drive than on the external disk). But I think that to try to solve this new problem I will have to open another topic.

Thank you very much.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.