[SOLVED] questions about a usb flash drive that might be corrupted
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
questions about a usb flash drive that might be corrupted
I'm suspecting my flash drive is corrupted. I looked at it in Gparted and indeed there's a warning icon (screenshot 279) but I don't know what it means.
And regarding the same drive (which I use to back up my stuff via Back In Time) I don't understand how the space usage works. (screenshot 278). The size says 22.8 GB. The usage says: 2.9 GB.
Lastly, I heard about using fsck to check the flash drive. When I do (I honestly don't know if I'm doing it right.) all it says is:
Apparently you need to run the Windows chkdsk on this to clear the error.
Quote:
Originally Posted by AskUbuntu
An exclamation mark beside a partition means that GParted encountered a problem when reading the partition. With NTFS the most common problem is that Windows was not shut down properly and that the NTFS file system is in an inconsistent state. An inconsistent NTFS file system can be fixed often by just booting into Windows (Windows should automatically run "chkdsk" on the partition) and then using the menu option Start -> Shutdown. If that doesn't work, you can also run "chkdsk /f /r" on the drive letter for the partition from a Windows command prompt and then reboot into Windows twice.
The 'fsck' command is used to do a filesystem check on "Linux" partitions and the partition you are showing is the proprietary microsoft windows "ntfs" so fsck won't do anything and as pointed out above, you need to run chkdsk from windows.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
Hey Gregg,
There's not necessarily anything wrong with your USB drive. You would have to look at the partition information in GParted to confirm what the warning icon is saying in your particular case. It may just be that you don't have ntfs functionality installed on your linux box.
If it does indeed turn out to be a corrupted file system issue, yancek and hazel are correct in saying that this has to be addressed in Windows using chkdsk (eventually with the /f switch to repair).
Finally, although I'm unfamiliar with the Back In Time application, backup software often applies proprietary compression algorithms when backing up files and achieves significant compression ratios. So it is not impossible that 22 GB of normal space usage would be reduced to 3 GB of actual used space on the backup media. I personally no longer use that type of backup system, since it requires the same application to retrieve backed up files in case of need. With storage space so inexpensive nowadays, I prefer straight-copy solutions.
In order to check that disk, you should boot up into a Windows operating system and run chkdsk.
If you don't have such an operating system handy (even as a Virtual Machine or as part of a Windows install/rescue disk), then one possibility is to create a Windows PE boot media and boot up off that.
You can get a ready-made ISO of one of these, Gandalf's Windows 10 PE, at http://windowsmatters.com/category/windows-pes/. It's a hefty download, 4.3GB, but contains more Windows system tools than you can shake a stick at. Personally, I just boot off my Macrium Reflect ISO (which I use for imaging my partitions and which boots up in a Windows PE environment) and use chkdsk from that.
Apparently you need to run the Windows chkdsk on this to clear the error.
Thanks hazel. Before I try that (and when I run the chkdsk on Windows will I lose the data that's on there?) I found some info (per Rick's suggestion) which says I might need some software packages. I just figured I'd post it in case it changed the situation.
The 'fsck' command is used to do a filesystem check on "Linux" partitions and the partition you are showing is the proprietary microsoft windows "ntfs" so fsck won't do anything and as pointed out above, you need to run chkdsk from windows.
The Linux programs you refer to in the image in your last post (ntfs-3g, ntfsprogs) will allow you to read/write to a windows partition. It won't do anything to repair any windows filesystem. There is Linux software, ntfsfix which might repair very minor problems on a windows filesystem but to repair a corrupted windows filesystem you will almost always need to use chkdsk from windows.
There's not necessarily anything wrong with your USB drive. You would have to look at the partition information in GParted to confirm what the warning icon is saying in your particular case. It may just be that you don't have ntfs functionality installed on your linux box.
If it does indeed turn out to be a corrupted file system issue, yancek and hazel are correct in saying that this has to be addressed in Windows using chkdsk (eventually with the /f switch to repair).
Finally, although I'm unfamiliar with the Back In Time application, backup software often applies proprietary compression algorithms when backing up files and achieves significant compression ratios. So it is not impossible that 22 GB of normal space usage would be reduced to 3 GB of actual used space on the backup media. I personally no longer use that type of backup system, since it requires the same application to retrieve backed up files in case of need. With storage space so inexpensive nowadays, I prefer straight-copy solutions.
Cheers, Gregg !
Thanks Rick. I think I found the information you were talking about (screenhot). Does that change things at all or still run the Windows chkdsk?
I always thought NTFS was the most sensible format for pendrives because it worked on Ubuntu and Windows. Is there a better format for doing that?
And I thought BackInTime was great, but obviously that 32 GB drive has enough room (and I do have a new 64GB pendrive too) to handle a direct copy situation, but what's the best way of doing that? (I should probably post on that.)
The Linux programs you refer to in the image in your last post (ntfs-3g, ntfsprogs) will allow you to read/write to a windows partition. It won't do anything to repair any windows filesystem. There is Linux software, ntfsfix which might repair very minor problems on a windows filesystem but to repair a corrupted windows filesystem you will almost always need to use chkdsk from windows.
Thanks yancek. I ran the chkdsk and the 'scan and repair' and it fixed it. Thanks. Not sure what you meant by:
Quote:
The Linux programs you refer to in the image in your last post (ntfs-3g, ntfsprogs) will allow you to read/write to a windows partition.
Isn't NTFS a windows partition? (And I've been reading and writing to it all along.)
Ah, all is good. Thanks, Gregg. The ntfs-3g package should be auto installed in Ubuntu to allow you to talk to NTFS filesystems - I just wanted to check that this was the case and that nothing was awry. Don't worry about the ntfprogs package, it was superseded by ntfs-3g.
Ah, all is good. Thanks, Gregg. The ntfs-3g package should be auto installed in Ubuntu to allow you to talk to NTFS filesystems - I just wanted to check that this was the case and that nothing was awry. Don't worry about the ntfprogs package, it was superseded by ntfs-3g.
I'm glad all worked out ok!
Awesome! Thanks for the check and thanks everyone for the help!
Isn't NTFS a windows partition? (And I've been reading and writing to it all along.)
Yes, that's true but your initial post indicated a problem with the windows ntfs filesystem on the flash drive partition and my understanding was that you posted because you were having problems with it. To fix that, you need to do it in windows which you say you did and in all likelihood, the ntfs-3g and ntfsprogs were already installed. In any case, the purpose of that sofware is to allow read/write to ntfs and would do nothing to resolve a corrupted filesystem. Glad you got it working.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.