LinuxQuestions.org
Help answer threads with 0 replies.
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 01-27-2004, 11:42 PM   #1
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Blog Entries: 1

Rep: Reputation: 30
Could someone show me EXACLTY how to compile a new kerne!?!?!?!?!


Ok, i've started a thread like a couple days ago, but it didn't lead me anywhere so heres another one. How the HELL do u install the linux2.6 kernel!!! that burst of anger is for a good reason too. cause i've been looking al over the internet on how to install a new kernel and NO ONE so far has givin me a good answer without knowing that i don't know what everything means in the linux world. The closet i got to installing a new kernel was using Techtv's HOW TO and it acutlly got me somewhere but i know for a fact that it has a few holes in it.('cause they want me to watch the show... and i didn't) After i tried to install the new kernel with that how-to I still couldn't get any sound (i thought the update would support my onboard sound)and my graphics card (Rad. 9600) only got like 86fps(?). Sry for being rude but im going insane trying to find a way to install the new kernel properly. So could someone give me a how-to install a kernel NEWB STYLE. and tell me every single part of installing it, and if u know somewhere that is good for a first try-er, then send me a link plz. thanx in advance!
 
Old 01-28-2004, 12:09 AM   #2
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
oops didnt see the link above
 
Old 01-28-2004, 12:10 AM   #3
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
nvmd it still doesnt make any sens to me...
 
Old 01-28-2004, 12:31 AM   #4
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
lol, ok iv never compiled a 2.6.* but i have compiled 2.4.20 pleanty of times (im doing so again on my laptop cuse i dident get everyhting jsut right i guess lol), so here are teh comands to do it from a just unpacked tarball (if you dont know how to unpack it then its tar fzxv linux-2.6.whatever* --remember to have that star at the end cuse itll amke things easyer as it guesses that last aprt for you, just be sure you dont have an idenctile package in the same dirctoy with that start) now assuming that /usr/linux is a symlink to your new linux source tree

cd /usr/linux
make {mrproper,menuconfig}
now itll bring up a lot up stuff to comfigure, lucky for you theres a help for each option, i sugest at every option you get you read teh help just in case (on a 2.4.20 this takes about 2-3 hours) start from teh top down, and when your done scroll down to the save file option, enter in a naem that is easy for you to remember (this way if you need to recomile you can use the load alt config file and save a hour or so), next go to exit, whenit asks you if you want to save then say yes (this is not the same as the save file you did above, this tiem itll save it so it becomes the config file the kernel needs to comile), now i dono if they fixed this is 2.6 but in the 2.4 serires you had to have at least gcc 2.5 but not a gcc 2.3,
now run enter in
make {dep,bzImage,modules,modules_install}

remember that the comands are case sensative so e carful, if it errors out then make sure ur using the required gcc (see the doc / readme files to check what the recomened verosn is)

cp {System.map,arch/i386/boot/bzImage} /boot

