LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-06-2004, 06:19 AM   #1
farmerdan
Member
 
Registered: Feb 2004
Location: IA-MO State Line
Distribution: Ubuntu 10.04
Posts: 59

Rep: Reputation: 15
Failed Attempt to Compile 2.6.5 as Non-root User


After reading various README's and HOWTO's, I'm attempting to compile kernel 2.6.5 from my home directory, without logging on as "root." In one place the 2.6.XX README says:
Quote:
- If you install the full sources, put the kernel tarball in a
directory where you have permissions (eg. your home directory) and
unpack it:

gzip -cd linux-2.6.XX.tar.gz | tar xvf -

Replace "XX" with the version number of the latest kernel.

Do NOT use the /usr/src/linux area! This area has a (usually
incomplete) set of kernel headers that are used by the library header
files. They should match the library, and not get messed up by
whatever the kernel-du-jour happens to be.
So, I did that and then
Code:
make mrproper
make xconfig
This is a small sample of the configuration window
Quote:
OOOOOO OOOO OOOOOO OOOO OOOOO OOOO OOOOOOOOOOOO OOOOOOOO
oooooooooo
oooooo oooo oooooo oo ooo ooooo oooo ooooo oooooooo ooo ooooooo oooo oooo oo
If I
Code:
make menuconfig
all is well.

Now when I unpack the tarball in /usr/src/ and run the same commands, everything is fine with make xconfig.

Another part of the README says:
Quote:
When compiling the kernel all output files will per default be
stored together with the kernel source code.
Using the option "make O=output/dir" allow you to specify an alternate
place for the output files (including .config).
Example:
kernel source code: /usr/src/linux-2.6.N
build directory: /home/name/build/kernel

To configure and build the kernel use:
cd /usr/src/linux-2.6.N
make O=/home/name/build/kernel menuconfig
make O=/home/name/build/kernel
sudo make O=/home/name/build/kernel modules_install install

Please note: If the 'O=output/dir' option is used then it must be
used for all invocations of make.
The use of the reference to /usr/src/ confuses me based on the first quote from the README. To the point of this quote--I haven't tried it yet--if I use the make 0= option, the way I read this, is that the kernel will be installed in my home directory. I don't want that.

Here is what I'm asking:[list=1][*]What's causing the gibberish when I <make xconfig> from my home directory?[*]Will using the <make 0=> option install both the kernel--bzImage, vmliuz--and the modules in the directories where they usually go--/boot/ and /lib/modules?[/list=1]
It would be easier just to "cave in" and build from /usr/src/ as root, but I don't want to concede defeat.

Thanks.
 
Old 04-06-2004, 05:20 PM   #2
pdug
LQ Newbie
 
Registered: Feb 2004
Posts: 20

Rep: Reputation: 0
Re: Failed Attempt to Compile 2.6.5 as Non-root User

Quote:
Do NOT use the /usr/src/linux area! This area has a (usually
incomplete) set of kernel headers that are used by the library header
files.
This means: If there is a /usr/src/linux already (that comes with your running/stable distribution),
do NOT remove or touch it before the new kernel is ready and fine.

xconfig might(?) relay on informations only visible to root

Just use /usr/src/linux-2.X.Y, and compile as root using make without special options - no worries,
it's easy

There's one thing missing in the README: After "make modules_install" copy System.map to the
place where your regular bootable kernel is found, and rename it to System.map-2.X.Y
(e.g. cp System.map /boot/System.map-2.6.5)
 
Old 04-06-2004, 05:40 PM   #3
pdug
LQ Newbie
 
Registered: Feb 2004
Posts: 20

Rep: Reputation: 0
Re: Failed Attempt to Compile 2.6.5 as Non-root User

Tried to see the
OOOOOO OOOO OOOOOO OOOO OOOOO ....
in original, but a window came up hiding them
 
Old 04-06-2004, 06:49 PM   #4
farmerdan
Member
 
Registered: Feb 2004
Location: IA-MO State Line
Distribution: Ubuntu 10.04
Posts: 59

Original Poster
Rep: Reputation: 15
Thanks pdug.

Sometimes trying to pull all the documentation together and meld it with the different ways more experienced users do things gets confusing. I've read so much "Don't do that as root!" that I'm getting gun shy of it. I've only broken my set up twice as root since I started using linux in February.

Speaking of breaking my set up I learned:
Quote:
There's one thing missing in the README: After "make modules_install" copy System.map to the
place where your regular bootable kernel is found, and rename it to System.map-2.X.Y
(e.g. cp System.map /boot/System.map-2.6.5)
just before I broke it the last time.

Thanks again.

While I'm at this, I found a very good discussion and general directions for compiling and installing a kernel on pp 301-320 (actually Chapter 15) of Linux Power Tools by Roderick W. Smith. I got it at Borders. Additionally
Code:
make help
gives a file that's really good about make targets and what to do. I learned from that file that I could make an rpm if I wanted to.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed attempt at 2.6.10 icpsvt Slackware 6 02-08-2005 08:25 PM
every attempt has failed ed_norton Linux - Newbie 3 04-03-2004 04:59 PM
Authentication failed Starting X for any User but root aimstr8 Linux - Software 4 02-27-2004 12:54 PM
Switch to Slackware 9.0 attempt 1: FAILED Ekim Gram Slackware 8 06-02-2003 02:15 PM
root and user password failed sarah_777 Linux - General 1 04-29-2002 10:46 PM


All times are GMT -5. The time now is 11:02 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration