LinuxQuestions.org
Help answer threads with 0 replies.
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-02-2022, 05:02 AM   #916
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,577

Rep: Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449

Quote:
Originally Posted by elcore View Post
Well I'm in a situation where a "kernel-build" compiles and/or installs a kernel into /tmp/new-kernel:
Code:
. kernel-build &&

mv /boot/* /old-boot/ &&
mv /tmp/new-kernel/* /boot/ &&
ls /boot/*

System.map config vmlinuz
_
The boot loader is then static, with read-only configuration file. This is done by choice.
Why would I want to wrap another script around mkconfig, which defeats the whole purpose of read-only file?
This update-grub2 script is not for your but for regular Slackware users which would like to go with defaults, and probably it will stay in /sbin . You will not be affected by its presence, excluding maybe several (hundred) bytes of storage consumed, unless you activate the GRUB2 bootloader.

This update-grub2 script is supposed to be called by the Slackware packages for kernels, in their doinst.sh and IF by configuration is disabled, will do NOTHING. And it makes sense only when GRUB2 bootloader installed, then an additional check could be done.

I did not asked you to wrap your mkconfig and your custom scripts!

Last edited by LuckyCyborg; 08-02-2022 at 05:05 AM.
 
Old 08-02-2022, 05:05 AM   #917
henca
Senior Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 1,011

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
Quote:
Originally Posted by LuckyCyborg View Post
Well, at least GRUB2 has developers. LILO, ELILO and SYSLINUX are all abandoned puppies since long years - ELILO since 2014 if I remember right.
Among those abandoned boot loaders I still prefere LILO for MBR boot and if UEFI is needed I prefer syslinux/extlinux.
For installation media on CD/DVD I use syslinux for legacy boot and grub for UEFI boot, unfortunately syslinux does not support UEFI boot with CD/DVD. The major reason for me prefering LILO and syslinux is that they have rather simple configuration files, syslinux is also usable for other purposes like network boot.

Quote:
Originally Posted by LuckyCyborg View Post
In other hand, Slackware is today the single major Linux distribution where the users should manually intervene to update the bootloaders on kernel upgrades, otherwise they will end with a broken system.

No Ubuntu or Fedora or OpenSUSE user cares about initrds and huge kernels. Or custom kernels. You know why? Because they have no need to deal with things like this, as everything is done seamless.
With a more or less custom huge kernel there is no need to mess with any initrd.

Quote:
Originally Posted by LuckyCyborg View Post
How complicated would be for Slackware to do like those other major distributions do?

It's enough to have a bit improved mkinitrd - with sane defaults when the options aren't give on command line or config and the scripts from the kernel packages to call "grub-mkconfig -o /boot/grub/grub.cfg"

That's it. It's enough to generate a proper initrd and to update a GRUB2 config file each time a new kernel is installed or upgraded.

Heck, a system like this does not even enter in conflict with the passion of building custom Kernelzillas manifested by some people. They should just remember to update that GRUB2 config file.
Maybe it would work with grub, but I have made my own kernel update packages which are installed to many machines. The installation script of those packages does:

1) Moves the old kernel files to /boot/old_kernels/${kernel}.`date +%y%m%d`
2) Copies the new kernel files to a subdirectory of /boot like /boot/huge.s
3) gunzip boot/${kernel}/System.map.gz
4) If /boot/efi/EFI/Boot directory exist, copy bzImage to boot/efi/EFI/Boot/vmlinuz
5) Runs lilo if /boot/extlinux.conf is missing

This installation script allows automatic kernel updates on many different machines using different kernel configurations and different boot methods (lilo or extlinux).

regards Henrik
 
Old 08-02-2022, 05:19 AM   #918
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,577

Rep: Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449
Quote:
Originally Posted by henca View Post
Among those abandoned boot loaders I still prefere LILO for MBR boot and if UEFI is needed I prefer syslinux/extlinux.
For installation media on CD/DVD I use syslinux for legacy boot and grub for UEFI boot, unfortunately syslinux does not support UEFI boot with CD/DVD. The major reason for me prefering LILO and syslinux is that they have rather simple configuration files, syslinux is also usable for other purposes like network boot.
The ELILO is already broken, the LILO can stay well in SBo and from what I know, the SYSLINUX shipped by Slackware has no UEFI support. So, you use a custom SYSLINUX package, right?

Then, what stops you to continue to use your custom bootloaders?

Quote:
Originally Posted by henca View Post
With a more or less custom huge kernel there is no need to mess with any initrd.
Permit me to differ. Everybody uses initrds (generated on-fly) and generic kernels. And nobody other than Slackware asks the users to manualy update their bootloaders. True, everybody uses GRUB2 and nothing else. No LILO, no ELILO, no SYSLINUX, nothing else.

In other hand, I for one I use UUIDs for defining the partitions, which is the safest way to ensure that no matter where you mount that particular hard drive, the partitions would find with accuracy.

So, I believe that initrds is a must have and huge kernels should go Dodo bird way. Anyway, I never used them other than in the Slackware installer and I truly do not understand for what they are good for. Even the Slackware installer can work well with a generic kernel, considering that it have a huge initrd.

BUT, please note that I talk only about the Slackware kernels - be my guest to build yourself Kernelzillas as huge as you like.

Quote:
Originally Posted by henca View Post
Maybe it would work with grub, but I have made my own kernel update packages which are installed to many machines. The installation script of those packages does:

1) Moves the old kernel files to /boot/old_kernels/${kernel}.`date +%y%m%d`
2) Copies the new kernel files to a subdirectory of /boot like /boot/huge.s
3) gunzip boot/${kernel}/System.map.gz
4) If /boot/efi/EFI/Boot directory exist, copy bzImage to boot/efi/EFI/Boot/vmlinuz
5) Runs lilo if /boot/extlinux.conf is missing

This installation script allows automatic kernel updates on many different machines using different kernel configurations and different boot methods (lilo or extlinux).

regards Henrik
Exactly for GRUB2 is supposed to work. For everything else and your custom kernels installations, this feature can be easily disabled in a consistent way.

No, I do not ask you to change your workflow, but to be kind to permit to majority of Slackware users to have a consistent boot setup without to be required to be rocket scientists.

They can have a seamless kernels upgrade without your custom workflows to be affected. I explained already how.

Last edited by LuckyCyborg; 08-02-2022 at 05:46 AM.
 
Old 08-02-2022, 05:30 AM   #919
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,577

Rep: Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449
Quote:
Originally Posted by teoberi View Post
For me full control means manual
Then what stops you to continue to go the "manual" way?

The /boot/grub/grub.cfg is a text file and you can write it well also by hand, provided that you already disabled its auto-update when a new kernel is installed, IF my idea of update-grub2 script is implemented.

Please note that right now nothing auto-updates this GRUB2 config file.

Last edited by LuckyCyborg; 08-02-2022 at 05:34 AM.
 
Old 08-02-2022, 06:11 AM   #920
adcdam
Member
 
Registered: Aug 2020
Location: Berisso, Argentina
Distribution: Slackware
Posts: 255

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by LuckyCyborg View Post
The ELILO is already broken, the LILO can stay well in SBo
who the hell you think you are to decide where the packages should go?
are you retarded? you still dont learn that this this distro is not Ubuntu or Fedora or OpenSUSE? if you like that why dont you use that and leave this forum with all your shit alone? i dont use grub2, i use rEFInd, why dont you stop your bullshit and leave the guys that manage the distro do their work in peace?
this is clearly not a distro for you is not that hard to understand.

Last edited by adcdam; 08-02-2022 at 06:48 AM.
 
1 members found this post helpful.
Old 08-02-2022, 06:17 AM   #921
teoberi
Member
 
Registered: Jan 2018
Location: Romania
Distribution: Slackware64-current (servers)/Windows 11/Ubuntu (workstations)
Posts: 619

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Quote:
Originally Posted by LuckyCyborg View Post
Then what stops you to continue to go the "manual" way?

The /boot/grub/grub.cfg is a text file and you can write it well also by hand, provided that you already disabled its auto-update when a new kernel is installed, IF my idea of update-grub2 script is implemented.

Please note that right now nothing auto-updates this GRUB2 config file.
I want to be able to generate initrd manually, this is the only operation I do when updating the kernel.
Let's see if GRUB2 will become the standard in Slackware and after that we'll see how we manage with it.
 
Old 08-02-2022, 06:25 AM   #922
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,918

Rep: Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035
Quote:
Originally Posted by LuckyCyborg View Post

So, I believe that initrds is a must have and huge kernels should go Dodo bird way. Anyway, I never used them other than in the Slackware installer and I truly do not understand for what they are good for.
On that I agree with you. I'd also argue that there's no point having a separate kernel-modules package and that a single kernel+modules package would be more reliable (removing the possibility of a kernel/modules mismatch). That's been my opinion for years. Anyway, this has been suggested multiple times over the years and never goes anywhere, so don't hold your breath.


My problem with grub2 is that it will require a /boot partition and I don't currently have any space to make one, so it's going to mean a full repartition and reinstall when/if I have to switch. In contrast ELILO is completely self-contained within its subdirectory of the EFI partition, is simple to configure, and has thus far caused me absolutely no issues at all. Switching to grub2 is simply not worth the inconvenience here. These issues with Pat's 5.19 packages are certainly concerning, but do we really know that ELILO is at fault at this point?

Like elcore the contents of my ELILO.CONF is completely read-only and never changes. I have a post-install script that will be automatically invoked by my 'slackup' tool whenever it sees the kernel-modules package is updated/installed and which will update vmlinuz and initrd files in the EFI partition for me. This gives me the automatic self-managing behaviour you crave. It's trivial system administration stuff and I'm sure many others have come up with their own automated solutions for this.
 
Old 08-02-2022, 06:34 AM   #923
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,077

Rep: Reputation: Disabled
Quote:
Originally Posted by GazL View Post
My problem with grub2 is that it will require a /boot partition
No. None of my systems have a separate /boot partition and I have no issue booting them with grub2. This includes for some of them an encrypted root partition that grub2 kindly unlocks to find the kernel and initrd in /boot (a directory in the root partition, not a separate partition).

Last edited by Didier Spaier; 08-02-2022 at 06:42 AM.
 
4 members found this post helpful.
Old 08-02-2022, 06:49 AM   #924
ZhaoLin1457
Senior Member
 
Registered: Jan 2018
Posts: 1,047

Rep: Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260
Quote:
Originally Posted by adcdam View Post
who the hell you think you are to decide where the packages should go?
are you retarded? you still dont learn that this this distro is not Ubuntu or Fedora or OpenSUSE? if you like that why dont you use that and leave this forum with all your shuit alone? i dont use grub2, i use rEFInd, why dont you stop your bullshit and leave the guys that manage the distro do their work in peace?
this is clearly not a distro for you is not that hard to understand.
This forum has written rules that says that personal insults are not accepted. I think this post of yours will not be appreciated by moderators.

And please stop with this Vendetta against LuckyCyborg, it makes no sense! All your posts in the last time are insults at LuckyCyborg's address. You have nothing else to say, in a civil manner?

Anyway, this is a requests thread, and anybody has the freedom to propose anything they want. Who are you to censure what is proposed here?

Last edited by ZhaoLin1457; 08-02-2022 at 06:55 AM.
 
9 members found this post helpful.
Old 08-02-2022, 07:12 AM   #925
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,918

Rep: Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035
Quote:
Originally Posted by Didier Spaier View Post
No. None of my systems have a separate /boot partition and I have no issue booting them with grub2. This includes for some of them an encrypted root partition that grub2 kindly unlocks to find the kernel and initrd in /boot (a directory in the root partition, not a separate partition).
My understanding was that grub2 needs to load its modules from /boot/grub to support lvm and luks, but perhaps I'm mistaken on that one. I currently have lvm on LUKS2. I know grub2 has/had issues with LUKS2 support initially, don't know whether that is still true.
 
Old 08-02-2022, 07:23 AM   #926
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,577

Rep: Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449Reputation: 3449
Quote:
Originally Posted by GazL View Post
My understanding was that grub2 needs to load its modules from /boot/grub to support lvm and luks, but perhaps I'm mistaken on that one. I currently have lvm on LUKS2. I know grub2 has/had issues with LUKS2 support initially, don't know whether that is still true.
Nope. The GRUB2's grub-install uses this /boot/grub directory as a temporary place to build a core.img and/or core.efi, which are both composite binaries and the real installed stage2.

True, for the hard drives with GPT partition labels, GRUB2 needs for MBR/BIOS mode, a small BIOS boot type partition. BUT, this one could be at small as 1MB.

Yesterday, I had 2 failures with the kernel 5.19.0 and ELILO. Because I have the habit to keep the drives bootable also as BIOS/CSM legacy, even I use UEFI, I added this partition by simply removing the UEFI ESP of 500MB and creating two partitions: 5MB for BIOS boot and 495MB for ESP. That's all.

BTW, in the ESP, the grub-install installed only a single EFI binary, where is hardcoded the UUID of partition where it have to look for its grub.cfg.

Last edited by LuckyCyborg; 08-02-2022 at 07:34 AM.
 
2 members found this post helpful.
Old 08-02-2022, 07:50 AM   #927
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,077

Rep: Reputation: Disabled
Quote:
Originally Posted by GazL View Post
My understanding was that grub2 needs to load its modules from /boot/grub to support lvm and luks, but perhaps I'm mistaken on that one. I currently have lvm on LUKS2. I know grub2 has/had issues with LUKS2 support initially, don't know whether that is still true.
no issue with LVM as far as I know, LUKS2 is supported since 2.06 with the exception of Argon2i as stated in this commit. I still use LUKS1, but no LVM as instead I use a btrfs file system with / and /home as subvolumes so no need to worry about the space allocated to / and /home respectively as they use the same pool as illustrated below. And GRUB handles this setup out of the box:
Code:
didier[~]$ findmnt /
TARGET SOURCE        FSTYPE OPTIONS
 /      /dev/sda4[/@] btrfs  rw,noatime,compress=zstd:3,space_cache=v2,subvolid=256,subvol=/@
didier[~]$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 149,1G  0 disk 
├─sda1   8:1    0     3M  0 part 
├─sda2   8:2    0    50M  0 part /boot/efi
├─sda3   8:3    0 122,2G  0 part /storage
└─sda4   8:4    0  26,8G  0 part /swap
                                 /snapshots
                                 /home
                                 /
sdb      8:16   0    32K  0 disk 
sr0     11:0    1  1024M  0 rom  
zram0  252:0    0     0B  0 disk 
zram1  252:1    0  15,3G  0 disk [SWAP]
didier[~]$ df -h
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
devtmpfs           3,8G       0  3,8G   0% /dev
tmpfs              3,9G       0  3,9G   0% /dev/shm
tmpfs              3,9G    1,6M  3,9G   1% /run
/dev/sda4           27G    9,7G   17G  37% /
cgroup_root        8,0M       0  8,0M   0% /sys/fs/cgroup
/dev/sda2           50M    284K   50M   1% /boot/efi
/dev/sda4           27G    9,7G   17G  37% /home
/dev/sda4           27G    9,7G   17G  37% /snapshots
/dev/sda4           27G    9,7G   17G  37% /swap
/dev/sdc6           23G     12G   12G  50% /other
tmpfs              3,9G    320K  3,9G   1% /tmp
/dev/sda3          121G     61G   54G  54% /storage
tmpfs              785M     30M  755M   4% /run/user/1000
PS And a btrfs file system can handle several devices so I don't think I will need LVM for anything, but I digress.

Last edited by Didier Spaier; 08-02-2022 at 07:59 AM.
 
2 members found this post helpful.
Old 08-02-2022, 08:03 AM   #928
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,077

Rep: Reputation: Disabled
Quote:
Originally Posted by LuckyCyborg View Post
True, for the hard drives with GPT partition labels, GRUB2 needs for MBR/BIOS mode, a small BIOS boot type partition. BUT, this one could be at small as 1MB.
In recent versions for complex layouts, more (I use 3M to be safe). Before that you could just use the gap between the the end of the partition table and the beginning of the first partition.
 
1 members found this post helpful.
Old 08-02-2022, 08:14 AM   #929
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,918

Rep: Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035
I just had a peruse of the Arch wiki on the subject and yes, it looks like you are right, you have to tell grub to preload the modules in its conf file before you do a grub-install, I'd assumed it read them from /boot/grub at runtime, apparently not.

Anyway, I also noticed from that page that you have to start messing with custom core images to get non-US keyboard maps included, that puts me off a little as the whole thing is getting overly involved.

Until I hit a problem, I'm just going to stick with ELILO, but thankyou for your input.
 
1 members found this post helpful.
Old 08-02-2022, 09:00 AM   #930
garpu
Senior Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 1,609

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
I know people are trying to help with grub2, and that might well be the answer, but pushing it *now* isn't really doing anything to fix the problem of the default configuration (elilo) being broken for some. That some have it working with elilo and 5.19 means that it could be a config issue, a bug in the kernel, or a bug in elilo. Just switching to grub isn't going to help nail down what that is.
 
7 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
Apache 2.4 requests to non-SSL site with "Upgrade-Insecure-Requests: 1" and no trailing / get redirected to default site owendelong Linux - Server 2 06-22-2021 02:08 PM
[SOLVED] Requests for -current (20151216) rworkman Slackware 3441 12-28-2017 03:50 PM

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

All times are GMT -5. The time now is 03:39 PM.

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