Results 1 to 8 of 8

Thread: Latest software updates not updating grub config

  1. #1

    Default Latest software updates not updating grub config

    Hi

    My last few software updates have not worked. They to run all the way through installing and updating packages but fail at the end updating the grub configuration to allow me to boot the newly installed kernel.

    Using the Software Updates widget I seem to get varying errors but the latest one is this:

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,240

    Default Re: Latest software updates not updating grub config

    Hello and welcome to the forums.

    How did you update?

    Remember that the recommended way to update Tumbleweed is
    Code:
    zypper dup
    Henk van Velden

  3. #3

    Default Re: Latest software updates not updating grub config

    Sorry for the clumsiness of my first post here.

    As well as using the Software Updates widget I have used the command
    Code:
    sudo zypper dup
    .
    The tail of the output from that command is:
    Code:
    (254/255) Installing: flash-player-gnome-32.0.0.270-1.1.x86_64 ............................................................................................[done]
    (255/255) Installing: libgcj-devel-gcc6-6.5.0-2.19.x86_64 .................................................................................................[done]
    Executing %posttrans script 'grub2-branding-openSUSE-84.87.20191004-3.1.noarch.rpm' --------------------------------------------------------------------------[|]
    Output of grub2-branding-openSUSE-84.87.20191004-3.1.noarch.rpm %posttrans script:
        update-bootloader: 2019-11-04 10:19:14 <3> update-bootloader-2877 run_command.294: '/usr/lib/bootloader/grub2-efi/config' failed with exit code 1, output:
        <<<<<<<<<<<<<<<<
        + /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
        Generating grub configuration file ...
        Found theme: /boot/grub2/themes/openSUSE/theme.txt
        Found linux image: /boot/vmlinuz-5.3.7-1-default
        Found linux image: /boot/vmlinuz-5.3.6-1-default
        Found linux image: /boot/vmlinuz-5.3.5-1-default
        Found linux image: /boot/vmlinuz-5.3.4-1-default
        Found initrd image: /boot/initrd-5.3.4-1-default
        Found hypervisor: /boot/xen-4.13.0_01-1.gz
        Found linux image: /boot/vmlinuz-5.3.7-1-default
        awk: cmd. line:18: warning: regexp escape sequence `\"' is not a known regexp operator
        awk: cmd. line:18: warning: regexp escape sequence `\"' is not a known regexp operator
        cp: -r not specified; omitting directory '/boot/'
        >>>>>>>>>>>>>>>>
    
    Executing %posttrans scripts ..............................................................................................................................[done]
    There are running programs which still use files and libraries deleted or updated by recent upgrades. They should be restarted to benefit from the latest updates. Run 'zypper ps -s' to list these programs.
    I can run grub2-mkconfig -o /boot/grub2/grub.cfg on its own and get the same result.

    Do you have any hints as to how I go about tracking down this problem? I have an up to date Tumbleweed installation in a virtual machine that does not show this problem and I have not yet found any difference in the grub configuration files. I don't fancy sticking print statements throughout the scripts if there is a safer option.

  4. #4
    Join Date
    Sep 2012
    Posts
    5,184

    Default Re: Latest software updates not updating grub config

    It seems you do not have initrd for kernels starting with 5.3.5. May be /boot is full?

  5. #5

    Default Re: Latest software updates not updating grub config

    Quote Originally Posted by arvidjaar View Post
    It seems you do not have initrd for kernels starting with 5.3.5. May be /boot is full?
    There is 24G left on that partition, so that's not the problem.

    I removed (after backing up) the
    Code:
    /etc/grub.d/20_linux_xen
    config file - that appeared to be where the process went wrong. Then I reran
    Code:
    grub2-mkconfig -o /boot/grub2/grub.cfg
    , successfully this time.

    So I'm working again now, except I'm in trouble if I ever need to use Xen. However I have no plans to so job done for now. Cheers.

  6. #6

    Default Re: Latest software updates not updating grub config

    I'm having the same issue, I was able to track the origin of this error: the problem was introduced in the latest grub2 version (2.04) due to an incompatibility with the new gawk version (5.0.1) not accepting \" as a regexp operator when executing /etc/grub.d/20_linux_xen. Replacing \" in favor of a simple " in line 137 does not fix the problem since there's also another problem (introduced in the new version of 20_linux_xen), in my case I was able to fix it with a single line change trimming extra spaces in the initrd variable (though not sure if that's actually the real problem). Also I think this problem only shows up if you have xen installed.
    The patch if someone is looking for a temporal solution:
    Code:
    --- /etc/grub.d/20_linux_xen.old    2019-11-03 07:32:26.000000000 -0300
    +++ /etc/grub.d/20_linux_xen    2019-11-08 15:46:37.287234017 -0300
    @@ -134,7 +134,7 @@
           print sep[0]
           for (i in words) {
             w = words[i]
    -        if (w ~ /^\$?\"/) {
    +        if (w ~ /^\$?"/) {
               # Double-quoted string
               patsplit(w, segs, var"|"dqesc, ssep)
               print ssep[0]
    @@ -215,6 +215,7 @@
         fi
         xen_args_unq=$(echo $xen_args | grub2_unquote)
         args_unq=$(echo $args | grub2_unquote)
    +    initrd="$(echo -e "${initrd}" | sed -e 's/^[[:space:]]*//')"
         cat <<-EOF >> $grub_dir/$xen_cfg
     
         [$section]

  7. #7
    Join Date
    Sep 2012
    Posts
    5,184

    Default Re: Latest software updates not updating grub config

    Quote Originally Posted by SpartanJ View Post
    the problem was introduced in the latest grub2 version (2.04) due to an incompatibility with the new gawk version (5.0.1) not accepting \" as a regexp operator when executing /etc/grub.d/20_linux_xen.
    This is SUSE specific patch; please submit openSUSE bug report.

  8. #8

    Default Re: Latest software updates not updating grub config

    Quote Originally Posted by martzSUSE View Post
    Hi

    My last few software updates have not worked.
    I did
    sudo zypper dup --no-allow-vendor-change
    and everything went well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •