Gentoo Archives: gentoo-dev

From: Greg KH <gregkh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Kernel compiles and you
Date: Wed, 04 Jul 2012 23:36:26
Message-Id: 20120704233531.GE30027@kroah.com
In Reply to: [gentoo-dev] Kernel compiles and you by Tobias Klausmann
1 On Wed, Jul 04, 2012 at 07:46:47PM +0200, Tobias Klausmann wrote:
2 > Hi!
3 >
4 > Recently, I have again bumped into the question whether one
5 > should compile the kernel as root. One of the things that puzzles
6 > me is why almost every HowTo, blog post and book recommends
7 > building as non-root -- yet basically no distribution /helps/ the
8 > user with doing that.
9
10 Most distros don't have to do anything, they are not requiring users to
11 build their own kernels :)
12
13 So in reality, they all do help their users with this, it's trivial to
14 build a kernel as a user on those distros. Actually, it is also on
15 Gentoo, there's no need to ever put a kernel anywhere except in your
16 home directory when building it.
17
18 Oh, and one more reason you "never want to build your kernel as root", a
19 few years ago, the kernel build process had a bug where it accidentally
20 tried to do a 'rm -rf /*' on your filesystem. None of the kernel
21 developers ever noticed that as they didn't build a kernel as root, and
22 the bug stuck around for a relativly long time (weeks at least.) There
23 was also some semi-serious talk about leaving it in the build as well,
24 just to "catch" people who were doing this, but sanity prevailed and it
25 was fixed. But, you never know if that old bug might slip back in one
26 day :)
27
28 good luck,
29
30 greg k-h

Replies

Subject Author
Re: [gentoo-dev] Kernel compiles and you Tobias Klausmann <klausman@g.o>