SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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:
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
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.
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
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.
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
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/
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.