Building debian-live for Raspberry Pi
Hi,
I am trying to build a live image for the Raspberry Pi. The idea is to
have a write protected system that I can use to protect my GnuPG key.
Target medium is an M.2 SSD in an USB enclosure that has a write-protect
switch.
I have not quite understood some of debian-live's details yet.
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?
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?
I am currently using this on an amd64 system with qemu-user-binfmt. Is
that a valid way to build a live image? A genuine Raspberry Pi takes
about ten minutes to build an image (with a fast USB3 SSD), but I'd need
to pull the 300 MB image to my notebook then to transfer it to the
system that I will be using to boot the image. Otoh, the "cross build"
on the machine with the vastly quicker mass storage takes about twice as
long because the emulation is so slow. Especially building the initramfs
feels like the process has stalled.
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.
Thank you for your help.
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: