LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-24-2015, 03:07 PM   #1
LinuxUser42
Member
 
Registered: Nov 2010
Distribution: Lubuntu, Raspbian, Openelec, messing with others.
Posts: 143

Rep: Reputation: 19
Linux command instead of Windows command, chkdsk.....


I have an external USB drive, that is used at times to transport things between households (some use Windows). During the last use, the power plug was knocked out when connected, and I would expect that is why I got the error:
Code:
Error mounting /dev/sdi1 at /media/myname/FreeAgent GoFlex Drive: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sdi1" "/media/myname/FreeAgent GoFlex Drive"' exited with non-zero exit status 13: $MFTMirr does not match $MFT (record 0).
Failed to mount '/dev/sdi1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
Since I don't have a Windows machine here, I thought maybe fsck, but it doesn't appear to do anything. I read about ntfsfix and tried that and got:
Code:
Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
Unrecoverable error
Volume is corrupt. You should run chkdsk.
Since I don't have chkdsk (Windows), anything else I can try before having to take it over to a relatives to run chkdsk on Windows? I figure this is a good learning experiment.

Thanks
 
Old 02-24-2015, 03:12 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
NTFS is a propriatary Microsoft file system, and the only official documentation exists inside the Microsoft organization.

The Linux NTFS driver is the result of years and years of reverse-engineering. While it seems to work really well, I'd be hesitant to rely on any non-Microsoft utility to repair an NTFS file system.

I think the best thing to do is to connect the drive to a Windows computer and run the Windows CHKDSK utility. However, if the filesystem is as badly mangled as the Linux NTFS driver reports it to be, you should be prepared for the possibility that data may have been lost.
 
Old 02-24-2015, 03:43 PM   #3
LinuxUser42
Member
 
Registered: Nov 2010
Distribution: Lubuntu, Raspbian, Openelec, messing with others.
Posts: 143

Original Poster
Rep: Reputation: 19
Let me add another question then............

Can anyone tell me of a good filesystem for BOTH Windows and Linux for drive transport purposes (from flash to large hard drive)?
 
Old 02-24-2015, 04:13 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Well do you want it to be good, or do you want it to be compatible?

FAT32 will get the best compatibility, but it's not a good filesystem. NTFS isn't bad, but Linux support is lackluster. ext4 is good, but Windows support is non-existent.

There are no good cross-platform filesystems that I'm aware of.
 
Old 02-24-2015, 04:29 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Over the last several years I have never had any issues with either NTFS of VFAT - but then I try not to go knocking power cables out.
There are the (non-)compatibility issues, but convenience for Win users is usually worth it given the general lack of technical nous.
 
Old 02-24-2015, 04:56 PM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
The strange ting is that the best cross-platform filesystem for Linux and Windows right now is ... NTFS.

As suicidaleggroll said, FAT32 can be read from and written to by just about anything, but as file systems go, it's pretty rubbish:
  • it doesn't handle large volumes very well (or at all)
  • it has no journaling and is therefore prone to corruption
  • it's based on FAT[12|16] which only supported "8.3" filenames, and the support for "long" file names was added later as an ugly hack
  • support for non-ASCII character sets is almost non-existent (once again, an ugly hack)
  • it doesn't support encryption, compression, or even hard or soft links
  • it has no concept of owners or access rights (but admittedly that's not really a big deal with removable media)
You'd think the ideal solution would be a Windows driver that could handle one of the many open filesystem that exist, like ext4. And yes, there is an ext2/3/4 driver for Windows, but strangely it doesn't support several major ext4 features (ACLs, Extended Attributes, some journal functions) and despite having been in development since 2002, the project still hasn't reached the 1.0 milestone.

I tried Ext2fsd about a year ago on a Windows XP system and it seemed to work well enough, but the way it handled volumes leaved much to be desired. One obvious shortcoming is that you couldn't disconnect a removable drive without first manually unmounting the filesystem, not even if you used the manual "Eject" function in Windows. Well, of course you could just pull the plug, but the driver would be very confused and filesystem corruption was likely. The situation might have improved since then, but I couldn't find anything obvious in the recent changelogs to suggest that it has.

NTFS has a lot of the features you'd expect to find in a modern filesystem, and the Linux NTFS driver really is quite good. I've done some pretty intensive writing to NTFS volumes from Linux, and so far I've never experienced filesystem corruption. My only complaint so far is that the FUSE driver sometimes consumes significant, no, ridiculous amounts of CPU time, especially during write operations.
 
Old 02-24-2015, 08:25 PM   #7
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by LinuxUser42 View Post
Can anyone tell me of a good filesystem for BOTH Windows and Linux for drive transport purposes (from flash to large hard drive)?
I've been using UDF formatted USB sticks for this purpose. So far, I haven't had any problems. This is the thread here on LQ that got me started with UDF. Here's an interesting link taken from that thread.

The following pages contain useful information about how to format USB drives with UDF (using udftools) and the equivalent process in Windows.

Using UDF on a USB flash drive
How to format a flash drive as UDF in Windows 7?

Hope that helps.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Rescue Windows Hard Disk with Linux.... chkdsk leachim1 Linux - General 9 09-29-2012 04:23 PM
Executing Command on Remote Windows System from a Local Windows Command Prompt devUnix General 8 05-30-2012 07:51 AM
Alternative Linux command to do : chkdsk /f /r c: it does fsck at next boot frenchn00b Linux - General 3 01-13-2010 03:36 PM
Translating windows pscp command to linux scp command help robward Linux - General 2 01-17-2008 06:02 AM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 02:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:37 AM.

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