C. Cannon C. Cannon - 4 months ago 22
Linux Question

Modify Debian image for raspberry pi

I need to modify a Raspbian image for use with Raspberry Pi's in a commercial setting. This way I won't have to modify the defaults of every single pi afterwards. I want to set the default keyboard to U.S., disable auto-login and boot to command line rather than GUI. Is it possible to modify an image with these settings before flashing each card? If so, how?

Answer
  1. Make all the changes you want on a raspberry pi.
  2. Figure out where sd cards get mounted on your computer. On linux it will be something like /dev/sdb, on mac it will be something like /dev/rdisk2
  3. Take your pi image, stick it in a computer and make a disk image dd if=/dev/<sd_path> of=~/raspi.img bs=1m
  4. Flash your other cards: dd if=~/raspi.img of=/dev/<sd_path> bs=1m
Comments