LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-13-2023, 06:45 AM   #46
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,385

Rep: Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105

Quote:
Originally Posted by bigbadaboum View Post
I think there may be a problem with the patch:

# Since upstream apparently can't be bothered, let's fix using ext* filesystems
# created with what are now the default options:
zcat $CWD/7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763.patch.gz | patch -p1 --verbose || exit 1

with grub-2.06-x86_64-5.txz
https://mirrors.slackware.com/slackw...source/a/grub/

I use for 2 years the slackbuild grub-2.06-x86_64-4 with:
--enable-libzfs=no \
--enable-efiemu=no \
--enable-grub-themes=no \
--enable-grub-emu-pci=no \
(don't judge me i'm a caveman )

grub-2.06-x86_64-4.txz 5,2 Mo

now with grub-2.06-x86_64-5 with:
--enable-libzfs=no \
--enable-efiemu=no \
--enable-grub-themes=no \
--enable-grub-emu-pci=no \

grub-2.06-x86_64-5.txz 12,2 Mo
No problem here with your config (only ~4k)
Code:
$ ls -l /tmp/grub-2.06-x86_64-*
-rw-r--r-- 1 root root 10206068 Aug 13 13:42 /tmp/grub-2.06-x86_64-4.txz (without the patch, more or less the same size on cumulative: https://slackware.uk/cumulative/slackware64-current/slackware64/a/grub-2.06-x86_64-4.txz)
-rw-r--r-- 1 root root 10202388 Aug 13 13:37 /tmp/grub-2.06-x86_64-5.txz (with the patch)

Last edited by marav; 08-13-2023 at 06:47 AM.
 
Old 08-13-2023, 09:08 AM   #47
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,517

Rep: Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346
Quote:
Originally Posted by Petri Kaukasoina View Post
If another OS wants to see versioned initrd, you can still use a single /boot/initrd.gz for multiple kernels, if you add versioned symlinks to it.
And who/what will make your initrd and these symlinks? You by hand or a script will do the job on fly?

I believe that the fundamental question is the one put by ZhaoLin1457 in this thread: will be there a single package for kernel and its modules which execute on its install/doinst.sh a script customizable by user?

The root feature which gives to user the freedom to customize as he like is this snippet on that package install/doinst.sh
Code:
if [ -x boot/setup-kernel ]; then
  /bin/chroot . /bin/sh -c "/boot/setup-kernel @@KERNEL_VERSION@@"
fi
I believe that does not matters if is better a mega-initrd (even with versioned symlinks) or the ones with versioned names like everybody else uses, or that you prefer to write by hand a /boot/grub/grub.cfg or not, as long this feature exists.

Heck, the Slackware even does not need to ship that /boot/setup-kernel script, as long that that 3 lines snippet exists on the install/doinst.sh from that package which ship both the kernel and its modules.

BUT, if this feature exists, the Slackers can choose from a fully manual configuration of initrd and GRUB2 up to a fully automatic configuration of them. As the Slackers themselves like.

Last edited by LuckyCyborg; 08-13-2023 at 09:51 AM.
 
Old 08-13-2023, 09:39 AM   #48
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,187

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
What I am about to request is dumb and extremely low priority but why the hell not? Are we going to get some kind of awesome branding / image used when GRUB2 is official? You know like what Debian does - Or any other distro....
 
Old 08-13-2023, 09:53 AM   #49
garpu
Senior Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 1,559

Rep: Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904
So, officially, the tools and such will only support one kernel? I thought suggested practice for Slackware was to always have two: one working, one backup.
 
Old 08-13-2023, 09:58 AM   #50
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,517

Rep: Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346
Quote:
Originally Posted by garpu View Post
So, officially, the tools and such will only support one kernel? I thought suggested practice for Slackware was to always have two: one working, one backup.
I for one, I believe that the best backup kernel is the working one.

BUT, there is still no way to do "upgradepkg /path/to/kernel-*.t?z" and the $(uname -r) kernel still to survive on reboot.

The guys and ladies who upgraded to 5.15.118 on a -stable release of Slackware, all of them using AMD graphics probably will agree with me.

Last edited by LuckyCyborg; 08-13-2023 at 10:01 AM.
 
1 members found this post helpful.
Old 08-13-2023, 10:02 AM   #51
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,385

Rep: Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105
Quote:
Originally Posted by Jeebizz View Post
What I am about to request is dumb and extremely low priority but why the hell not? Are we going to get some kind of awesome branding / image used when GRUB2 is official? You know like what Debian does - Or any other distro....
I don’t remember we do things like any other distro
AFAIK, Pat always provides most of the time, untouched pkg from source. I don’t see any reason for that to change

breeze-grub may be a good start ;-)

