Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, looks like my external drive's file system (NTFS) is corrupted as whenever I'm connecting it, it just loads as read-only. I feel the problem has been caused 'cos the USB cable seems to be cutting out power to it at times when I accidentally touch the cable. Most of the times I even get a kernel panic when I "safely remove the drive", but:
-how can I confirm that it's the file system having got corrupt and not something else?
-Is my data at risk?
-Since this is my data backup drive, gparted says I have about 130GB free - can I partition this so I have the 130GB as another filesystem and continue with backing up to the new partition?
-Is a damaged filesystem repairable without data corruption?
-(appologies if I sound crazy here, but no harm asking) Is it possible to change the filesystem of the corrupted drive/partition?
The 'read only' could be a kernel thing. Have you CONFIG_NTFS_RW=y?
The kernel .config is often in /boot
Use
mount -t ntfs-3g -o rw /dev/sd?? /somewhere
The 'read only' could be a kernel thing. Have you CONFIG_NTFS_RW=y?
The kernel .config is often in /boot
Use
mount -t ntfs-3g -o rw /dev/sd?? /somewhere
Thanks, 'business_kid'
I didn't find any kernel .config file in /boot but I did manage to find a .config file in /usr/src/linux-headers-3.0.0-12-generic in which there is reference to CONFIG_NTFS_RW
Here's what the file reads
Code:
CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set
Surprisingly, I used to regularly backup my data to this external USB drive from my Linux Mint but suddenly once I connected it and it just showed all as 'read-only' - that was why I suspected to to be a file system corruption (knowing the power-cut isue I have).
Quote:
Originally Posted by business_kid
mount -t ntfs-3g -o rw /dev/sd?? /somewhere
Do I need to run this command? Hope it would not mess up any of the data in my drive.
The kernel's built in NTFS driver has only limited support for writes. The comment for the CONFIG_NTFS_RW option states:
Quote:
This enables the partial, but safe, write support in the NTFS driver.
The only supported operation is overwriting existing files, without changing the file length. No file or directory creation, deletion or renaming is possible. Note only non-resident files can be written to so you may find that some very small files (<500 bytes or so) cannot be written to.
Proper write support is provided by the userspace ntfs-3g driver, which does not depend on the kernel's NTFS support at all.
It's been so long I was mixing the older ntfs driver which never got writes sorted, and ntfs-3g which did.
So if you mount ntfs - it's the old (read only) driver
For read/write - use ntfs-3g
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.