LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-29-2023, 04:51 PM   #1
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,361

Rep: Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075
Grub 2.12 feedbacks


Grub 2.12 has been added in Salckware current /testing tree
Code:
testing/packages/grub-2.12-x86_64-1.txz:  Added.
Here, it doesn't boot correctly
It just cycles to my BIOS

Last edited by marav; 12-29-2023 at 04:55 PM.
 
Old 12-29-2023, 05:55 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
I couldn't run the package on Slint64-15.0 (SO libs mismatch) but built it, installed it and it works here (TM) with a few caveats about the menu. At least I could type:
Code:
grub-install /dev/sdb
grub-mkconfig -o /boot/grub/grub.cfg
then reboot and I am back to post this finding.
This is with UEFI.
 
1 members found this post helpful.
Old 12-29-2023, 06:07 PM   #3
reddog83
Member
 
Registered: Apr 2018
Distribution: Slackware 15.0/Current
Posts: 443

Rep: Reputation: 229Reputation: 229Reputation: 229
Could you post diff's of the files that you modified?
 
Old 12-29-2023, 06:58 PM   #4
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,361

Original Poster
Rep: Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075
Quote:
Originally Posted by Didier Spaier View Post
I couldn't run the package on Slint64-15.0 (SO libs mismatch) but built it, installed it and it works here (TM) with a few caveats about the menu. At least I could type:
Code:
grub-install /dev/sdb
grub-mkconfig -o /boot/grub/grub.cfg
then reboot and I am back to post this finding.
This is with UEFI.
This release 2.12 needs a reinstall ?
 
Old 12-29-2023, 07:00 PM   #5
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,361

