LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-04-2017, 10:13 PM   #1
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Rep: Reputation: 176Reputation: 176
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:

util-linux 2.7.1

And I don't know what that means.

Thanks.
Attached Thumbnails
Click image for larger version

Name:	Selection_279.png
Views:	35
Size:	29.8 KB
ID:	24930   Click image for larger version

Name:	Selection_278.png
Views:	30
Size:	26.1 KB
ID:	24931  
 
Old 05-05-2017, 02:14 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
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.
 
1 members found this post helpful.
Old 05-05-2017, 07:02 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
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.
 
1 members found this post helpful.
Old 05-05-2017, 07:29 AM   #4
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
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.

Cheers, Gregg !
 
1 members found this post helpful.
Old 05-05-2017, 08:59 AM   #5
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
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.
 
1 members found this post helpful.
Old 05-05-2017, 12:20 PM   #6
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by hazel View Post
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.
Attached Thumbnails
Click image for larger version

Name:	Selection_281.png
Views:	16
Size:	33.4 KB
ID:	24934  
 
Old 05-05-2017, 12:21 PM   #7
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by yancek View Post
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.
Thanks yancek
 
Old 05-05-2017, 12:28 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
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.
 
1 members found this post helpful.
Old 05-05-2017, 12:30 PM   #9
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by Rickkkk View Post
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.

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?

And I have been using that pendrive for over a year and never had a problem with it including with BackInTime. (There's another post here with details: https://www.linuxquestions.org/quest...up-4175604826/ )

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.)

Thanks for the explanation about the compression.
Attached Thumbnails
Click image for larger version

Name:	Selection_281.png
Views:	14
Size:	33.4 KB
ID:	24935  
 
Old 05-05-2017, 12:33 PM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Gregg, can you paste the output from dpkg -l '*ntfs*' please.
 
1 members found this post helpful.
Old 05-05-2017, 12:47 PM   #11
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by yancek View Post
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.)
 
Old 05-05-2017, 12:51 PM   #12
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by hydrurga View Post
Gregg, can you paste the output from dpkg -l '*ntfs*' please.
Thanks hydrurga. The chkdsk fixed the pen drive. Here's the results of your command:

Code:
gregory@gregory-GA-A55M-DS2:~/Desktop$ dpkg -l '*ntfs*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                    Version                  Architecture             Description
+++-=======================================-========================-========================-===================================================================================
un  libntfs-3g861                           <none>                   <none>                   (no description available)
ii  ntfs-3g                                 1:2015.3.14AR.1-1ubuntu0 amd64                    read/write NTFS driver for FUSE
gregory@gregory-GA-A55M-DS2:~/Desktop$
And I'm wondering why I had the problem with the pen drive in the first place.

I don't understand that Windows' PE site but it looks amazing!
 
Old 05-05-2017, 12:57 PM   #13
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
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!
 
1 members found this post helpful.
Old 05-05-2017, 01:00 PM   #14
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by hydrurga View Post
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!
 
Old 05-05-2017, 06:10 PM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
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.

Last edited by yancek; 05-05-2017 at 06:17 PM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] usb flash drive formatting questions Gregg Bell Linux - Newbie 13 10-21-2015 10:58 PM
Cloning bootable USB flash drive onto larger flash drive - best method? cilbuper Linux - General 5 02-26-2014 09:51 AM
[SOLVED] Running 'dd' to a FLASH drive results in corrupted volume/partition leiphasw Linux - Software 6 10-30-2010 06:11 PM
Corrupted USB flash drive needs fixing (Fedora/Linpus) redmittens Linux - Hardware 7 02-14-2010 12:06 PM
USB Flash Drive, write protect, and flash file system questions storkus Linux - Hardware 4 12-01-2008 04:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration