Giter Site home page Giter Site logo

Comments (1)

bocekm avatar bocekm commented on August 23, 2024

For creating a new grub entry for rebooting into our initramfs, we use grubby with the --copy-default option:
https://github.com/oamg/leapp-repository/blob/master/repos/system_upgrade/el7toel8/actors/addupgradebootentry/libraries/library.py#L18
This option takes whatever the current default boot entry has for kernel arguments and adds them for the new boot entry too.

I did a test:

  1. I added a new kernel argument rd.debug=0 by:

    1. editing GRUB_CMDLINE_LINUX in /etc/default/grub
    2. and then by propagating this change to the boot partition using grub2-mkconfig -o /boot/grub2/grub.cfg. You can find that this is necessary to do in https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sec-customizing_the_grub_2_configuration_file.
  2. I ran leapp upgrade and the new boot entry for 'RHEL Upgrade Initramfs' has the rd.debug=0 among the kernel arguments.

    Click to see a snippet of the generated _/boot/grub2/grub.cfg_:
     menuentry 'RHEL Upgrade Initramfs' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.el7.x86_64-advanced-3199373c-4210-4068-a5c5-6346e2c3a246' {
             load_video
             set gfxpayload=keep
             insmod gzio
             insmod part_msdos
             insmod xfs
             set root='hd0,msdos1'
             if [ x$feature_platform_search_hint = xy ]; then
             search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  3199373c-4210-4068-a5c5-6346e2c3a246
             else
             search --no-floppy --fs-uuid --set=root 3199373c-4210-4068-a5c5-6346e2c3a246
             fi
             linux16 /boot/vmlinuz-upgrade.x86_64 root=UUID=3199373c-4210-4068-a5c5-6346e2c3a246 ro console=tty0 console=ttyS0,115200 crashkernel=auto net.ifnames=0 rhgb quiet rd.debug=1 debug enforcing=0 rd.plymouth=0 plymouth.enable=0
             initrd16 /boot/initramfs-upgrade.x86_64.img
     }
     menuentry 'Red Hat Enterprise Linux Server (3.10.0-957.el7.x86_64) 7.6 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.el7.x86_64-advanced-3199373c-4210-4068-a5c5-6346e2c3a246' {
             load_video
             set gfxpayload=keep
             insmod gzio
             insmod part_msdos
             insmod xfs
             set root='hd0,msdos1'
             if [ x$feature_platform_search_hint = xy ]; then
             search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  3199373c-4210-4068-a5c5-6346e2c3a246
             else
             search --no-floppy --fs-uuid --set=root 3199373c-4210-4068-a5c5-6346e2c3a246
             fi
             linux16 /boot/vmlinuz-3.10.0-957.el7.x86_64 root=UUID=3199373c-4210-4068-a5c5-6346e2c3a246 ro console=tty0 console=ttyS0,115200 crashkernel=auto net.ifnames=0 rhgb quiet rd.debug=1
             initrd16 /boot/initramfs-3.10.0-957.el7.x86_64.img
    

from leapp-repository.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.