You are not logged in.

#1 2008-06-20 02:38:08

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Gentoo kernel compilation using /usr/src

I installed Gentoo in a VM and had to compile a kernel to install guest additions.

The method the gentoo handbook used involved running

genkernel all

as root, to compile the kernel with the sources in /usr/src.

Isn't this considered bad practice to compile a kernel as root? I heard their used to be a kernel bug that would mess up the system if the kernel was compiled as root.

If this is bad practice, why does Gentoo use it?


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#2 2008-06-20 05:33:10

sniffles
Member
Registered: 2008-01-23
Posts: 275

Re: Gentoo kernel compilation using /usr/src

genkernel does more than just build the kernel. In any case, I thought Arch Linux users took pride in their tweaking, why aren't you going for a custom kernel? (the genkernel isn't the "default" method indicated by the Gentoo installation manual)

Also: bad practise or not, doing it once, when installing, doesn't mean anything.

Last edited by sniffles (2008-06-20 05:36:06)

Offline

#3 2008-06-20 10:16:48

Obi-Lan
Member
From: Finland
Registered: 2007-05-23
Posts: 179

Re: Gentoo kernel compilation using /usr/src

You can do make menuconfig and make with user privileges but you need to do make modules_install as root (and copy those files to /boot). I used to compile kernel allways with root but with Arch I haven't bothered anymore smile

Offline

#4 2008-06-20 10:53:02

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: Gentoo kernel compilation using /usr/src

I've heard the best way is to configure and compile as user, and install as root. I do want to use a custom kernel for arch,eventually, but this Gentoo install is only a VM. I had to upgrade the kernel because I needed the header files, and couldn't find them for the older kernel. If genkernel isn't the default method, what is?


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#5 2008-06-20 12:40:32

sniffles
Member
Registered: 2008-01-23
Posts: 275

Re: Gentoo kernel compilation using /usr/src

Offline

#6 2008-06-20 14:03:13

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: Gentoo kernel compilation using /usr/src

That method still involves compiling as root, which I heard was bad practice.


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#7 2008-06-20 14:14:24

sniffles
Member
Registered: 2008-01-23
Posts: 275

Re: Gentoo kernel compilation using /usr/src

Jeesus christ. So what would you have them do? "Now, create a regular user, you need to do this because compiling the kernel as a regular user is bad practice. Only THEN should you go on with the kernel configuration section of this manual." .. like I've said .. they tell you to do it Once, when you install so even if it -is- bad practice, it's bad practice applied Once (when you install). K?

Last edited by sniffles (2008-06-20 14:15:32)

Offline

#8 2008-06-20 14:32:05

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Gentoo kernel compilation using /usr/src

and upgrade the kernel...  But I agree, it's not that bad.  If that's bad, then what I do should be considered a crime!  If I install something from source, I always su into root right away.  So let's say I download banshee-1.0.0.tar.bz2, which I have it automatically download into ~/Downloads.  This is what I do:

$ su
Password:
# cd /usr/local
# mv /home/Berticus/Downloads/banshee* .
# bzip2 -cd banshee*|tar xvf -
# rm banshee*.bz2
# cd banshee*
# ./configure
# make && make install
# exit

What would I be called?  A root abuser?

Offline

#9 2008-06-20 17:26:27

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 960
Website

Re: Gentoo kernel compilation using /usr/src

No, a root kid.


I need real, proper pen and paper for this.

Offline

#10 2008-06-20 22:32:25

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: Gentoo kernel compilation using /usr/src

sniffles wrote:

Jeesus christ. So what would you have them do? "Now, create a regular user, you need to do this because compiling the kernel as a regular user is bad practice. Only THEN should you go on with the kernel configuration section of this manual." .. like I've said .. they tell you to do it Once, when you install so even if it -is- bad practice, it's bad practice applied Once (when you install). K?

I didn't think it was a huge deal. I was just curious, because I heard compiling a kernel(or anything) as root was not advisable. I just wanted to see what people here thought.


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

#11 2008-06-20 22:40:38

sniffles
Member
Registered: 2008-01-23
Posts: 275

Re: Gentoo kernel compilation using /usr/src

My appologies. I misjudged this thread.

BTW: Nice band.

Offline

#12 2008-06-20 23:16:38

Raccoon1400
Member
From: Ontario, Canada
Registered: 2008-04-14
Posts: 853

Re: Gentoo kernel compilation using /usr/src

sniffles wrote:

My appologies. I misjudged this thread.

BTW: Nice band.

thanks. We have fun playing together.

It is hard to express tone in text. That is probably why you misjudged it.


Fustrated Windows users have two options.
1. Resort to the throwing of computers out of windows.
2. Resort to the throwing of windows out of computers.

Offline

Board footer

Powered by FluxBB