LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-30-2006, 06:44 PM   #1
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Rep: Reputation: 47
kernel & module building as root


I run a server out of my basement on my old 200 MHz tower using Slack 10.2. I want to update the kernel from 2.6.13 to 2.6.17.3 (the current 2.6 kernel) and am doing so now as root. This is going to take hours to build the bzImage and then more time to build all the modules. My server is also running.

Should I build the kernel as root? If not, could I build the modules as a user since the kernel is being built by root?
 
Old 06-30-2006, 07:03 PM   #2
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
Actually, you can do both at the same time. Just use the command 'make' instead of 'make bzImage' and 'make modules'. You should do both as user (may have to do as 'su' depending on folder permissions). 'make modules_install' I always do as su
 
Old 06-30-2006, 07:08 PM   #3
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
I moved the kernel tarball to /usr/src, untarred and made a sylink called linux there. I take it a user cannot right to /usr/src, so I need to move the tarball to my user directory untar, make mrproper, make menuconfig, and make as user. Then copy the new kernel directory to /usr/src and do a make modules_install as root. Is this right?
 
Old 06-30-2006, 07:16 PM   #4
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
I would just 'su'

But read this excellent post on making the kernel
 
Old 06-30-2006, 07:28 PM   #5
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
looks like kernel building, module building, and module installation is all done as root there. So building a kernel & modules as root is ok?
 
Old 07-01-2006, 09:36 PM   #6
katayamma
Member
 
Registered: Jan 2006
Posts: 37

Rep: Reputation: 15
Yes. I build the kernel and modules as root.

Remember, you've got multiple virtual consoles. Just hit alt-F2 (or some other console), login, su up and then build/install your kernel. That way you can go about your business as a non root user on a different window.

Cheers.
 
Old 07-01-2006, 09:39 PM   #7
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
I need to Google this and read about the kernel based filtering of kernels > 2.6.15. What's it called?

For now I'll update to kernel 2.4.32 on my server and continue to use iptables.
 
Old 07-01-2006, 09:52 PM   #8
katayamma
Member
 
Registered: Jan 2006
Posts: 37

Rep: Reputation: 15
Kernel based filtering of kernels? Huh? o.0

You talking about the Network Packet Filtering in the 2.6 Kernel?
 
Old 07-02-2006, 07:46 AM   #9
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
posted in the wrong forum...I'm also posting here:

http://www.linuxquestions.org/questi...18#post2316918
 
Old 07-02-2006, 07:56 AM   #10
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
Quote:
Originally Posted by linuxhippy
I moved the kernel tarball to /usr/src, untarred and made a sylink called linux there. I take it a user cannot right to /usr/src, so I need to move the tarball to my user directory untar, make mrproper, make menuconfig, and make as user. Then copy the new kernel directory to /usr/src and do a make modules_install as root. Is this right?
the safest way is to do all that in your home-directory,
so you don't have to be root.
you can create a dir. called "kernels" ( or whatever you like ) there.
then you'll only need to be root to do the install step.

there's no reason to move stuff to /usr/src.
read all about it in the README file that comes in the kernelsources' topdir.
( that was written by Linus himself )

egag
 
Old 07-04-2006, 09:07 AM   #11
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
I thought I read that somewhere-thanks egag! I built the kernel and modules in my user's home directory. I didn't want these to be useable by a user, so I moved the new kernel directory to /usr/src and did make modules_install as root-worked good.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error building nvidia kernel module beeblequix Debian 1 10-07-2005 05:21 PM
Building kernel module from multiple source file in 2.6 kernel yogeshwar_s Programming 1 12-20-2004 09:31 AM
Problems building a simple kernel module for kernel 2.6.7 atticman Linux - Software 2 12-13-2004 03:35 PM
Building a module within a kernel brianvdc Linux - General 1 12-11-2003 08:13 PM
VMware module building kernel error ^^ ZoNicONE Linux - Newbie 3 09-09-2003 01:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration