Linux mount usb failed

«Invalid argument» when trying to mount my USB

Instead of adding [solved] to the title please accept the correct/useful answer by clicking on the check-mark beside it.

3 Answers 3

/dev/sdb represents the whole storage device. The individual partitions are addressed by numbers following the device name, e.g. sdb1 is the 1st partition in the storage device sdb. As USB flash drives usually have only one partition, the mount command should be:

sda or sdb is just the name of your storage device, if you want to mount it you must enter the partition number too.

mkdir -p /media/usb mount /dev/sdb1 /media/usb 

Since this is among the top results I want to share some insight about what happened to me and how I solved it.

My situation is that I’m booting the 18.04 di-based server installer and I want to mount another (virtual) optical disc drive. Which gave me this exact error message.

  • I’m in a busybox shell, which may behave different than GNU tools.
  • I have a different, limited kernel running. While the error message gave no indication and all arguments seemed to be correct I tried loading the filesystem module, iso9660 in my case, with modprobe. Then it worked. So whatever filesystem you are trying to mount, you should check (lsmod?) that the respective filesystem module is loaded to. It’s unlikely that the OP was on busybox, but hey questions with not enough context are common and we are trying to solve them.

Источник

Смоленск 1.5 Добавление USB накопителей (FAT)

Добрый день!
Не монтируется USB флеш накопитель фс Fat под пользователем.

Появляется сообщение «Mount failed mount wrong fs type. »
Накопитель добавлен с 0 уровнем МРД, разрешен для чтения, записи и выполнения всем пользователям.
Процесс монтирования и ошибка представлены на скринах во вложении.

Аркадий Слепов

Moderator

Pavel

New member

