Results 1 to 4 of 4
Hello,
I have a rootfs image in .img format. Now I want to load this image to sd card. How can I do it?
Should I just copy it to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-09-2012 #1Just Joined!
- Join Date
- Feb 2010
- Posts
- 25
Loading rootfs image to sdcard
Hello,
I have a rootfs image in .img format. Now I want to load this image to sd card. How can I do it?
Should I just copy it to the sdcard by using cp command or by using dd?
Also is there a way to mount the .img file over the host system?
- 12-10-2012 #2Linux Newbie
- Join Date
- Dec 2011
- Posts
- 117
cp won't do it. dd if=rootfs.img of=/dev/sdX would be the way, but make very sure you pick the correct dev/sdX, or you'll shoot yourself in the foot.
That is, of course, assuming it's actually a bootable image and not a initrd type of thing.
- 12-11-2012 #3Just Joined!
- Join Date
- Feb 2010
- Posts
- 25
Do I have to partition the sdX device first or dd will partition the device automatically?
- 12-11-2012 #4Linux Newbie
- Join Date
- Dec 2011
- Posts
- 117
dd doesn't anything except low level read/writes. It make exact duplicates of data. If you use dd, it mercilessly over-writes whatever was there to begin with.
I'd copy anything important of the stick so you can clobber it without remorse, dd the img on to it, and see if it boots.
I tried copying a bootable cd onto a USB stick the other day with dd, and it didn't boot. I could mount it as iso9660 and access the files, but the boot process wasn't amused.
The only way to find out is to try.


Reply With Quote
