Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dracut-initramfs-restore.sh): get compression method from image #2596

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Dec 20, 2023

  1. refactor(lsinitrd.sh): move common code to dracut-functions

    Create functions with common code as a previous step to use them in other parts.
    In particular:
    - `get_machine_id`
    - `get_default_initramfs_image [<kernel_version>]`
    - `has_early_microcode <initramfs_image>`
    - `get_decompression_command <initramfs_image_header>`
    aafeijoo-suse committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    5837ef4 View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2023

  1. feat(dracut-initramfs-restore.sh): get compression method from image

    Instead of trying every possible compression method until the right one is
    found, parse the header of the initramfs image to get the right one and use it
    without hiding possible decompression errors, using the same logic that is
    implemented in `lsinitrd.sh`.
    aafeijoo-suse committed Dec 21, 2023
    Configuration menu
    Copy the full SHA
    4c8320b View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2024

  1. fix(dracut-functions.sh): add function to get the $BOOT partition p…

    …laceholder
    
    Implement and use a new `get_dollar_boot` function to get the `$BOOT` partition
    placeholder, as defined in the Boot Loader Specification [1].
    If `bootctl` is available, use it to support a possible XBOOTLDR partition,
    otherwise, check only the ESP, as before.
    
    [1] https://uapi-group.org/specifications/specs/boot_loader_specification
    aafeijoo-suse committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    36a6b53 View commit details
    Browse the repository at this point in the history
  2. fix(dracut.sh): use $BOOT to set the outfile path

    Use the new functions `get_dollar_boot`, `get_machine_id` and
    `get_default_initramfs_image` to get the `outfile` path.
    
    Fixes dracutdevs#1995
    aafeijoo-suse committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    43469bf View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. feat(dracut): take advantage of the new /sys/firmware/initrd sysfs file

    Since v6.8-rc1 [1], when the kernel was booted with an initrd and the
    `retain_initrd` option is set on the kernel command line, /sys/firmware/initrd
    contains the contents of the initrd that the kernel was booted with.
    
    Therefore, there is no need to guess the path of the initrd for `lsinitrd`
    and `dracut-initramfs-restore` if this sysfs file exists on the running system.
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2678fd2fe9ee2c569e9cb6b17e786bc8f0753538
    aafeijoo-suse committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    8d1dae8 View commit details
    Browse the repository at this point in the history