Closed diederikdehaas closed 1 year ago
It is quite similar to https://salsa.debian.org/raspi-team/image-specs/-/merge_requests/73 but it's missing the last commit in that MR: Recheck the root filesystem after expanding it.
as you no longer do the resize of the filesystem yourself.
Thanks! I was wondering about the fsck thing, thank you for looking into it, that's one less worry on my mind.
I still would like to figure out why it doesn't get automatically included. Feels like an important missing piece of my understanding of initramfs.
Perhaps because systemd-repart
and the x-systemd.growfs
mount option can be used trigger an automatic resize of the partition and the filesystem on firstboot? This seems to be what Mobian does now 🤷♂️
Those could be reasons why you want to include it (AFAIC you always want it). If you regenerate the initramfs, fsck
will be included (there's also a hook defined in the initramfs-tools package for fsck
).
What I want to know is why is it included then but not on image creation.
It doesn't get included with this project, but also not in https://salsa.debian.org/raspi-team/image-specs (where I proposed ~ the same improvement.
hm. interesting. Maybe need to run update-initramfs -u
after the image deployment section (i.e. off a loopdev rather than a chroot?)
That would break what we have in the 'image-specs' project as we put hooks/scripts in place, generate the initramfs and then remove the hooks/scripts again, so that they won't be included in the initramfs the next time it is generated.
(It's only useful/needed on first boot)
Would it? You wouldn't be running update-initramfs twice, just moving it to after the filesystem-deploy
action (AFAICT, commands/scripts run after that step will still execute, just from the pre-finalization loopdev)
It can be different for this project (then for RPi image-specs project).
@neggles
Perhaps because
systemd-repart
and thex-systemd.growfs
mount option can be used trigger an automatic resize of the partition and the filesystem on firstboot? This seems to be what Mobian does now man_shrugging
We already use the growfs mount option. I was trying to use systemd-repart, but it wants to stomp over the bootloader, and when you make the bootloader partitions so it doesn't stomp over it it throws its toys out of the pram and complains that the size it tried to allocate for the root partition wasn't possible.
I still want to go back to trying systemd-repart eventually, since the initramfs repartitioning is slow and sucks, but to get a working image out quickly it wasn't the right choice.
See the (extensive) commit messages.