Question: 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

```

What could be the basic reason for this error ? 

**Additional Info**

```
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

```

Answer: 
As [commented by goldilocks](https://unix.stackexchange.com/questions/118090/mounting-mmcblk0p1-failed-with-invalid-argument#comment192054_118090), `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](https://unix.stackexchange.com/a/117691/48083). If the `file` command is available, this is probably the best method. As root you would do:

```
file -s /dev/mmcblk0p1

```

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`.
Maybe you need to use (parted command) due to partition size:

```
# /sbin/parted /dev/mmcblk0p1
(parted) mklabel gpt
this disk will be lost. Do you want to continue?
Yes/No? yes
....
(parted) quit

```

To make sure that the partition is properly created use `/sbin/parted /dev/mmcblk0p1 print”`

Then you have to format the created partition

```
/sbin/mkfs -t correct_type /dev/mmcblk0p1

```