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.
Possibly just a typo, but if your initrd file is called "inird", change it to initrd.gz or something that the "11_linux_slackcustom" looks for (lines 194 to 204).
Ok, it seems that you know what you're talking about so I will follow your suggestions. Out of curiosity: why is this dangerous?
Code:
ls -l /boot
My example is for a simple GRUB menu with 2 options, but it can also be adapted if you want more kernel versions.
I know what I'm talking about because before I do something I document myself, then test on the test server or in a virtual machine and finally I apply on the production server.
It does not mean that my solution is unique, others may recommend other options depending on everyone who thinks it is OK for him.
That shows that vmlinuz is symlinked to the huge kernel. So my Question was why it's dangerous to symlink it to the generic kernel and leave everything else untouched.
Quote:
My example is for a simple GRUB menu with 2 options, but it can also be adapted if you want more kernel versions.
I think that is a good idea and followed your advice. Everything worked well, thanks!
Quote:
I know what I'm talking about because before I do something I document myself, then test on the test server or in a virtual machine and finally I apply on the production server.
I try to do the same, after not finding the documentation that I was looking for I asked this question in this forum. Thanks a lot for your patience and your Help!
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 462
Rep:
Quote:
Originally Posted by M0M0
So my Question was why it's dangerous to symlink it to the generic kernel and leave everything else untouched.
I'm not sure whether it's dangerous, exactly, but it's probably inconvenient.
The issue is that the vmlinuz and vmlinuz-generic symlinks are overwritten whenever a new kernel is installed. vmlinuz points to the huge kernel by default. So an entry booting off of vmlinuz -> vmlinuz-generic-5.10.17 with initrd.gz would be changed to vmlinuz -> vmlinuz-huge-5.10.18 with initrd.gz when 5.10.18 is installed. It would be necessary to set the symlink again. The next boot may or may not fail if this isn't done (never tested myself).
Using the vmlinuz-generic symlink for the "latest generic kernel" entry instead means that the only thing to do is make a new initrd.gz image.
To preserve the currently-installed generic kernel and initrd in a consistent place for GRUB to find, it's possible to copy vmlinuz-generic and initrd.gz before installing; I send mine to vmlinuz-old and initrd-old.gz, for example.
To preserve the currently-installed generic kernel and initrd in a consistent place for GRUB to find, it's possible to copy vmlinuz-generic and initrd.gz before installing; I send mine to vmlinuz-old and initrd-old.gz, for example.
That's a smart idea. Is Grub smart enough to figure out that initrd.gz belongs to vmlinuz-generic and that initrd-old.gz belongs to vmlinuz-old? Or do I need to specify which initrd belongs to which kernel?
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 462
Rep:
Personally, I'd edit it by hand. grub-mkconfig has given me trouble with pointing at incorrect partitions before, but YMMV. Of course, if GRUB points to nothing but symlinks, there's no need to touch the file or run grub-mkconfig at all once all the entries are correct.
Yes, but be careful when updating the GRUB version, then it may still need to be run.
And now if you say that everything is OK, you should take the time to better understand what you did, a kind of fixation of knowledge, maybe a little howto.
PS
If you are satisfied you can mark the thread as solved and even answer the question:
Quote:
Did you find this post helpful?
what appears after each post.
Another PS
GRUB can be password protected so that existing boot configurations cannot be edited (press the "e" key in the GRUB menu).
If you think it's worth it, can you try to find the solution yourself?
Cheers!
Thanks, I'm aware of the "solved" function but before your last answer it was not solved for me. But I will do that now. Yes I'm trying to understand how GRUB and other bootloaders work at the moment, I will definitely get a better understanding with the time!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.