Linux mount failed invalid argument

mounting mmcblk0p1 failed with Invalid argument

When I am running linux from sd card and try to mount sd card -no problem, works fine. But when I am running linux from flash memory I am unable to mount my SD card:

# mount /dev/mmcblk0p1 /mnt/ mount: mounting /dev/mmcblk0p1 on /mnt/ failed: Invalid argument 
root@Xilinx-ZC702-14_7:/# mount -t /dev/mmcblk0p1 /mnt mount: can't find /mnt in /etc/fstab root@Xilinx-ZC702-14_7:/var/volatile/log# ls wtmp root@Xilinx-ZC702-14_7:/var/volatile/log# dmesg dmesg: klogctl: Function not implemented 

mount -t /dev/mmcblk0p1 /mnt isn’t a complete command. If you know the filesytem type, you should specify it after the -t argument (e.g. mount -t vfat /dev/mmcblk0p1 /mnt ) or omit -t completely.

5 Answers 5

As commented by goldilocks, mount -t expects the filesystem type to come after -t , so it won’t work. Otherwise it sounds like you just need to specify the filesystem type. If you don’t know the filesystem type, then there are a list of methods to find out in this answer. If the file command is available, this is probably the best method. As root you would do:

Note also that if the filesystem type is not in listed in /proc/filesystems , then the driver is not compiled into the kernel and so must be available as an external module. Once you have the correct type, you can try:

mount -t correct_type /dev/mmcblk0p1 /mnt 

As a final thought, also make sure the /mnt directory exists! If not create it with mkdir /mnt .

@Ferroao, that depends on the filesystem you are trying to mount. For Linux filesystems permissions/owner/group on each file/directory determine who can read/write.

1) Your system does not (properly?) initialize or does not recognize the SD when booting from flash. Is there the /dev/mmcblk0 device after you boot from flash? What does fdisk -l /dev/mmcblk0 say?

2) There is no file system on /dev/mmcblk0p1, you need to create a file system first ( mkfs . ). Check with file -s /dev/mmcblk0p1

3) The file system on /dev/mmcblk0p1 is corrupted, you need to check / repair it, try fsck /dev/mmcblk0p1 , or create a new one

4) Your kernel (when booting from flash) does not have the needed file system driver, check cat /proc/filesystems and ls «/lib/modules/$(uname -r)/kernel/fs/» and see if that list contains the needed file system type. Typically, older kernels don’t support ext4, while your OS might already have tools to create an ext4 file system.

Читайте также:  Linux открытые порты процесса

5) Hardware defect — could be the SD card, the controller, wiring . but if it works when booting from the SD card then this is most probably not the case.

Источник

/sbin/mount.vboxsf: mounting failed with the error: Invalid argument — how to solve this error?

I’m trying to share a folder between ,a host, windows 10 and ,a guest, ubuntu 16.04. I have already created a folder in linux and set up inside the virtual box. Inside /media I have created a folder called songs . now I’m trying to mount a volume using the following:

sudo mount -t vboxsf sf_shareubuntu/ songs/ 
/sbin/mount.vboxsf: mounting failed with the error: Invalid argument 

4 Answers 4

The normal way to get that done from the link provided by Norbert

sudo mount -t vboxsf [-o OPTIONS] sharename mountpoint 

So your command should be

sudo mount -t vboxsf [-o OPTIONS] sharename /media/songs 

To mount a shared folder during boot, add the following entry to /etc/fstab :

sharename /media/songs vboxsf defaults 0 0 

The sharename comes from the Windows hosts’ sharename

2 The normal way to get that done from the link provided by Norbert sudo mount -t vboxsf [-o OPTIONS] sharename mountpoint So your command should be sudo mount -t vboxsf [-o OPTIONS] sharename /media/songs 

Unfortunately, this is not resolve, look:

sudo mount -t vboxsf INSTALL /media/sf_INSTALL /sbin/mount.vboxsf: mounting failed with the error: Invalid argument 

