Skip to content

dom0_kernel_installer: Add new menuentry for installed kernel #3894

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pupacha
Copy link
Collaborator

@pupacha pupacha commented Jun 26, 2025

Writes to /boot/grub2/grub.cfg are not permanent and will be overriden when grub-update action is performed. Adding a new entry and making it the default will solve this problem. Introduce additional_grub_file, which acts as a template for the new menuentry with the installed kernel.

@LiliDeng LiliDeng requested review from Copilot June 26, 2025 05:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds a new menuentry for the installed kernel by introducing additional fields into the installer schema and updating the installer method to configure the GRUB settings accordingly.

  • Added new fields (additional_grub_file, target_grub_file_path, default_grub_id) to the schema
  • Updated the BinaryInstaller.install method to handle GRUB file modifications and configuration based on the Mariner version
  • Adjusted file permissions and substituted placeholders in the GRUB file

@pupacha pupacha force-pushed the pavan/fix_kernel_installer branch 2 times, most recently from dbbfe43 to d7273c9 Compare June 26, 2025 06:01
Copilot

This comment was marked as outdated.

Writes to /boot/grub2/grub.cfg are not permanent and will be overriden
when grub-update action is performed. Adding a new entry and making it
the default will solve this problem. Introduce additional_grub_file,
which acts as a template for the new menuentry with the installed
kernel.
@pupacha pupacha force-pushed the pavan/fix_kernel_installer branch from d7273c9 to 85da1f0 Compare June 26, 2025 07:19
@pupacha pupacha requested a review from Copilot June 26, 2025 09:52
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the dom0 kernel installer to add a new menu entry for the installed kernel, in order to make the kernel upgrade permanent by modifying GRUB configuration. The changes include importing an additional tool (Chmod), adding new schema fields (additional_grub_file, target_grub_file_path, default_grub_id), and extending the install method to handle GRUB file updates differently based on the Mariner version.

)
# Add the new GRUB_DEFAULT line with the new kernel
node.execute(
f"sed -i.bak '1i GRUB_DEFAULT={default_grub_id}' {grub_default_file}",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can sed tool have the method to do this? if no, can you add the method in the sed tool?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants