1 |
Mick wrote: |
2 |
> On Tuesday, 22 October 2019 00:44:00 BST Neil Bothwick wrote: |
3 |
>> On Tue, 22 Oct 2019 00:42:25 +0100, Neil Bothwick wrote: |
4 |
>>> make install will create symlinks for vmlinuz and vmlinuz.old to the |
5 |
>>> latest and previous kernel, doing much of what you need. You need /boot |
6 |
>>> to be on a filesystem that supports symlinks and ISTR that it only |
7 |
>>> updates the symlinks if already present but doesn't create them from |
8 |
>>> scratch. |
9 |
>> I think you need sys-apps/debianutils installed too. |
10 |
> Last time I used this symlink-ing approach to vmlinuz I came across a problem, |
11 |
> which I didn't have time to resolve and went back to my manual approach of |
12 |
> copying kernels into /boot: |
13 |
> |
14 |
> I eagerly compile a new kernel. It is installed/copied into vmlinuz and its |
15 |
> predecessor which worked fine is copied into vmlimuz.old. I try to boot it |
16 |
> and discover I didn't configure it as carefully as I should have done - it |
17 |
> won't boot. I boot into vmlinuz.old and reconfigure the kernel, which is now |
18 |
> installed into vmlinuz and the recently configured and non-booting kernel is |
19 |
> copied into vmlinuz.old. Disaster strikes as the newly reconfigured kernel |
20 |
> won't boot either! I now have two recently configured and non-booting kernels |
21 |
> vmlinuz and vmlinuz.old and no other working kernel to boot with. |
22 |
> |
23 |
> With manual copying/naming of kernels I can overwrite any non-booting kernels |
24 |
> with the latest compiled example, without moving links around. What is the |
25 |
> recommended solution to the above problem? |
26 |
|
27 |
|
28 |
I'm like you, I copy mine manually. This is what my kernel names looks |
29 |
like: |
30 |
|
31 |
|
32 |
root@fireball / # ls -al /boot/kernel-* |
33 |
-rw-r--r-- 1 root root 5387680 Feb 27 2015 /boot/kernel-3.18.7-1 |
34 |
-rw-r--r-- 1 root root 6848464 Feb 16 2018 /boot/kernel-4.14.19-gentoo |
35 |
-rw-r--r-- 1 root root 7061552 Oct 14 2018 /boot/kernel-4.18.12-1 |
36 |
-rw-r--r-- 1 root root 7082032 May 15 05:59 /boot/kernel-4.19.40-1 |
37 |
-rw-r--r-- 1 root root 7110704 Dec 21 2018 /boot/kernel-4.19.8-1 |
38 |
-rw-r--r-- 1 root root 5858496 Jun 17 2016 /boot/kernel-4.5.2-1 |
39 |
-rw-r--r-- 1 root root 6983664 Aug 21 2017 /boot/kernel-4.9.34-1 |
40 |
root@fireball / # |
41 |
|
42 |
|
43 |
If one of those should stop working or I buy something new and need to |
44 |
add support for it, the new kernel will have a -2 on the end instead of |
45 |
-1. I'm not sure on the -gentoo one. Thing is, I can boot the old |
46 |
kernel of that version or even boot a older kernel if needed. It gives |
47 |
me a lot of booting options. Maybe someone can figure out a way to make |
48 |
those scripts name kernels that way?? |
49 |
|
50 |
I plan to clean older ones out eventually and I use uprecords to pick |
51 |
what kernel are the most stable and pick the latest versions, usually |
52 |
two maybe three, just to be sure I can boot something. I'll also add, I |
53 |
name my config files the same as kernels and also those init thingys I |
54 |
hate so much. The grub thingy requires the init thingy to have the same |
55 |
names but the configs just make sense. ;-) |
56 |
|
57 |
If a script could do it that way, I might even use it. I've yet to hear |
58 |
of one that does it tho. |
59 |
|
60 |
Dale |
61 |
|
62 |
:-) :-) |