5

I got Raspbian on a SD card. It is working. Then I installed a few program, modified some visual settings, and added some config files.

What I would like to do now is release this image to other people and have it really easy to deploy. What are a few of the steps needed to go from working SD card to getting a .img file?

Also, if possible, is there a way to "embed" a UID, like a MAC address, in the image so that the end user does not have to configure it? This might be a more tricky question but if you had a pointer on the first step it would be helpful.

Scoop
  • 2,739
  • 7
  • 29
  • 25

2 Answers2

5

Judging from your question I assume you use one of the installers to get the Raspbian image on your SD card.

You can also use dd for this. dd works in both ways, so that means you can use it to create an image yourself as well.

Try the following on a system with dd to make an image of your SD card:

dd if=/dev/sdX of=/path/to/image.img bs=1M

In the above example, /dev/sdX must point to the SD card. If you don't know what this is, you can find out by using:

sudo fdisk -l

which will show you all connected media and their partitions. More information on fdisk can be found here. Another option is to look at the last bit of dmesg, just after plugging your SD card(reader) in:

dmesg | tail

All the above commands are very common on unix systems. If you don't use one, you can try a linux livecd. There are hundreds if not thousands of those available.

Derecho
  • 377
  • 2
  • 5
2

Creating image

All you need to do is dd, as explained in How do I backup my Raspberry Pi?.

However, this will capture all personal files, configuration etc.

Off-topic

I'd be interested in adding these features to piimg, perhaps raise an issue on GitHub?

Alex Chamberlain
  • 15,638
  • 15
  • 69
  • 113