Gentoo Archives: gentoo-dev

From: "Daniel Campbell (zlg)" <zlg@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Need design help/input for eclean-kernel
Date: Thu, 30 Jun 2016 22:22:54
Message-Id: E63CD761-EA35-43AB-9878-E783BF9353B4@gentoo.org
In Reply to: Re: [gentoo-dev] Need design help/input for eclean-kernel by "Michał Górny"
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA512
3
4 On June 30, 2016 6:19:23 AM PDT, "Michał Górny" <mgorny@g.o> wrote:
5 >On Thu, 30 Jun 2016 05:55:42 -0700
6 >Daniel Campbell <zlg@g.o> wrote:
7 >
8 >> On 06/30/2016 05:38 AM, Michał Górny wrote:
9 >> > Hello, everyone.
10 >> >
11 >> > Back in 2011 I started a project called eclean-kernel. The idea was
12 >> > pretty simple -- to have a tool that would clean the old kernels
13 >for
14 >> > me since their install is not controlled by the package manager.
15 >This
16 >> > little project of mine seems to have gained a lot of popularity.
17 >> >
18 >> > Sadly, over time a lot of people had trouble with it. Aside to
19 >minor
20 >> > Python problems, eclean-kernel proved too simple to handle
21 >multitude of
22 >> > user systems with varying /boot layouts. In fact, even I don't use
23 >it
24 >> > on all of my systems since it doesn't handle them properly.
25 >> >
26 >> > After being buried in another set of bug reports, I'd like to
27 >> > officially ask Gentoo developers and users for help. I think it's
28 >> > impossible to solve most of the bugs reported so far in the current
29 >> > program design. Therefore, I'd like to rewrite it in a more
30 >flexible
31 >> > manner.
32 >> >
33 >> > For this reason, I would like to ask you to provide me with
34 >> > different /boot layouts you may have, had or seen. Basically, the
35 >idea
36 >> > is to collect as many different layouts as necessary, and use that
37 >to
38 >> > design eclean-kernel in a way making it possible to easily
39 >configure it
40 >> > to handle proper variant -- or even possibly make it capable of
41 >> > autoconfiguration.
42 >> >
43 >> > So if you have some time, please reply to this thread with
44 >> > a specific /boot layout that you think needs to be handled, with
45 >> > as much helpful information as possible -- including possible
46 >> > distinctive features and pitfalls.
47 >> >
48 >> > Thanks in advance.
49 >> >
50 >> I'm not sure if this is the info you're looking for, but I'll give it
51 >a
52 >> shot:
53 >>
54 >> I have grub-static installed to /boot/. I like to organize my kernels
55 >> with the filenames as linux-${version}-gentoo-${buildno}. So my first
56 >> build of 4.5.0, for example, would be 'linux-4.5.0-gentoo-1'. It has
57 >all
58 >> the info I need for reference should something go awry.
59 >>
60 >> I have three symlinks: current, last, backup
61 >>
62 >> I wrote scripts that will update those symlinks for me, which makes
63 >the
64 >> process of kernel management pretty painless. Now that I'm thinking
65 >> about it, it could be simple in my case to simply clean any kernel
66 >that
67 >> wasn't linked to.
68 >>
69 >> My /boot/:
70 >>
71 >> grub
72 >> lost+found
73 >> backup -> linux-4.4.1-gentoo-2
74 >> boot
75 >
76 >What's 'boot' here? Is that relevant?
77 >
78 >> current -> linux-4.4.6-gentoo-1
79 >> initrd
80 >
81 >Is that a single initrd for all kernels?
82 >
83 >> last -> linux-4.4.1-gentoo-3
84 >> linux-4.4.1-gentoo-2
85 >> linux-4.4.1-gentoo-3
86 >> linux-4.4.6-gentoo-1
87 >
88 >And most importantly, how are all those files referenced in grub? I
89 >suspect you are using the symlinks in grub.conf but want to confirm.
90
91 'boot' is a symlink to '.'. Not really sure why it's there but if I remove it, things break. Probably a minor misconfiguration.
92
93 Yes, the same initrd is used for all kernels. I use LUKS and LVM, so I need the initrd to boot. I produced the initrd using genkernel and it's worked ever since.
94
95 Yes, grub.conf indeed references the symlinks and never an explicit kernel path.
96
97 Sorry I wasn't clear in my first mail.
98 - --
99 Sent from my Android device with K-9 Mail. Please excuse my brevity.
100 -----BEGIN PGP SIGNATURE-----
101
102 iQJRBAEBCgA7NBxEYW5pZWwgQ2FtcGJlbGwgKEdlbnRvbyBEZXZlbG9wZXIpIDx6
103 bGdAZ2VudG9vLm9yZz4FAld1m50ACgkQASQOlFA54XCEOg//W1uQNSgnGxu7OAUe
104 13gLTgDN3+DMolhB/peyNRW3MxMyYaIr3PiG3DscLF538wevyx6ANp4eOHrEsANg
105 bFoA4BR1rPeB55A5zcQg4rnZnD23EHPkg56MDq6mtnib1ewK09sK6XbhrEMQ+eKr
106 LnAAUgwvkJab2Dd1q/thi3fGaIdJ8OgFAQLWnW4frqyIM7XgY+jLJCtSf7gaVKHx
107 7X/ZF9WyvZaGxQK64b6wuMQ4OdCGaQA6cCz4z3CYnFGh6bvAvKhQ+vaoTCJweCDS
108 ik0VuExsS9ILjMD8L5eQ2wYKmv2Ip/ua2fg+rV+8DzMzqQglYwkyrirjgVAXsnGb
109 /qBlJnuM7FCbTxjJ+eVjBAWvj8Iy8L4UPiFV62Qzvxr8jtPsjs6048x8tRLKaA8R
110 0XcH2zbujymz4Tbj+wwZtzNmdXLinOsFdU9O+0QEvQr7D4jaRNheNLtgExBVe8ho
111 kS3+DmgUL+GgKLUKiXTV6bRnrNHFNFZpQjuy6FMxqR4UZ+95r+YSORRDsJw5dg2M
112 1Esa4tyPjvezeGwdnZceFyok2G/qSQoYKYP766p9JmT2KegwCCiQNReRlVyEADz3
113 rpklcgBivkX7XkPlC94u9vEFbXpY3CG73eWczFFfrKPH9C9lwE3d1NQcNcEqRDiu
114 O1T2ae+TKH2d379E2Rn/sTQOVN4=
115 =4A8G
116 -----END PGP SIGNATURE-----

Replies

Subject Author
Re: [gentoo-dev] Need design help/input for eclean-kernel Gordon Pettey <petteyg359@×××××.com>