10-08-2018 11:25 PM
I am trying to mount sd card after booting linux(open source) from sd card but i m seeing an error saying 'invalid argument'
zynq> mount -t vfat /dev/mmcblk0 /mnt/ mount: mounting /dev/mmcblk0 on /mnt/ failed: Invalid argument zynq> mount /dev/mmcblk0 /mnt/ mount: mounting /dev/mmcblk0 on /mnt/ failed: Invalid argument
I believe that linux has detected the card as if I try fsdik -l, its showing me the right results:
zynq> fdisk -l Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes 4 heads, 16 sectors/track, 242560 cylinders Units = cylinders of 64 * 512 = 32768 bytes Device Boot Start End Blocks Id System /dev/mmcblk0p1 129 8320 262144 b Win95 FAT32 Partition 1 does not end on cylinder boundary /dev/mmcblk0p2 8321 242560 7495679+ f Win95 Ext'd (LBA) Partition 2 does not end on cylinder boundary /dev/mmcblk0p5 8322 242560 7495648 7 HPFS/NTFS
and the accepted solution says 'check if sd-card is enabled in your design' but there the designer booted from qspi and not from sd card and in this case, I actually booted linux from sd card.
Thank you very much for your time!
10-09-2018 02:47 AM
10-09-2018 02:47 AM
10-09-2018 04:23 PM
Thanks for the reply. I tried the commands you suggested
zynq> cd /mnt/boot/ zynq> ls BOOT.bin devicetree.dtb uramdisk.image.gz System Volume Information uImage zynq> mkdir test_dir mkdir: can't create directory 'test_dir': Read-only file system
So the first command mount worked but I cant write anything in that partition.
For the second comamnd
zynq> mount /dev/mmcblk0p2 /mnt/ EXT4-fs (mmcblk0p2): unable to read superblock EXT4-fs (mmcblk0p2): unable to read superblock EXT2-fs (mmcblk0p2): error: unable to read superblock mount: mounting /dev/mmcblk0p2 on /mnt/ failed: Invalid argument
I am not able to mount the second partition. For the first problem(readonly mount) I even tried to add -w switch but it didnt help either
10-09-2018 09:08 PM - edited 10-09-2018 09:12 PM
I found that my sd card had partitioning issue. After fixing it, I can mount both partitions.
Now the only issue is I cant write on either partitions.
zynq> mkdir test_dir mkdir: can't create directory 'test_dir' : Read-only file system
PS: I created two partitions, one for linux boot stuff and other for my applications and other data
10-09-2018 11:30 PM
I found this AR:
After reading it I found that write protect pin was floating in my design. I assigned a constant 0 and that solved the writing issue.
This thread is closed.