gitbls / sdm

Raspberry Pi SD Card Image Manager
MIT License
469 stars 48 forks source link

Minimal steps to create a bootable Debian (bookworm) RPi image? #156

Closed adrelanos closed 11 months ago

adrelanos commented 11 months ago

Hi,

could you share please the minimal shell commands required to create a bootable Debian (bookworm) RPi image?

This might benefit various system OS image builds tools:

gitbls commented 11 months ago

Hello. The README does exactly that. If you feel that something is missing there, please explain.

adrelanos commented 11 months ago

It uses sdm. The projects I've linked couldn't (or won't) really use the full sdm. That really doesn't fit. (grml-debootstrap maybe because that's bash but mkosi highly unlikely since implemented in python and sdm would be a huge dependency just for RPi support which is just another architecture.)

This is kinda the pseudo commands I am looking for however actually working to produce a bootable RPi image.

parted -s "${TARGET}" 'mklabel msdos'
parted -s "${TARGET}" 'mkpart primary ext4 4MiB 100%'
parted -s "${TARGET}" 'set 1 boot on'

chroot "${MNTPOINT}" grub-install --target=arm64-efi --efi-directory=/boot/efi --bootloader-id=debian --recheck --no-nvram --removable

Or...

  1. create partition table this way
  2. install bootloader
  3. install these packages
  4. copy these files into /boot

Sorry for the confusion. This isn't so much a question about sdm but about the RPi bootable image creation process generally.

gitbls commented 11 months ago

sdm does none of that. It's strictly about customizing an already-existing IMG (ie the ones provided by RaspberryPI Labs). Seems like you want something to actually create the IMG.