Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-17-2003, 10:48 AM   #1
Registered: Sep 2003
Location: Chicago
Distribution: Ubuntu
Posts: 36

Rep: Reputation: 15
Talking Hurray, I compiled my first kernel....

I found the "world's best" (or at least probably close) instructions for compiling my own kernel (at

Anyway, compiling was easy (after reading) but when I was trying to configure the kernel, I rand into some problems.
I tried xconfig and I got the following....

labbox2:/usr/src/linux # make xconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts
make[1]: Entering directory `/usr/src/linux/scripts'
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkparse.o tkparse.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkcond.o tkcond.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkgen.o tkgen.c
gcc -o tkparse tkparse.o tkcond.o tkgen.o
cat >> ./
./tkparse < ../arch/i386/ >>
echo "set defaults \"arch/i386/defconfig\"" >>
echo "set ARCH \"i386\"" >>
cat >>
chmod 755
make[1]: Leaving directory `/usr/src/linux/scripts'
wish -f scripts/
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Application initialization failed: this isn't a Tk applicationcouldn't connect to display ":0.0"
Error in startup script: invalid command name "button"
while executing
"button .ref"
(file "scripts/" line 51)
make: *** [xconfig] Error 1
labbox2:/usr/src/linux #

So I tried menuconfig and got this.....

labbox2:/usr/src/linux # make menuconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts/lxdialog all
make[1]: Entering directory `/usr/src/linux/scripts/lxdialog'
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/../../../../i586-suse-linux/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status

>> Unable to find the Ncurses libraries.
>> You must have Ncurses installed in order
>> to use 'make menuconfig'

make[1]: *** [ncurses] Error 1
make[1]: Leaving directory `/usr/src/linux/scripts/lxdialog'
make: *** [menuconfig] Error 2
labbox2:/usr/src/linux #

OK, now I can see I need "Ncurses" (gonna have to install that) for menuconfig to work, but what happened to xconfig?

Anyone have an idea?
Old 10-17-2003, 12:34 PM   #2
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
You're probably trying to run make xconfig as root and root can't write to the user's current X display. You should consider making the kernel as a non-root user and then installing it as root.
Old 10-17-2003, 12:52 PM   #3
LQ Newbie
Registered: Oct 2003
Distribution: Debian Sid
Posts: 23

Rep: Reputation: 15
I had the same probleme... it's really really simple and I spent much time on it...
Just try
apt-get install libncurses-dev
And it will work!
Old 10-17-2003, 02:23 PM   #4
Registered: Sep 2003
Location: Chicago
Distribution: Ubuntu
Posts: 36

Original Poster
Rep: Reputation: 15
You were right mcleodnine when I tried to run xconfig as a regular user it worked perfectly (thanks for noticing the # in my prompt) I was under the impression that configuring/compiling the kernel should be done as root (I guess that comes from my windows background where everything was done as "root")

One last question then I think I'll be done here. After I create my new kernel and put it in place, is there any way to run it without rebooting the box? I've notice there are a lot of people that are proud their boxes have stayed up for 100+ days and I was wondering if you can replace the kernel without rebooting (hence uptime continues).

Wow, lots of options for the kernel, I guess I have more reading to do....
Old 10-17-2003, 02:34 PM   #5
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
nope. you'll still need to reboot to enable the new kernel.
Old 10-17-2003, 03:33 PM   #6
Senior Member
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
I used to leave my computer on 24/7 and the electricity bill was too much.
Now that I shut off my computer when I go to work and sleep, I save $10 on electricity bill! woohoo!


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
new kernel compiled successfully, but the kernel-source package is the same old? luqman Red Hat 2 03-03-2005 08:41 AM
Hurray almost done but page not loading in crclient ! gopikrish Linux - Networking 0 01-02-2005 10:53 AM
YES! Hurray! SoliTear Linux - Newbie 3 01-30-2004 09:51 PM
kernel panic on reboot of newly compiled kernel lyceum Linux - Newbie 4 09-09-2003 09:40 AM
Finally got my Mouse Wheel to Work! Hurray!! Paul Parr Member Success Stories 5 04-10-2003 01:27 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:36 AM.

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