Mick wrote:
> On Tuesday, 22 October 2019 00:44:00 BST Neil Bothwick wrote:
>> On Tue, 22 Oct 2019 00:42:25 +0100, Neil Bothwick wrote:
>>> make install will create symlinks for vmlinuz and vmlinuz.old to the
>>> latest and previous kernel, doing much of what you need. You need /boot
>>> to be on a filesystem that supports symlinks and ISTR that it only
>>> updates the symlinks if already present but doesn't create them from
>>> scratch.
>> I think you need sys-apps/debianutils installed too.
> Last time I used this symlink-ing approach to vmlinuz I came across a 
> problem, 
> which I didn't have time to resolve and went back to my manual approach of 
> copying kernels into /boot:
>
> I eagerly compile a new kernel.  It is installed/copied into vmlinuz and its 
> predecessor which worked fine is copied into vmlimuz.old.  I try to boot it 
> and discover I didn't configure it as carefully as I should have done - it 
> won't boot.  I boot into vmlinuz.old and reconfigure the kernel, which is now 
> installed into vmlinuz and the recently configured and non-booting kernel is 
> copied into vmlinuz.old.  Disaster strikes as the newly reconfigured kernel 
> won't boot either!  I now have two recently configured and non-booting 
> kernels 
> vmlinuz and vmlinuz.old and no other working kernel to boot with.
>
> With manual copying/naming of kernels I can overwrite any non-booting kernels 
> with the latest compiled example, without moving links around.  What is the 
> recommended solution to the above problem? 


I'm like you, I copy mine manually.  This is what my kernel names looks
like:


root@fireball / # ls -al /boot/kernel-*
-rw-r--r-- 1 root root 5387680 Feb 27  2015 /boot/kernel-3.18.7-1
-rw-r--r-- 1 root root 6848464 Feb 16  2018 /boot/kernel-4.14.19-gentoo
-rw-r--r-- 1 root root 7061552 Oct 14  2018 /boot/kernel-4.18.12-1
-rw-r--r-- 1 root root 7082032 May 15 05:59 /boot/kernel-4.19.40-1
-rw-r--r-- 1 root root 7110704 Dec 21  2018 /boot/kernel-4.19.8-1
-rw-r--r-- 1 root root 5858496 Jun 17  2016 /boot/kernel-4.5.2-1
-rw-r--r-- 1 root root 6983664 Aug 21  2017 /boot/kernel-4.9.34-1
root@fireball / #


If one of those should stop working or I buy something new and need to
add support for it, the new kernel will have a -2 on the end instead of
-1.  I'm not sure on the -gentoo one.  Thing is, I can boot the old
kernel of that version or even boot a older kernel if needed.  It gives
me a lot of booting options.  Maybe someone can figure out a way to make
those scripts name kernels that way?? 

I plan to clean older ones out eventually and I use uprecords to pick
what kernel are the most stable and pick the latest versions, usually
two maybe three, just to be sure I can boot something. I'll also add, I
name my config files the same as kernels and also those init thingys I
hate so much.  The grub thingy requires the init thingy to have the same
names but the configs just make sense.  ;-)

If a script could do it that way, I might even use it.  I've yet to hear
of one that does it tho. 

Dale

:-)  :-) 

Reply via email to