This happens when vbox-guest-utils version inside virtualbox is different from host version. Sharename isn’t properly ported between the host system and the virtualbox system.

This was the issue for me. Upgrading VM Box and starting the whole shared folder process again worked for me.

I got such error in guest, when I tried to mount shared folder, pointing to symbolic link on the host. Solved it by changing it to actual target folder on host instead.

Update all virtualbox-guest packages, atleast that’s what worked for me.i wasn’t able to figure the exact package though.

virtualbox-guest-additions-iso/jammy-updates,jammy-updates,now 6.1.38-1~ubuntu1.22.04.1 all [installed] virtualbox-guest-utils-hwe/jammy-updates,now 6.1.38-dfsg-3~ubuntu1.22.04.1 amd64 [installed,automatic] virtualbox-guest-utils/jammy-updates,now 6.1.38-dfsg-3~ubuntu1.22.04.1 amd64 [residual-config] virtualbox-guest-x11-hwe/jammy-updates,now 6.1.38-dfsg-3~ubuntu1.22.04.1 amd64 [installed] virtualbox-guest-x11/jammy-updates 6.1.38-dfsg-3~ubuntu1.22.04.1 amd64 

then updated each package individually

The package name is the name before '/', for virtualbox-guest additions iso it is "virtualbox-guest-additions-iso". 

Источник

Why am I getting [mount error(22): Invalid argument] while trying to mount SMB network drive?

Disclaimer: I am very new to Linux 🙂 Anyway, onward: I have a fresh instance of Ubuntu Server (12.04.1 LTS) running on my network and I want to mount a network drive to the server so I can access the contents. The network drive is a SAMBA compatible drive running Darwin OS. If I run the following command: smbclient -L //192.168.0.2 -U myuser It prompts me for the password and then displays output similar to:

