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`.
Basic reasons: (updated)

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.

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.