LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   USB file system erased itself? (https://www.linuxquestions.org/questions/linux-software-2/usb-file-system-erased-itself-4175622024/)

guntanemo 01-20-2018 03:49 AM

USB file system erased itself?
 
This is the 2nd USB that seems to have deleted its index of the file system or something. I buy a brand new USB drive, open it, format it to NTFS for use for a music USB drive for my car (has a usb port) throw some music on it and by the time I plug it into my car the next morning the filesystem seems to have deleted itself.

I plug it into the very same computer I formated it with and verified the files were on it and it gave the error:


"Unable to access "MUSIC". Error mounting /dev/sdb1 at /media/name/MUSIC: Command-line 'mount -t ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=`000,gid=1000" "dev/sdb1" "/media/name/MUSIC" exited with non-zero status 13: $MFTMirr does not match $MFT (record 0)."

it then goes on about how I should plug it into a Windows system to fix it, which I did not do and have no intention of doing. I cant seem to find anything about this error, which is incredibly weird, for example searx.me returns 3 results for "exited with non-zero status 13", none of which have anything to do with this problem.

syg00 01-20-2018 04:03 AM

How do you umount the drive after copying the music ?. And why NTFS ?.

ferrari 01-20-2018 05:25 AM

You might be able to recover from this using ntfsfix (part of ntfsprogs)

Code:

sudo ntfsfix /dev/sdb1
Quote:

DESCRIPTION
ntfsfix is a utility that fixes some common NTFS problems. ntfsfix is NOT a Linux version of chkdsk. It only repairs some fun-
damental NTFS inconsistencies, resets the NTFS journal file and schedules an NTFS consistency check for the first boot into Win-
dows.

You may run ntfsfix on an NTFS volume if you think it was damaged by Windows or some other way and it cannot be mounted.
It is worth investigating if your car audio system can cope with a FAT32 file-system as an alternative perhaps.

michaelk 01-20-2018 07:18 AM

I agree that you should read the car manual to verify what filesystem and file format it accepts. As stated not umounting the drive prior to removing it from the computer could corrupt the filesystem.

Teufel 01-21-2018 06:28 AM

I always format usb drives to FAT32 if it may be used in car audio.
Usually car audio doesn't support other filesystems.

Rickkkk 01-22-2018 03:10 PM

Hi guantanemo,

As with Teufel, I can confirm that most car audio systems I've used only function (reliably, at least ...) with FAT32. And often with a limit on the number of directories / files they can index, simply refusing to list anything beyond that limit (main reason I limit myself to 64GB USB drives in my car ... ) ... ;)

Give FAT32 a go and let us know how you make out ...

Cheers !

guntanemo 01-22-2018 09:29 PM

Quote:

Originally Posted by syg00 (Post 5808941)
How do you umount the drive after copying the music ?. And why NTFS ?.

I hit the eject button next to the drive name in file manager and NTFS because I thought it would be better than FAT32 for music?

ferrari 01-22-2018 09:34 PM

It offers no advantages in this context, and only potential problems with its proprietary nature. BTW, did ntfsfix help?

guntanemo 01-22-2018 09:35 PM

Quote:

Originally Posted by ferrari (Post 5808961)
You might be able to recover from this using ntfsfix (part of ntfsprogs)

Code:

sudo ntfsfix /dev/sdb1


It is worth investigating if your car audio system can cope with a FAT32 file-system as an alternative perhaps.


It worked! I really appreciate the help! It took a few seconds and all the music is still on it.




Quote:

Originally Posted by Rickkkk (Post 5809932)
Hi guantanemo,

As with Teufel, I can confirm that most car audio systems I've used only function (reliably, at least ...) with FAT32. And often with a limit on the number of directories / files they can index, simply refusing to list anything beyond that limit (main reason I limit myself to 64GB USB drives in my car ... ) ... ;)

Give FAT32 a go and let us know how you make out ...

Cheers !

That makes sense, I will try it to see if NTFS works at first but you are right I dont think it can navigate folders from a USB. Arent the files bigger on FAT32 or are mp3s small enough to not matter (for the sector size).

ferrari 01-22-2018 09:38 PM

Quote:

It worked! I really appreciate the help! It took a few seconds and all the music is still on it.
Great - you're back in business!

Rickkkk 01-22-2018 09:41 PM

Quote:

Originally Posted by guntanemo (Post 5810066)
That makes sense, I will try it to see if NTFS works at first but you are right I dont think it can navigate folders from a USB. Arent the files bigger on FAT32 or are mp3s small enough to not matter (for the sector size).

NTFS is more efficient in its use of space, but as ferrari mentioned and as you yourself point out, in the context of music files, you wouldn't be noticing any significant gain. As for directories, you can use at least 2 levels on the car audio system I currently use, so best to experiment in your case.

Cheers !

guntanemo 01-22-2018 09:59 PM

Thanks guys andor ladies!
PS: You wouldnt happen to be Rick C-137 would you?

Rickkkk 01-22-2018 10:02 PM

Quote:

Originally Posted by guntanemo (Post 5810078)
Thanks guys andor ladies!
PS: You wouldnt happen to be Rick C-137 would you?

Hey guntanemo - lol - probably not. My not recognizing that handle leads me to believe it must be someone else :)

Glad you got your situation sorted - Cheers !

guntanemo 01-23-2018 02:25 AM

Actually, It seems to have happened again when I unplugged it before it finished un-mounting and now the ntfsfix wont work, it tells me to run chkdsk is there a Linux tool for that?

$ sudo ntfsfix /dev/sdb1
Refusing to operate on read-write mounted device /dev/sdb1.

Here are 2 pics of the error messages I get:

http://ibb.co/dt8ijG
http://ibb.co/hef7Bw


I tried removing that specific mp3 but it wont work. How do I compare the init scripts or check the hashes to make sure they are what they should be?

ferrari 01-23-2018 02:35 AM

You need to make sure that it is unmounted before running that command.


All times are GMT -5. The time now is 08:40 PM.