if you have lilo as your bootlaoder run
lilo
now you can reboot and hope you set everyhitng up right (probly best to copy your existing kernel to a difrent directoy and get a boot disk like lnx-bbc so if theres a problem you can use the boot disk to boot up and copy you regualr kernel back to /boot and try all over again

Last edited by SciYro; 01-28-2004 at 12:40 AM.
 
Old 01-28-2004, 01:25 AM   #5
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Shit, this sounds stupid but i dont have a floppy. k. so can i just use my RedHatLinuxCD's instead?
 
Old 01-28-2004, 03:00 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you don't need any other discs or cd's to compile a new kernel. as long as you don't delete or overwrite any of your current configuration you will be perfectly safe, even if your new kernel is defective.
 
Old 01-28-2004, 03:25 AM   #7
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
First:

cd /usr/src/linux

Make sure that link is pointing to your 2.6 kernel and not the old 2.4. Then

make menuconfig

Go through each screen and select the parts you need either as modules or compiled in.

Then type

make all

then type

make modules_install

Then copy new kernel, make sure /boot is mounted read/write

cp /usr/src/linuc/arch/i386/boot/bzImage /boot/bzImage-2.6.test1

To see what that link points to type in

cd /usr/src

then

ls -l

Should look something like this.

lrwxrwxrwx 1 root root 18 Dec 15 18:59 linux -> linux-2.6.0-test11

If that link is pointing to the old one, type in

rm /usr/src/linux

then type in

ln -s /usr/src/linux.2.6<your exact version here> /usr/src/linux

That should have you set. Post if you need help. I been there, a few times in fact with Gentoo

Later



Edit: Minor typo. Wouldn't have worked though as typed.
Edit 2: I'll get the darn thing right in a minute. Get off my back already.

Last edited by dalek; 01-28-2004 at 03:34 AM.
 
Old 01-28-2004, 09:07 AM   #8
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
/usr/src/linuc/arch/i386/boot/bzImage /boot/bzImage-2.6.test1 is not found.
 
Old 01-28-2004, 12:14 PM   #9
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
cp command works like this.

cp path/to/file/you/want/to/copy <space> /path/to/where/you/want/to/copy/to/<newfile name>

it should be like this with <space in middle>

Code:
cp /usr/src/linuc/arch/i386/boot/bzImage <space> /boot/bzImage-2.6.test1
If you use Konqueror and a GUI, you can just drag and drop. Drag the file to you desktop then select copy. Rightclick on top of the file and select rename then rename the file. Then drag the file to /boot and select move here. OR drag it to /boot and when it says it already exists, type in a new name.

You can do that either way. Just make sure you save a bootable copy of 2.4 in case something is not right with 2.6.

That helps??

 
Old 01-28-2004, 05:19 PM   #10
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
cannot stat `/arch/i386/boot/bzImage', here it is IM A NUB so when you say some thing like this cp {System.map,arch/i386/boot/bzImage} /boot, xplain to me what u are trying to say. My left hand is getting tired of typing, and my right hand is on my windows 98 cd, im so getting ready to go back this is just to stupid to configure shit that the next person just starting linux doesn't understand! this is why every computer guy that i talk to says that linux is never going to take off. so tell me exactly what you are trying to say and if u think that what you are saying was difficult to understand when u learned it, THEN XPLAIN IT TO ME!
 
Old 01-28-2004, 07:18 PM   #11
witeshark
Member
 
Registered: Jan 2004
Location: Miami FL
Distribution: Mac OS X 10.4.11 Ubuntu 12.04 LTS
Posts: 429

Rep: Reputation: 30
2. Go to The Linux Kernel Archives.

3. Download the Linux 2.6 kernel and save it to your /usr/src directory.

4. As root, run the following commands in the console. (Note: This assumes you've installed your Linux distribution with all the developer options. If you haven't, take a look at your distribution's website for more information on 2.6 kernel packages you can download.)

tar -xzvf linux-2.6.0.tar.gz
cd linux-2.6.0
make menuconfig
Make note of what device the /dev/cdrom links to, in this case it is /dev/hdc, which is common (hdc is the master device on the secondary IDE channel). Now let's look at the permissions for this device. I will use hdc in my examples but you should use whatever you found out in the prior step (what /dev/cdrom links to): ls -l /dev/hdc
brw------- 1 root disk 11, 0 Jan 1 1970 /dev/hdc

The output would look something like the above. It belongs to the user root and the group disk. We want to change the permissions so it is still owned by root but with the cdrom group and all users in the cdrom group should have all permissions for the device:
chown root.cdrom /dev/hdc - this changes the ownership to the root user and cdrom group
chmod g+rwx /dev/hdc - this gives the cdrom group members read, write and execute permissions on the device

Log out, log in again and try to play something
which pppd
/usr/bin/pppd
which chat
/usr/bin/chat
which minicom
/usr/bin/minicom
 
Old 01-28-2004, 07:28 PM   #12
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
Quote:
Originally posted by witeshark
2. Go to The Linux Kernel Archives.
3. Download the Linux 2.6 kernel and save it to your /usr/src directory.
4. As root, run the following commands in the console. (Note: This assumes you've installed your Linux distribution with all the developer options. If you haven't, take a look at your distribution's website for more information on 2.6 kernel packages you can download.)

tar -xzvf linux-2.6.0.tar.gz
cd linux-2.6.0
make menuconfig
5. after choosing your options, exit menuconfig. it will ask you if you want to save your new configuration. say "yes." (configuration is saved as /usr/src/linux-2.6.1/.config, so you can move it somewhere else later if you want to keep it).

6. type: make clean && make bzImage && make modules && make modules_install

wait while the kernel compiles

7. copy your new kernel image to the /boot directory:

cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.1

8. edit /etc/lilo.conf with your text editor of choice to add the new kernel.

9. run lilo as root:

# lilo

10. reboot and see if it works. if not, select new options in the menucofig to fix your problem/s, and redo the remaining steps.

p.s. that radeon is going to be a b!tch to get working -- don't blame it on the kernel or linux, it's ATIs fault for having weird drivers. i'm just warning you in advance, because unless you get really lucky, it's not going to work at high fps until you install the drivers. check LQ for a couple of threads that will help you though it. gl.

Last edited by synaptical; 01-28-2004 at 07:36 PM.
 
Old 01-28-2004, 09:38 PM   #13
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
synaptical, I only do the following, make all and make modules_install and that is all. I never do make clean. It will then compile the next kernel in a matter of minutes. My kernels work, does he really need to do all those commands?

Later

 
Old 01-28-2004, 09:45 PM   #14
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
i always make clean with a new version of the kernel, just to clear out anything that might be left over from the old one. i'm not even totally sure what the "clean" part does, but i like the idea of cleaning things out anyway. from 2.6.0 you don't need make dep anymore, but i thought you still needed the other ones, make, make bzImage, make modules, and make modules_install. that method worked for me, at least, so that's what i recommended.
 
Old 01-28-2004, 09:56 PM   #15
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
GOOD point. Run make clean the first time to clear out old crap but I only run this after that:

make all

make modules_install

That does the whole bit for me. I read what clean does, but if I explain it, I may confuse myself.

Later

 
  


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
where to download sarge kerne source zyuadl Debian 2 07-20-2005 07:09 AM
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 04:22 PM
Linux Kerne; dmoyer33 Linux - Software 1 07-30-2003 08:24 PM
show the ip eduac Linux - Networking 1 07-21-2003 08:28 AM
Adding One More Kerne Image emmanuelmathew Linux - General 6 02-06-2003 02:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:52 PM.

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