{"repo":"cinderblock/RaspberryPi-Image-Edit","free":true,"listed":false,"github":"https://github.com/cinderblock/RaspberryPi-Image-Edit","clone":"git clone https://github.com/cinderblock/RaspberryPi-Image-Edit.git","description":"Shell scripts for modifying Raspberry Pi OS images **before** writing them to an SD card, from any Linux system","language":"Shell","stars":21,"topics":["raspberry-pi","raspberry-pi-3","raspberry-pi-4","raspberry-pi-zero","raspberry-pi-zero-w","raspberrypi","raspbian"],"license":null,"category":"media-processing","readme_excerpt":"Setup Raspberry Pi OS Image Script Scripts for modifying Raspberry Pi OS images before writing to SD card. Easy Mode With already downloaded img zip Manual Mode 1. Download a Raspberry Pi OS image and unzip it: 2. Download gist files: 3. Edit setup.sh as desired. default adds my keys! 4. Run scripts. Available scripts The default setup.sh script will fail unless you grow the standard .img by 400MB first (as of 2021-07-15) . Runs the setup.sh (or other) script in a chroot in specified image. Chroot Gives you a chroot in the image to change whatever manually. If anything goes wrong, the script should cleanup after itself and not leave dangling mounts or loopback devices. Planned changed: Use systemd-nspawn instead of chroot . Maintains a separate \" .bash history \" that is re-used for all images in a .persist folder. This behavior can be overridden by setting LEAVE HISTORY ALONE=yes (any non-zero length string). Prepare The ./chroot.sh script can also be run in \"prepare\" mode. Give it a second argument of an executable to run inside the chrooted environment as root. For example: ./chroot.sh my-raspios.img some-executable . Grow Grow the image (and main partition) by some number of megabytes. This only affects the local .img file. On first boot, Raspbian will automatically grow the parition to fill the full card. Adding 100MB adds aproximately 10 seconds to the write time when transfering to an SD card. New Does all the steps needed to get a brand new image in a single command. A","default_branch":null,"files":null,"tree":[],"storefront":"/r/cinderblock","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cinderblock/RaspberryPi-Image-Edit/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}