iso: prefer dracut, append splash quiet, take initial snapper snapshot#2
Open
dongioia wants to merge 2 commits into
Open
iso: prefer dracut, append splash quiet, take initial snapper snapshot#2dongioia wants to merge 2 commits into
dongioia wants to merge 2 commits into
Conversation
…snapper snapshot The from_iso install flow now runs dracut --regenerate-all on the target if /usr/bin/dracut is present in the unpacked airootfs and falls back to mkinitcpio -P otherwise. The stale initramfs-linux.img copied from the live ISO is removed after dracut runs so GRUB does not pick the mkinitcpio-built image instead of the dracut output. grub_cfg() gained a cmdline_append parameter that reads the existing GRUB_CMDLINE_LINUX_DEFAULT, appends the new tokens, and dedups so re-running Bakery does not double up. Used right before grub_install to add splash quiet for Plymouth without losing console=ttyS2 or any other board-specific cmdline already set in airootfs. A take_initial_snapshot() helper runs after final_setup. It is a no-op when snapper is not installed or the root is not btrfs, so non-btrfs installs and ISOs without snapper in the airootfs are unaffected.
4 tasks
Per bill88t feedback: Beryllium ships dracut-rebuild (one-liner that calls /usr/share/libalpm/scripts/dracut-install) which handles the board-specific output naming and grub.d compat that downstream patches expect. Use it when available, fall back to dracut --regenerate-all --force on systems without the helper.
Contributor
Author
|
Thanks. Pushed a follow-up commit (554eee1) that calls No rush, ping when you get to it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires up dracut, Plymouth, and an initial snapper snapshot in the from_iso install flow.
Depends on beryllium-org/Beryllium-ISO#1. The dracut path only fires when the unpacked airootfs has /usr/bin/dracut, so this can land first; ISOs without it fall through to the existing
mkinitcpio -Pcall.Changes
bakery/iso.py:regenerate_initramfs: if/usr/bin/dracutexists in the target, rundracut --regenerate-all --forceand delete the staleinitramfs-linux.imgleft over from the live ISO so GRUB doesn't pick the mkinitcpio image. Otherwise the existingmkinitcpio -Ppath runs.grub_cfg: newcmdline_appendparameter. Reads the currentGRUB_CMDLINE_LINUX_DEFAULT, appends the new tokens, dedups so a second run doesn't double up. Used to addsplash quietwithout clobbering board-specific cmdlines likeconsole=ttyS2,1500000n8on Rock 5B+.take_initial_snapshot: best-effort. Bails out when snapper isn't installed. Wrapssnapper -c root create-config /and the baselinesnapper create -d "Initial install"in|| trueso non-btrfs installs don't error.bakery/install.py:grub_cfg(cmdline_append="splash quiet", update=False, ...)beforegrub_install.update=Falseskips a redundant grub-mkconfig pass sincegrub_installruns one with the new cmdline anyway.take_initial_snapshot(mnt_dir)afterfinal_setupand beforeunmount_all, while/.snapshotsis still mounted.Backward compat
grub_cfg(cmdline=...)callers: unchanged.cmdlinestill wins overcmdline_appendwhen both are passed.take_initial_snapshot: returns early without snapper. Non-btrfs installs ignored.Test plan
from_isoinstall on Rock 5B+ btrfs subvol/boot/initramfs-${KVER}.imgpresent, no leftoverinitramfs-linux.imggrep CMDLINE /etc/default/grubshowssplash quietappended after the existing tokenssnapper -c root listlists the baseline snapshot