Re: Building debian-live for Raspberry Pi
Hi, Emanuele,
On Wed, Aug 27, 2025 at 09:43:25AM +0200, Emanuele Rocca wrote:
On 2025-08-26 08:53, Marc Haber wrote:
When am I supposed to delete everything and start over again with lb config,
and when is it okay to edit files in config/? From what I understand, some
settings of lb config can result in multiple changes inside config, so I am
probably safer off by starting over every time again until I know better
what I am doing, right?
My usual workflow depends on whether I'm playing around to figure out
how to do what I want, or actually building the image.
When I'm playing around, I start by creating a temporary directory, and
run `lb config` in it with the needed parameters (eg: --distribution).
At this point my understanding is that it's safe to customize things
under config/ and run `lb build` multiple times. If I need to run `lb
config` with other arguments, I delete everything and start again. Once
I think I got the general idea right, I move to My Script (read on).
That way you need to remember which changes you did under config/,
right?
I currently use this shell script to initiate build:
| MIRROR="http://debian.debian.zugschlus.de/debian"
| SECMIRROR="http://debian-security.debian.zugschlus.de/debian-security"
| | rm -rf * .build
| sudo lb clean
| CO="--apt-indices false --apt-recommends false"
| CO="$CO --debootstrap-options \"--variant=minbase\""
| CO="$CO --firmware-chroot false --memtest none"
| CO="$CO --mirror-binary-security $SECMIRROR"
| CO="$CO --mirror-chroot-security $SECMIRROR"
| | | lb config --binary-image hdd --architecture arm64 $CO
| | echo "zstd sudo user-setup sq sequoia-chameleon-gnupg" >
config/package-lists/recommends.list.chroot
| sudo lb build
Is there any better way to do it?
Not sure if better or worse, but My Script looks more or less like this:
destdir="$(mktemp -d)"
cd $destdir
lb config [...]
echo curl >> config/package-lists/live.list.chroot
[...]
sudo lb build
That looks pretty much the same.
I would recommend building it on the Raspberry Pi, ten minutes does not
sound *too* bad. Another option if you're building often enough could be
renting an arm64 VM from one of the many cloud providers. This is the
sort of use case where The Cloud can make sense, I think: start the vm,
build the image, destroy the vm. Costs should be minimal.
The cloud VM is indeed a nice idea, hetzner rents those machines for a
few euros a month. I would need to move the result through my DSL
though. I think the Raspi it'll be.
Can I influence the partitioning that live-build puts into the hdd image?
The Raspberry Pi needs a FAT32 to load its firmware from. I think that I
would try to put the squashfs and the other auxiliary files that Debian-live
needs to boot on the FAT32 firmware partition as well. Should this not be
possible (for example, in the case that the raspi firmware has a size limit
for the FAT32 partition), how can I build the HDD image with two partitions?
Where would I place files that I need to be copied to one of the partitions
of the image? I think that I at least need a config.txt and probably a
cmdline.txt on the FAT32 partition.
Not sure about that, but I know that for persistence you can create a
separate partition and label it accordingly:
https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-run-time-behaviours.en.html#580
Perhaps see if the manual has more about this?
Probably not, the firmware partition must be on the created image, while
the persistence partition usually is put on a stick behind the iso,
right?
Oh, although this is probably going to be too entry-level, I gave a
presentation about Debian Live that may be of interest:
https://wiki.debian.org/DebianEvents/gb/2024/MiniDebConfCambridge/Rocca
Will watch this tomorrow.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Reply to: