Home

Awesome

sdm

Raspberry Pi SSD/SD Card Image Manager

Description

sdm provides a quick and easy way to build consistent, ready-to-go SSDs and/or SD cards for the Raspberry Pi. This command line management tool is especially useful if you:

What does ready-to-go mean? It means that every one of your systems is fully configured with Keyboard mapping, Locale, Timezone, and WiFi set up as you want, all of your personal customizations and all desired RasPiOS packages and updates installed.

In other words, all ready to work on your next project.

With sdm you'll spend a lot less time rebuilding SSDs/SD Cards, configuring your system, and installing packages, and more time on the things you really want to do with your Pi.

Have questions about sdm? Please don't hesitate to ask in the Issues section of this github. If you don't have a github account (so can't post an issue/question here), please feel free to email me at: gitbls@outlook.com.

If you find sdm useful, please consider starring it to help me understand how many people are using it. Thanks!

Usage overview

sdm Quick Start

Here's how to quickly and easily to create and customize an IMG file and burn it to an SD Card. It's assumed that there is an SD Card in /dev/sde.

Throughout this document read "SD Card" as "SSD or SD Card". sdm treats them equivalently.

Install sdm

curl -L https://raw.githubusercontent.com/gitbls/sdm/master/EZsdmInstaller | bash

Customize the image with sdm

sudo sdm --customize --plugin user:"adduser=bls|password=mypassword" --plugin L10n:host --plugin disables:piwiz --expand-root --regen-ssh-host-keys --restart 2023-12-05-raspios-bookworm-arm64.img

sdm will make the following changes to your IMG file:

No additional packages are installed in this example, but as you'll see, it's a simple addition to the command line to install your list of packages.

Burn the image onto the SD Card

sudo sdm --burn /dev/sde --hostname mypi1 --expand-root 2023-12-05-raspios-bookworm-arm64.img

Boot and Go

Load the SD card into a Pi and power it up. The system will come up as it always does:

When the system comes back up your Pi is all happy, ready to go, and configured with:

You can review the output of the sdm first boot script on the newly-booted system with:

sudo journalctl -b -1 | grep FirstBoot

Next steps

If you want to adopt sdm into your RasPiOS management tools, a great way to get started is to use the <a href="Docs/Example-Commands.md#official-getting-started-with-sdm-script">Official Getting Started With sdm script</a> to quickly and easily learn how to customize an IMG.

The most important new user docs are: <a href="Docs/Command-Details.md">Command Details</a> and <a href="Docs/Plugins.md">Plugins</a>.

What else can sdm do?

Here are a few examples:

Complete sdm Documentation

Need more details? You'll find complete details about sdm in the <a href="Docs/Index.md">online documentation</a> and plugin-specific documentation <a href="Docs/Plugins.md">here.</a>

You can watch sdm in action <a href="https://youtu.be/CpntmXK2wpA">here</a> It's an older video and doesn't use plugins, but will give you a good idea of how sdm works.

Platform Support Notes

Several people have run into issues with using sdm on a Mac. Unless you are technical enough to sort out how to make it work, or care enough to permanently donate a Mac to the sdm project, <b>sdm is not supported on the Mac</b>.