update-grub issue

You have a problem with Slackel? Post here and we'll do what we can to help.
Post Reply
juliusse
Posts: 89
Joined: 21 Jan 2019 18:26

update-grub issue

Post by juliusse »

Hi,
I've got an issue running update-grub.
After a kernel upgrade, from 5.4.74 to 5.4.75, the result of the command is very curious.

Code: Select all

root[julien]# update-grub
Generating grub configuration file ...
Found background: /boot/grub/slackel.png
Found linux image: /boot/vmlinuz-huge-5.4.75
Found linux image: /boot/vmlinuz-huge-5.4.70
Found linux image: /boot/vmlinuz-huge
Found 'Slackel Linux 5.4.72' (7.3) on /dev/sda2
done
This is very strange since I was not running the 5.4.72

Code: Select all

julien[~]$ uname -a
Linux slackel.example.net 5.4.74 #1 SMP Sun Nov 1 12:17:11 CST 2020 x86_64 AMD A6-7310 APU with AMD Radeon R4 Graphics AuthenticAMD GNU/Linux
I think I will not be able to reboot the laptop.
Any idea?
Ubuntu is an African term for:"Slackware is too difficult for me"
juliusse
Posts: 89
Joined: 21 Jan 2019 18:26

Re: update-grub issue

Post by juliusse »

one thing more curious, looking at the grub.conf file, I've found those lines (in the os-prober part)

Code: Select all

menuentry ''\''Slackel Linux 5.4.72'\'' (7.3) (on /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge-5.4.75--ae3d67c7-83e4-4589-952f-2d136573a8c5' {
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  ae3d67c7-83e4-4589-952f-2d136573a8c5
		else
		  search --no-floppy --fs-uuid --set=root ae3d67c7-83e4-4589-952f-2d136573a8c5
		fi
		linux /boot/vmlinuz-huge-5.4.75 root=/dev/sda2

and this one on an older (e.g. the one for 5.4.74)

Code: Select all

menuentry ''\''Slackel Linux 5.4.72'\'' (7.3) (on /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge-5.4.74--ae3d67c7-83e4-4589-952f-2d136573a8c5' {
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  ae3d67c7-83e4-4589-952f-2d136573a8c5
		else
		  search --no-floppy --fs-uuid --set=root ae3d67c7-83e4-4589-952f-2d136573a8c5
		fi
		linux /boot/vmlinuz-huge-5.4.74 root=/dev/sda2
Ubuntu is an African term for:"Slackware is too difficult for me"
juliusse
Posts: 89
Joined: 21 Jan 2019 18:26

Re: update-grub issue

Post by juliusse »

I think I've found something, looking at the result of neofetch
(take note that the kernel has been upgraded but the laptop has not been rebooted for the moment)

Code: Select all

neofetch
        #####           julien@slackel.example.net 
       #######          -------------------------- 
       ##O#O##          OS: Slackel Linux 5.4.72 x86_64 
       #######          Host: X555YI 1.0 
     ###########        Kernel: 5.4.74 
    #############       Uptime: 1 hour, 45 mins 
   ###############      Packages: 1002 (pkgtool) 
   ################     Shell: bash 5.0.18 
  #################     Resolution: 1366x768 
#####################   DE: Plasma 
#####################   WM: KWin 
  #################     Theme: [Plasma], oxygen-gtk [GTK2/3] 
                        Icons: oxygen [Plasma], simple [GTK2] 
                        Terminal: konsole 
                        CPU: AMD A6-7310 APU with AMD Radeon R4 Graphics (4) @  
                        GPU: AMD ATI Radeon R5 M230 / R7 M260DX / Radeon 520 Mo 
                        GPU: AMD ATI Radeon R4/R5 Graphics 
                        Memory: 1382MiB / 10891MiB 
I think the issue is there since 5.4.72, but not problematic as the right kernel is booting, even if it's seems to point to 5.4.72.
Ubuntu is an African term for:"Slackware is too difficult for me"
djemos
Site Admin
Posts: 697
Joined: 15 Apr 2016 06:03

Re: update-grub issue

Post by djemos »

I think you upgrade your kernel manually using slapt-get and not using install-upgrade-kernel script, which is OK.
Type

Code: Select all

sudo slapt-get -i --reinstall lsb-release

Code: Select all

sudo geany /etc/lsb-release
Change lines to look like this bellow (If you run kde change Openbox with KDE)

Code: Select all

LSB_VERSION=1.4
DISTRIB_ID=slackel
DISTRIB_RELEASE=7.3
DISTRIB_CODENAME=Openbox
DISTRIB_DESCRIPTION='Slackel Linux 5.4.75'
After a manually kernel upgrade have to edit this file and change the 5.4.75 to new kernel version. This done automatically using the script install-upgrade-kernel but it is dangerous in slow internet connections.
Save the file and run

Code: Select all

sudo update-grub

Code: Select all

neofetch
You also have more kernels installed. Type ls /var/log/packages/kernel-*
You can keep only latest kernel and remove the others

Code: Select all

sudo spkg -d /var/log/packages/kernel-huge-5.4.70-x86_64-1
sudo spkg -d /var/log/packages/kernel-huge-5.4.72-x86_64-1
sudo spkg -d /var/log/packages/kernel-modules-5.4.70-x86_64-1
sudo spkg -d /var/log/packages/kernel-modules-5.4.72-x86_64-1
Then run again

Code: Select all

sudo update-grub
juliusse
Posts: 89
Joined: 21 Jan 2019 18:26

Re: update-grub issue

Post by juliusse »

Thanks for the info, that's what I was thinking.
Since I've got this week a very good connection, I solve the issue in a "brutal way", running

Code: Select all

sudo install-upgrade-kernel upgrade huge
(before reading your post)
I've then removed the old kernels, everything is fine
I now know what to do in case of a poor connection and a manual kernel upgrade.
Thanks again, have a nice day.
Ubuntu is an African term for:"Slackware is too difficult for me"
Post Reply