Domain=[SERVER01] OS=[Darwin] Server=[@(#)PROGRAM:smbd PROJECT:smbx-105.4.0] Sharename Type Comment --------- ---- ------- Comp Staff's Public Folder Disk CompRaid03 Disk Dropbox Disk Groups Disk IPC$ IPC Public Disk Users Disk compstaff Disk 
sudo mount -t cifs //192.168.0.2/CompRaid03 /mnt/myshare -o username=myuser 

I get the same password prompt, but after putting the correct password in, I received this error: mount error(22): Invalid argument dmesg | tail returns: [23576.037373] CIFS VFS: cifs_mount failed w/return code = -22 I don’t understand what is wrong with this command. I’ve managed to mount a share on my current (Windows 8) machine using basically the same command but with a different IP address and share name (obviously). I’ve spent a good few hours trying to solve this and got no where. Any help or pointers would be greatly appreciated. Thanks Steve EDIT As suggested I’ve also trued using «user=» instead of «username Invalid argument» error. EDIT 2 I feel I should add to the question that in the end I couldn’t figure out what the problem was, but, I used the exact same command to mount a share on a different shared drive that was running Debian and it worked fine — I can only assume it’s therefore a flaw or idiosyncrasy of the SAMBA implementation that Darwin OS is using.

Читайте также:  Teamspeak сервер linux установка

Источник

mount: mounting /dev/sda2 on /mnt/sda2 failed: Invalid argument

I’m following this tutorial. But I got stuck at step 9, somehow I’m not able to mount my USB. Every time I try to mount my USB I get the following error:

root@OpenWrt:~# mount /dev/sda2 /mnt/sda2 mount: mounting /dev/sda2 on /mnt/sda2 failed: Invalid argument 

The USB seems to be OK and connected but somehow I’m not able to mount the sda2 (ext4) partition. The partitions seems to be OK as well:

root@OpenWrt:~# blkid /dev/mtdblock2: TYPE="squashfs" /dev/sda1: UUID="e39964e8-1b51-4b1f-b034-0147fa394eea" TYPE="swap" /dev/sda2: UUID="157cfc0d-f33d-4103-950d-6ae01baa7177" TYPE="ext4" 
root@OpenWrt:~# dmesg | grep sda [ 9.360000] sd 0:0:0:0: [sda] 7987200 512-byte logical blocks: (4.08 GB/3.80 GiB) [ 9.370000] sd 0:0:0:0: [sda] Write Protect is off [ 9.370000] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00 [ 9.370000] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 9.400000] sda: sda1 sda2 [ 9.410000] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 41.850000] EXT4-fs (sda2): couldn't mount as ext3 due to feature incompatibilities [ 41.870000] EXT4-fs (sda2): couldn't mount as ext2 due to feature incompatibilities [ 41.880000] EXT4-fs (sda2): couldn't mount RDWR because of unsupported optional features (400) [ 270.660000] EXT4-fs (sda2): couldn't mount as ext3 due to feature incompatibilities [ 270.670000] EXT4-fs (sda2): couldn't mount as ext2 due to feature incompatibilities [ 270.670000] EXT4-fs (sda2): couldn't mount RDWR because of unsupported optional features (400) [ 585.040000] EXT4-fs (sda2): couldn't mount as ext3 due to feature incompatibilities [ 585.050000] EXT4-fs (sda2): couldn't mount as ext2 due to feature incompatibilities [ 585.060000] EXT4-fs (sda2): couldn't mount RDWR because of unsupported optional features (400) [ 586.540000] EXT4-fs (sda2): couldn't mount as ext3 due to feature incompatibilities [ 586.550000] EXT4-fs (sda2): couldn't mount as ext2 due to feature incompatibilities [ 586.560000] EXT4-fs (sda2): couldn't mount RDWR because of unsupported optional features (400) [ 651.570000] EXT4-fs (sda2): couldn't mount as ext3 due to feature incompatibilities [ 651.580000] EXT4-fs (sda2): couldn't mount as ext2 due to feature incompatibilities [ 651.590000] EXT4-fs (sda2): couldn't mount RDWR because of unsupported optional features (400) 
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sda: 4089 MB, 4089446400 bytes 255 heads, 63 sectors/track, 497 cylinders, total 7987200 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 1 7987199 3993599+ ee GPT 

Источник

Читайте также:  Что такое ссылка в линуксе

Mounting cifs drive gives: mount error(22): Invalid argument

Two possible problems: your source is an URL which either may not resolve or is not advertising Samba; and, the uid/gid need to be expressed numerically. Have you read the referred man page?

Mount should really return a better error message. Knowing which argument is invalid would make this error message so much more helpful.

Mount gives a generic error because the details are in the log. As it is said below, use tail -f /var/log/kern.log to understand what’s going on.

9 Answers 9

maybe this helps with this, mount error(22): Invalid argument . possible error is the argument/s (mode) on mount command.

    check your logs on the errors encountered.

This worked for me. I found the error CIFS not working, kernel upgrade:No dialect specified on mount and resolved it by [adding] vers=1.0 to my /etc/fstab(bbs.archlinux.org/viewtopic.php?id=230952). I suspect it is caused by using kernel 4.13.

Jeez, thank goodness for stackoverflow. Same problem on ubuntu. I added vers=2.0 and it works. Current mount.cifs is at 6.4. Probably some enhancements to credentials but not digging into CIFS now.

Another possible cause is the presence of sec=ntlm in /etc/fstab and it’s incompatibility with newer SMB protocols like SMB3.

While not the OP’s case, this can also cause mount error(22): Invalid argument errors, as it did for me after upgrading an old server.

Even though kern.log includes a suggestion to specify vers=1.0 on mount , it may be safer to remove or change sec=ntlm instead. Perhaps use the defaults to allow automatic negotiation of the SMB version and security, or specify compatible options such as vers=3.0,sec=ntlmssp .

Obviously this depends on your SMB server’s features, but I would try and avoid vers=1.0 unless necessary.

Источник

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