I have a Freescale I.MX ARM board for which I am preparing the bootloader, kernel and Root filesystem on the sdcard. I am a little confused about the order in which I partition and copy my files into sdcard. Let us say I have an empty sdcard 4GB size. I used gparted to first parition it into:
Firts partition 400 MB size as FAT32 system. this is my boot partition Second partition is the rest of the card as ext3. This is my root file system partition.
Let us say my sdcard is under /dev/sdb.
Now I have seen many documents differing slightly in the way of copying the boot files.
Which is the right way?
Method 1:
(without mounting sdb partitions: sudo dd if=u-boot.bin of=/dev/sdb bs=512 seek=2 sudo dd if=uImage of=/dev/sdb bs=512 seek=2
Mount sdb2 for copying rootfs: mount /dev/sdb2 /mnt/rootfs copy rootfs: tar -xf tarfile /mnt/rootfs
Method 2: Mount sdb1 boot partition: mount /dev/sdb1 /mnt/boot copy uboot and kernel: cp u-boot.bin /mnt/boot/ cp uImage /mnt/boot/
Then copy rootfs as above!
Which is the correct one. I tried two but the sddcard is not even booting. When I tried method 1, the card boot up until it says the rootfs is not found in the partition. I removed the card and inserted and found that the first fat 32 partition is somehow 'destroyed' as it says 'unallocated' on gparted.
Please help.