1

When we burn SD card with any Os image, we have to go to Pi and run it there to ensure it works. So is there any other way to ensure or check that the installed image on the SD card is burned correctly and will run properly on RPi.

3 Answers 3

2

You've said you have a ubuntu system. Just stick the card in there, and check it with fdisk -l. There should be at least two partitions, and the first one should contain a FAT32 filesystem.

You should be able to mount the partitions and the first one should contain at least:

bootcode.bin 
cmdline.txt  
fixup_cd.dat 
fixup.dat    
fixup_x.dat  
kernel7.img  
kernel.img   
start_cd.elf 
start.elf    
start_x.elf

For Raspbian, the second one should contain a regular GNU/Linux root filesystem (bin, usr, lib, etc.). If you want to compare this to the downloaded image itself, you can mount the partitions in that following these instructions. You could then do something like:

ls -R /mnt/img/rootfs > img.txt
ls -R /mnt/sd/rootfs > sd.txt
diff img.txt sd.txt
2

After writing to the SD-card you can read it all back again and compare the readback with the imagefile. They should be equal. Here is an example:

cat my_os.img >/dev/mmcblk0  
sync  
echo 1 >/proc/sys/vm/drop_caches  
cmp my_os.img /dev/mmcblk0 && echo Success  
1
  • how can I do what you call readback in ubuntu??
    – Chinmaya B
    Commented Aug 21, 2015 at 9:43
1

You can't really tell with 100% certainty. Just be sure to use a power supply that's up to the task (5V 2A), and a decent quality SD card.

What you can do however, is verify the Download.

The Raspberry Pi Foundaton provide the SHA-1 hash of the download. (looks like a string of random letters and numbers)

On Windows

You can use a utility (by Microsoft) called fciv or a tool called Summer Properties.

On Linux

sha1sum <your download>.zip

This will generate a hash string, that has to match the one found on the download page. If they match you know you have downloaded the image correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.