Last edited by marav; 08-13-2023 at 10:10 AM.
 
Old 08-13-2023, 10:03 AM   #52
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,517

Rep: Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346
Quote:
Originally Posted by Jeebizz View Post
What I am about to request is dumb and extremely low priority but why the hell not? Are we going to get some kind of awesome branding / image used when GRUB2 is official? You know like what Debian does - Or any other distro....
Well, I can tell you that the GRUB2 has support for this kind of graphics, and on the Internet you can find plenty of tutorials for this.

You can start by looking in /etc/default/grub and the GRUB2 man pages.
 
Old 08-13-2023, 10:06 AM   #53
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,385

Rep: Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105Reputation: 4105
Quote:
Originally Posted by LuckyCyborg View Post
I for one, I believe that the best backup kernel is the working one.

BUT, there is still no way to do "upgradepkg /path/to/kernel-*.t?z" and the $(uname -r) kernel still to survive on reboot.

The guys and ladies who upgraded to 5.15.118 on a -stable release of Slackware, all of them using AMD graphics probably will agree with me.
I sincerely congratulate all those who have a recent AMD and are still with kernel 5.15.x
 
1 members found this post helpful.
Old 08-13-2023, 10:07 AM   #54
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,517

Rep: Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346
Quote:
Originally Posted by marav View Post
I don’t remember we do things like any other distro
Believe it or not, Slackware does a lot of things like any other distro, otherwise it will not be a Linux distribution anymore.

For example, like any other Linux distribution it uses a Linux kernel. But the list is countless.

Quote:
Originally Posted by marav View Post
AFAIK, Pat always provides most of the time, untouched pkg from source. I don’t see any reason for that to change
The official way to configure the GRUB2, as recommended by its developers, is the usage of grub-mkconfig .

And yes, I do not see a reason to change this. After all, I use grub-mkconfig without issues since 2012.

Last edited by LuckyCyborg; 08-13-2023 at 11:08 AM.
 
1 members found this post helpful.
Old 08-13-2023, 10:09 AM   #55
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,811

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quote:
Originally Posted by garpu View Post
So, officially, the tools and such will only support one kernel? I thought suggested practice for Slackware was to always have two: one working, one backup.
installpkg and removepkg support multiple kernels. A single initrd.gz can support multiple kernel versions. Remember to blacklist kernel for slackpkg.
 
2 members found this post helpful.
Old 08-13-2023, 10:10 AM   #56
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,187

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
Quote:
Originally Posted by marav View Post
I don’t remember we do things like any other distro
AFAIK, Pat always provides most of the time, untouched pkg from source. I don’t see any reason for that to change

breeze-grub may be a good start ��
Except if you use the menu in LILO you get a Slackware brand image...
 
1 members found this post helpful.
Old 08-13-2023, 11:21 AM   #57
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,517

Rep: Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346
Quote:
Originally Posted by Petri Kaukasoina View Post
installpkg and removepkg support multiple kernels. A single initrd.gz can support multiple kernel versions. Remember to blacklist kernel for slackpkg.
When the users are forced to download manually the kernel packages and to install manually the kernel packages, the fact that "a single initrd.gz can support multiple kernel versions" becomes rather a matter of Slacker's taste.

I do not see how a mega-initrd will be interesting even on the case when the user do this manually installation of the kernel packages.

Even when it's used an "untouchable" /boot/grub/grub.cfg , the user can just make symlinks to /boot/initrd-latest.gz and /boot/initrd-previous.gz while making initrds with versioned names. Manually.

Last edited by LuckyCyborg; 08-13-2023 at 11:33 AM.
 
Old 08-13-2023, 11:38 AM   #58
garpu
Senior Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 1,559

Rep: Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904
We're talking Slackware, though. The average Slackware user is used to doing at least some things manually. Those who want to live on the edge can still use slackpkg, et al to handle their kernel. Those who wish to automate more can do that, too.