Original Poster
Rep: Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075
According to Arch PKGBUILD:
Code:
post_upgrade() {
  # We used to package /boot/grub/grub.cfg, but there is no reason to.
  # Remove the file from package, but move real file back in place.
  if [ ! -f /boot/grub/grub.cfg -a -f /boot/grub/grub.cfg.pacsave ]; then
    mv /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg
  fi

  # Give a hint to update installation and configuration one after another.
  cat <<EOM
:: To use the new features provided in this GRUB update, it is recommended
   to install it to the MBR or UEFI. Due to potential configuration
   incompatibilities, it is advised to run both, installation and generation
   of configuration:
     # grub-install ...
     # grub-mkconfig -o /boot/grub/grub.cfg
EOM
https://gitlab.archlinux.org/archlin...ref_type=heads
 
Old 12-29-2023, 07:22 PM   #6
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,361

Original Poster
Rep: Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075Reputation: 4075
Quote:
Originally Posted by Daedra View Post
After testing in a VM first I installed 2.12 on my main machine and all is good. I did have to tweak Richard Cranium's 09_slackware_linux script that I like to use, I disable 10_linux since his script gives a cleaner menu IMO. The script still worked but was giving some deprecation warnings. After a small tweak the script works fine again with no warnings.
Could you provide your tweaks?
 
Old 12-29-2023, 07:52 PM   #7
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Quote:
Originally Posted by marav View Post
Could you provide your tweaks?
Sure, here is the 09_slackware_linux file I use.
https://raw.githubusercontent.com/md...lackware_linux
 
Old 12-29-2023, 07:58 PM   #8
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
I have been using the os-prober to find my Windows Partition which worked perfectly fine. but I have noticed that a few weeks back all of the sudden the os-prober is now finding the Slackware kernels. This is creating duplicate entries which is really annoying. My work around is to disable os-prober and just create a custom entry for my Windows partition in /etc/grub.d/40_custom. This workaround is acceptable but I was just wondering if anyone else is seeing this behavior. Here is the output grub-mkconfig -o /boot/grub/grub.cfg with os-prober enabled.

Code:
Generating grub configuration file ...
Found background: /mnt/backup/wallpaper/slackware_3d_grey.png
Found linux image: /boot/vmlinuz-generic-6.6.8 
Found linux image: /boot/vmlinuz-huge-6.6.8 
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Slackware 15.0 x86_64 (post 15.0 -current) on /dev/nvme1n1p1
Adding boot menu entry for UEFI Firmware Settings ...
done
 
Old 12-30-2023, 02:44 AM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
Quote:
Originally Posted by marav View Post
This release 2.12 needs a reinstall ?
Probably not, even more so as I built and installed the EFI OS loader previously using the grub 2.12 shipped in Slint with a similar command, but it won't hurt.

Last edited by Didier Spaier; 12-30-2023 at 02:46 AM.
 
Old 12-30-2023, 03:15 AM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
Quote:
Originally Posted by reddog83 View Post
Could you post diff's of the files that you modified?
To build the Slackware package I just ran the SlackBuild in /testing as is. Other than that, sources of the Slint package (only tested on 15.0).
 
Old 12-30-2023, 03:51 AM   #11
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,024

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
I just built grub 2.12 using the SlackBuild in /testing. Installed it, ran my mkinird script and then grub-mkconfig -o /boot/grub/grub.cfg and rebooted and all is good. Did have a couple of warnings about parts being deprecated but it all works just fine.

Edit: Started playing with the .new files and managed to get to a state where it wouldn't boot, just black screen and reboot. Booted Knoppix and restored grub backup files with version 2.06. Will have to try again and reinstall Grub 2.12

Edit1: OK, got it installed and booting. In /etc/grub.d I moved all of the new files to their old counterparts. Did not use the /etc/default/grub.new file since I had done customizing to the existing grub file and my customizing was the only difference. Ran grub-install and it complained that /boot/efi was not a fat partition. Ran lsblk to get efi partition. Mounted my uefi partition /dev/nvme0n1p1 on /boot/efi. Install went fine. Recreated my initrd and rebooted. Everything went swimmingly. Good way to finish 2023.

Last edited by 3rensho; 12-31-2023 at 05:47 AM. Reason: Install success
 
Old 12-30-2023, 04:26 AM   #12
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
Caveat: if you keep .orig files in /etc/grub.d/ (like 10_linux alongside 10_linux.orig), grub-mkconfig will run them, leading to duplicate boot entries. So(re)move any .orig or make it non executable.

Post edited, see the reason below.

Last edited by Didier Spaier; 12-30-2023 at 03:04 PM. Reason: Correction: only .porig files are run by grub-mkconfig if executable/
 
Old 12-30-2023, 05:05 AM   #13
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
Please run grub-install just after having upgarded grub.

I just got a bug report in the Slint mailing list, quoted below:
Quote:
yesterday I upgraded grub on my laptop and now I'm not able to boot. The message on the screen is so fast that my son was obliged to take a video and it appears that it complains about a file that it can't find :

/boot/grub/x86_64-efi/bli.mod

Some help please ?
My second answer (the first was not complete):
Code:
Please boot the installer, then as soon as you get the prompt mount the root
partition as /mnt, then type (I assume that the disk is named /dev/sda, else
adapt accordingly):
mount -B /dev /mnt/dev
mount -B /proc /mnt/proc
mount -B /sys /mnt/sys
chroot /mnt
mount -a
mount -t efivarfs none /sys/firmware/efi/efivars
# the command above only needed and successful if you booted
# in EFI mode but else won't hurt
grub-install /dev/sda
Running grub-install should solve the issue as it copies all needed files under /boot/grub, including the new bli module.

PS digging a little more the bli module was added to make happy systemd as stated in this log lines 1942-1970

Last edited by Didier Spaier; 12-30-2023 at 06:31 AM. Reason: Rewritten
 
1 members found this post helpful.
Old 12-30-2023, 07:01 AM   #14
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
How to run grub-install in doinst.sh

If we want to run grub-install in a post-install script like doinst.sh after a grub upgrade and if we assume that grub is installed on the drive hosting the root partition this code snippet could help:
Code:
ROOTPART=$(findmnt -lno source /|sed 's;[[].*;;')
ROOTDEVICENAME=$(lsblk -lno pkname $ROOTPART)
grub-install /dev/$ROOTDEVICENAME
grub-mkconfig -o /boot/grub/grub.cfg #Just in case GRUB was installed previously in another drive or not at all.
The sed command removes [sub-volume name] from the output of of findmnt, case occurring. For instance here:
Code:
findmnt -lno source /
/dev/sdb13[/@]
But:
Code:
findmnt -lno source /|sed 's;[[].*;;'
/dev/sdb13
We could as well scan /etc/fstab, but it's a bit more tricky as the root partition can be named several ways.

Last edited by Didier Spaier; 12-30-2023 at 10:54 AM. Reason: Typo fix.
 
Old 12-30-2023, 09:28 AM   #15
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 633

Rep: Reputation: 484Reputation: 484Reputation: 484Reputation: 484Reputation: 484
Quote:
Originally Posted by Didier Spaier View Post
If we want to run grub-install in a post-install script like doinst.sh after a grub upgrade and if we assume that grub is installed on the drive hosting the root partition this code snippet could help:
Code:
ROOTPART=$(findmnt -lno source /|sed 's;[[].*;;')
ROOTDEVICENAME=$(lsblk -lno pkname $ROOTPART)
grub-install /dev/$ROOTDEVICENAME
grub-mkconfig -o /boot/grub/grub.cfg #Just in case GRUB was installed previously in another drive or not at all.
The sed command removes [sub-volume name] from the output of of findmnt, case occurring. For instance here:
Code:
findmnt -lno source /
/dev/sdb13[/@]
But:
Code:
findmnt -lno source /|sed 's;[[].*;;'
/dev/sdb13
We could as well scan /etc/fstab, but it's a bit more tricky as the root partition can be named several ways.
typo
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
Any feedbacks on Tiscali? Zippelin General 6 05-01-2008 06:23 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
wbel feedbacks pcandpc General 4 05-28-2005 10:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration