I have an sd card with 2 Partitions. mmcblk0
is the disk and mmcblk0p1
, mmcblk0p2
are the 2 partitions I have created.
I am trying to flash the Debian OS on the Partition using the dd command.
dd if=os.img bs=10M of=/dev/mmcblk0p1
I am getting the following output
3565158400 bytes (3.6 GB, 3.3 GiB) copied, 297 s, 12.0 MB/s 106+1 records in 106+1 records out 3565158400 bytes (3.6 GB, 3.3 GiB) copied, 296.587 s, 12.0 MB/s
Now when I try to mount the partition using mount -t auto /dev/mmcblk0p1 mydir
I am getting the following error:
mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so.
My dmesg | tail Output:
[ 856.292964] F2FS-fs (mmcblk0p1): Magic Mismatch, valid(0xf2f52010) - read(0x0) [ 856.292983] F2FS-fs (mmcblk0p1): Can't find valid F2FS filesystem in 1th superblock [ 856.305466] F2FS-fs (mmcblk0p1): Magic Mismatch, valid(0xf2f52010) - read(0x0) [ 856.305483] F2FS-fs (mmcblk0p1): Can't find valid F2FS filesystem in 2th superblock [ 856.315244] F2FS-fs (mmcblk0p1): Magic Mismatch, valid(0xf2f52010) - read(0x0) [ 856.315256] F2FS-fs (mmcblk0p1): Can't find valid F2FS filesystem in 1th superblock [ 856.324437] F2FS-fs (mmcblk0p1): Magic Mismatch, valid(0xf2f52010) - read(0x0)Units: sectors of 1 * 512 = 512 bytes
Even I am not able to boot from the partition.
But if I try the dd
command on mmcblk0
disk it is working perfectly. I am able to mount and boot.
According to my understanding, Linux OS is designed to be installed on a disk, not on a partition and dd is to be used for the flashing on the disk.
I want to write a Debian image on a Partition mmcblk0p1
using a command line tool. How can I achieve this?
I tried dd, pv, cat, cp, ddsd, Dcfldd But ended up with the same result.