It's like the argument my partner and I have about automation, scripting, etc. I don't trust scripts because I don't trust that the script will get it right. He doesn't trust doing things manually, because he doesn't trust that he'll get it right. (It's a mixed marriage. I like Slackware. he likes Alma/Windows. )

Last edited by garpu; 08-13-2023 at 11:40 AM.
 
2 members found this post helpful.
Old 08-13-2023, 11:49 AM   #59
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,811

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Yes. There are two orthogonal problems and their solutions.
  1. Use grub instead of (e)lilo as a boot loader.
  2. Automatically install a new kernel, modules, and initrd, possibly leaving working versions of $(uname -r) as a backup.
I think Patrick is now solving problem number one. Of course, it would be nice to also solve problem number two, but it could have been solved a long time ago, or it can be solved in the far future. It's not directly connected to lilo/grub choice.

Last edited by Petri Kaukasoina; 08-13-2023 at 11:51 AM.
 
5 members found this post helpful.
Old 08-13-2023, 11:50 AM   #60
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,517

Rep: Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346Reputation: 3346
Quote:
Originally Posted by chrisretusn View Post
A point regarding mkinird.

If you are going to make an /etc/mkinitrd.conf and use it you must use the -F switch to read it.

This does not use /etc/mkinitrd.conf:
Code:
mkinitrd -c -k 6.1.45 -o /boot/initrd-6.1.45.img
This does (note I left out the "-c" option, it's in the mkinitrd.conf (CLEAR_TREE="1"). I could have left out the -k option also.
Code:
mkinitrd -F -k 6.1.45 -o /boot/initrd-6.1.45.img
This is what I used with my last kernel upgrade. I keep at least two kernels bootable):
Code:
mkinitrd -F -k 6.1.44:6.1.45
It uses this /etc/mkinitrd.conf:
Code:
SOURCE_TREE="/boot/initrd-tree"
CLEAR_TREE="1"
OUTPUT_IMAGE="/boot/initrd.gz"
KEYMAP="us"
MODULE_LIST="jbd2:mbcache:crc32c_intel:crc32c_generic:ext4:drivetemp"
LUKSDEV=""
ROOTDEV="/dev/sda1"
ROOTFS="ext4"
RESUMEDEV=""
RAID=""
LVM=""
UDEV="1"
WAIT="1"
Yes, you are right. For the stock mkinitrd the -F parameter is mandatory.

Seems like ZhaoLin1457 still uses (just like me) a /sbin/mkinitrd to which have applied long time ago this patch bellow (made by me) for Slackware 15.0:
Code:
--- mkinitrd.orig	2022-01-26 22:33:29.000000000 +0200
+++ mkinitrd	2023-08-13 19:38:19.084631792 +0300
@@ -85,10 +85,6 @@
 root filesystem is available.  Other binaries may be added to the
 initrd, and the script is easy to modify.  Be creative.  :-)
 
-  -F      Use the contents of /etc/mkinitrd.conf (optional)
-          If this is used in conjunction with any other options passed
-          on the command line, the command-line options will override
-          the config file options.  See mkinitrd.conf(5) for details.
   -c      Clear the existing initrd tree first
   -f      Filesystem to use for root partition (must be used with -r)
   --help  Display this message
@@ -342,17 +338,10 @@
   fi
 fi # default no-option actions
 
-# Parse for the use config file option first or else the other command
-# line options can not override /etc/mkinitrd.conf. 
-for opt in "$@"; do
-  if [ "$opt" = "-F" ]; then
-      if [ -e /etc/mkinitrd.conf ]; then
-        . /etc/mkinitrd.conf || badconf_file
-      else
-        badconf_file
-      fi
-  fi
-done
+# Include the configuration file.
+if [ -e /etc/mkinitrd.conf ]; then
+  . /etc/mkinitrd.conf || badconf_file
+fi
 
 # Parse options:
 while [ ! -z "$1" ]; do
My rationale for this patch is that a program (or script) should use in a mandatory way its configuration file, not in an optionally way how does the stock /sbin/mkinitrd . Yeah, probably the patch can be improved.

And yes, I played a bit with this script in the past, and me and ZhaoLin1457 shared along our experiences regarding the scripting of the boot(loader) setup.

Last edited by LuckyCyborg; 08-13-2023 at 11:55 AM.
 
1 members found this post helpful.
  


Reply

Tags
grub, grub2



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

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

All times are GMT -5. The time now is 02:08 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