# /etc/fstab: static file system information.
#
# Use ‘blkid’ to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#
# / was on /dev/sda1 during installation
UUID=7d25a062-fafa-44a8-81bb-7b4c0cbddd45 / ext4 errors=remount-ro,secdel=2 0 1
# swap was on /dev/sda5 during installation
UUID=7439aafb-5834-4823-a1de-6c25756abae7 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
# /etc/fstab.d/PDAC: parsec devices access control mount instructions
#
#
### usb flash
/dev/*fat /*home/*/media/* auto owner,group,noauto,nodev,noexec,iocharset=utf8,defaults,secdel=2 0 0
/dev/*ntfs* /*home/*/media/* auto owner,group,noauto,nodev,noexec,iocharset=utf8,defaults,secdel=2 0 0
/dev/sd*ext* /*home/*/media/* auto owner,group,nodev,noexec,noauto,defaults,secdel=2 0 0
### [cd|dvd|bd]rom
/dev/s*udf /*home/*/media/* udf owner,group,nodev,noexec,noauto,defaults 0 0
/dev/s*iso9660 /*home/*/media/* iso9660 owner,group,nodev,noexec,noauto,defaults 0 0
### other
/dev/sd* /*home/*/media/* auto owner,group,nodev,noexec,noauto,iocharset=utf8,defaults,secdel=2 0 0

Читайте также:  Компас 3d linux mint

Источник

Error mounting USB drive on Ubuntu 14.04

I have a USB drive that I used to mount on my Ubuntu 14.04 config (it was working perfectly). Now I get the following message each time I connect it to a USB port :

Error mounting /dev/sdk1 at /media/laurent06000/Large: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sdk1" "/media/laurent06000/Large"' exited with non-zero exit status 13: $MFTMirr does not match $MFT (record 0). Failed to mount '/dev/sdk1': 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. 

Error Message

I could find a post related to this in the ubuntu forum : [SOLVED] Ubuntu 14.04 — Seagate external hard drive does not mount but the solution — provided in [Edit 3] (making a chkdsk [drive:] /f) that I performed on this disk DOES NOT show any error and DOES NOT solve my problem. I tried on different USB ports without any change. Any help would be much appreciated. Laurent

2 Answers 2

I found the solution to my problem.

I followed the instruction :

which gave me the following result :

Attempting to correct errors. Processing $MFT and $MFTMirr. Reading $MFT. OK Reading $MFTMirr. OK Comparing $MFTMirr to $MFT. FAILED Correcting differences in $MFTMirr record 0. OK Processing of $MFT and $MFTMirr completed successfully. Setting required flags on partition. OK Going to empty the journal ($LogFile). OK 

But stopped after this line and seemed to start an infinite loop.

Читайте также:  Red hat enterprise linux certification

I then closed the terminal which told me that a process was running.

When I tried to mount the USB drive it told me that the ressource was busy (certainly because of the still running process)

I then disconnected and reconnected the USB drive physically but failed again with the message :

Error mounting /dev/sdk1 at /media/laurent06000/Large: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sdk1" "/media/laurent06000/Large"' exited with non-zero exit status 13: $MFTMirr does not match $MFT (record 0). Failed to mount '/dev/sdk1': 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. 

I then came back to my Windows 8.1 PC and re-issue a «chkdsk [drive:] /f» command.

That time chkdsk managed to correct the problem by saying :

Correcting errors in the master file table (MFT) mirror. Correcting errors in the Volume Bitmap. 

Now the USB drive automount itself properly.

Hope this can be of any help.

Источник

Cannot mount USB stick — errors out with «$MFTMirr does not match $MFT»

I have an NTFS-formatted USB stick. When I connect it to a Windows system, it works fine. However, I receive this error output when I try and mount the USB stick on my Linux machine:

Error mounting /dev/sdb1 at /media/: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sdb1" "/media/sorin/LICENTA"' exited with non-zero exit status 13: $MFTMirr does not match $MFT (record 0). Failed to mount '/dev/sdb1': 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. 

2 Answers 2

Linux users need to use ntfsprogs utility. On recent Linux releases, you need to install ntfs-3g utilities, so: sudo apt-get install ntfs-3g or download from ntfs-3g-download

Читайте также:  Linux commands set permissions

ntfsprogs is a suite of NTFS utilities based around a shared library.
The tools are available for free and come with full source code.

  • mkntfs: Create an NTFS volume on a partition
  • ntfscat: Print a file on the standard output
  • ntfsclone: Efficiently backup/restore a volume at the sector level
  • ntfscluster: Given a cluster, or sector, find the file
  • ntfsfix: Forces Windows to check NTFS at boot time
  • ntfsinfo: Dump a file’s attributes, completely
  • ntfslabel: Display or set a volume’s label
  • ntfslib: Move all the common code into a shared library
  • ntfsls: List directory contents
  • ntfsresize: Resize an NTFS volume
  • ntfsundelete: Find files that have been deleted and recover them
  • ntfswipe: Write zeros over the unused parts of the disk
  • ntfsdefrag: Defragment files, directories and the MFT
  • ntfsck: Perform consistancy checks on a volume
  • nttools: Command-line tools to view/change an offline NTFS volume, e.g. ntfscp, ntfsgrep, ntfstouch, ntfsrm, ntfsrmdir, ntfsmkdir
  • ntfsdiskedit: Walk the tree of NTFS ondisk structures (and alter them)

Be careful with these utilities, they might damage the filesystem, or your hard disk !

With ntfsprogs installed ( sudo apt-get install ntfsprogs ),
Execute the following commands in a terminal:

$ sudo ntfsfix /dev/partitionName

After this command you should expect the following output:

~$ sudo ntfsfix /dev/sdb3 Mounting volume. FAILED Attempting to correct errors. Processing $MFT and $MFTMirr. Reading $MFT. OK Reading $MFTMirr. OK Comparing $MFTMirr to $MFT. FAILED Correcting differences in $MFTMirr record 0. OK Processing of $MFT and $MFTMirr completed successfully. Setting required flags on partition. OK Going to empty the journal ($LogFile). OK NTFS volume version is 3.1. NTFS partition /dev/sdb3 was processed successfully.

After this step you should be able to access your external drive partition as usual, mount or use nautilus to access your files.

Источник

Оцените статью
Adblock
detector