clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

swupd update is not setting new kernel as default to boot after updating kernel-native bundle #2774

Closed Senary6 closed 1 year ago

Senary6 commented 1 year ago

Recently the WiFi on my NUC8i7BEH stopped working see issue https://github.com/clearlinux/distribution/issues/2767 for more details

Running bootctl set-default Clear-linux-native-6.0.9-1209.conf fixed the issue of the WiFi Firmware not loading. However after running swupd updateand getting an update to kernel-native bundle then rebooting, Clear Linux is still running the 6.0.9-1209 instead of the new 6.0.9-1214 kernel

uname -r 6.0.9-1209.native

running bootctl list after updating to 37680

Boot Loader Entries:
         type: Boot Loader Specification Type #1 (.conf)
        title: Clear Linux OS (Clear-linux-native-6.0.9-1214.conf)
           id: Clear-linux-native-6.0.9-1214.conf
       source: /boot/loader/entries/Clear-linux-native-6.0.9-1214.conf
        linux: /EFI/org.clearlinux/kernel-org.clearlinux.native.6.0.9-1214
       initrd: /EFI/org.clearlinux/freestanding-00-early-ucode.cpio
               /EFI/org.clearlinux/freestanding-i915-firmware.cpio.zstd
      options: root=PARTUUID=40f5f694-258d-4437-bf3c-4cbeb90a456a quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests init=/usr/bin/initra-desktop initcall_debug intel_iommu=igfx_off kvm-intel.nested=1 no_timer_check nore>

         type: Boot Loader Specification Type #1 (.conf)
        title: Clear Linux OS (Clear-linux-native-6.0.9-1209.conf) (default) (selected)
           id: Clear-linux-native-6.0.9-1209.conf
       source: /boot/loader/entries/Clear-linux-native-6.0.9-1209.conf
        linux: /EFI/org.clearlinux/kernel-org.clearlinux.native.6.0.9-1209
       initrd: /EFI/org.clearlinux/freestanding-00-early-ucode.cpio
               /EFI/org.clearlinux/freestanding-i915-firmware.cpio.zstd
      options: root=PARTUUID=40f5f694-258d-4437-bf3c-4cbeb90a456a quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests init=/usr/bin/initra-desktop initcall_debug intel_iommu=igfx_off kvm-intel.nested=1 no_timer_check nore>

         type: Automatic
        title: EFI Default Loader
           id: auto-efi-default
       source: /sys/firmware/efi/efivars/LoaderEntries-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f

         type: Automatic
        title: Reboot Into Firmware Interface
           id: auto-reboot-to-firmware-setup
       source: /sys/firmware/efi/efivars/LoaderEntries-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f

running swupd update

sudo swupd update
Update started
Preparing to update from 37640 to 37680
Downloading packs for:
 - NetworkManager
 - NetworkManager-extras
 - Sphinx
 - alsa-utils
 - binutils
 - c-basic
 - cloud-api
 - clr-network-troubleshooter
 - desktop
 - desktop-apps
 - desktop-gnomelibs
 - dev-utils
 - devpkg-NetworkManager
 - devpkg-SDL2
 - devpkg-Vulkan-Headers
 - devpkg-Vulkan-Loader
 - devpkg-colord
 - devpkg-cryptsetup
 - devpkg-cups
 - devpkg-gdk-pixbuf
 - devpkg-gobject-introspection
 - devpkg-harfbuzz
 - devpkg-lcms2
 - devpkg-libXpm
 - devpkg-libpng
 - devpkg-mediasdk
 - devpkg-pango
 - devpkg-systemd
 - devpkg-vala
 - emacs-x11
 - firefox
 - flare
 - flatpak
 - games
 - games-dev
 - gdb
 - gedit
 - gimp
 - glibc-locale
 - gnome-calculator
 - gnome-disk-utility
 - gvim
 - hardware-uefi
 - kernel-native
 - lib-imageformat
 - lib-opengl
 - lib-poppler
 - lib-samba
 - libX11client
 - libstdcpp
 - linux-tools
 - llvm
 - lm-sensors
 - lutris
 - openblas
 - os-core
 - os-core-dev
 - os-core-legacy
 - os-core-plus
 - os-core-update
 - parallel
 - perl-basic
 - perl-basic-dev
 - polkit
 - python-extras
 - python3-basic
 - qt-basic
 - seahorse
 - spice-gtk
 - stress-ng
 - supertuxkart
 - sysadmin-basic
 - tcl-basic
 - vim
 - virt-manager
 - wine
 - x11-server
 [100%]

Finishing packs extraction...

Statistics for going from version 37640 to version 37680:

    changed bundles   : 77
    new bundles       : 0
    deleted bundles   : 0

    changed files     : 3582
    new files         : 9325
    deleted files     : 197
    largest pack      : devpkg-vala 18080Kb

Validate downloaded files
 [100%]

No extra files need to be downloaded
 [100%]

Installing files...
 [100%]

Update was applied
Calling post-update helper scripts
External command: none
External command: clr_debug_fuse.service: restarted (the binary was updated)
External command: pacdiscovery.service: restarted (the binary was updated)
External command: tallow.service: restarted (the binary was updated)
External command: pacrunner.service: restarted (the binary was updated)
External command: systemd-journald.service: restarted (the binary was updated)
External command: mcelog.service: restarted (the binary was updated)
External command: systemd-resolved.service: restarted (the binary was updated)
External command: (Took 7 seconds)
External command: systemd-timesyncd.service: restarted (the binary was updated)
Update took 211.5 seconds, 144 MB transferred
Update successful - System updated from version 37640 to version 37680
paulcarroty commented 1 year ago

Is ls /boot empty?

anciubo commented 1 year ago

Try clr-boot-manager set-timeout 10 After rebooting you will get a kernel list where you can choose which one to boot from this article

Senary6 commented 1 year ago

After some investigation it appears that the existence of the EFI variable LoaderEntryDefault will override the /boot/loader/loader.conf file. Going into the boot loader and deselecting the default entry by pressing the d key seems to have resolved the problem.

The boot loader is accessible by pressing any key while the computer is booting up. I tried ESC,Left Control,Left Shift and random letter keys on my keyboard.

What I think happened is that I accidentally went into the boot loader and created a default Entry for the 5.17.4-1139.native kernel by hitting the d key which overrode the loader.conf file, Unfortunately running bootctl set-default Clear-linux-native-6.0.9-1209.conf would have changed LoaderEntryDefault variable and destroyed the evidence for this.

So this appears to be a case of human error.

Some links

https://unix.stackexchange.com/questions/459389/systemd-boot-skips-boot-menu-and-ignores-settings-in-loader-loader-con https://superuser.com/questions/1346163/how-to-safely-set-change-remove-values-of-efi-variables

Edit: Apologies for For closing and opening the issue I am new to GitHub.

Senary6 commented 1 year ago

My system has updated to 37720 The kernel I am running is 6.0.11-1216.native, so it seems that the issues has been resolved and no-one has replied about my human error hypothesis. So I am closing the issue as caused by human error accidentally setting the default kernel in systemd-boot.