LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Could someone show me EXACLTY how to compile a new kerne!?!?!?!?! (https://www.linuxquestions.org/questions/linux-general-1/could-someone-show-me-exaclty-how-to-compile-a-new-kerne-139470/)

RHLinuxGUY 01-27-2004 11:42 PM

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!

RHLinuxGUY 01-28-2004 12:09 AM

oops didnt see the link above

RHLinuxGUY 01-28-2004 12:10 AM

nvmd it still doesnt make any sens to me...

SciYro 01-28-2004 12:31 AM

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

RHLinuxGUY 01-28-2004 01:25 AM

Shit, this sounds stupid but i dont have a floppy. k. so can i just use my RedHatLinuxCD's instead?

acid_kewpie 01-28-2004 03:00 AM

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.

dalek 01-28-2004 03:25 AM

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

:D :D :D :study:

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

RHLinuxGUY 01-28-2004 09:07 AM

/usr/src/linuc/arch/i386/boot/bzImage /boot/bzImage-2.6.test1 is not found.

dalek 01-28-2004 12:14 PM

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??

:scratch: :D :D :D

RHLinuxGUY 01-28-2004 05:19 PM

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!

witeshark 01-28-2004 07:18 PM

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

synaptical 01-28-2004 07:28 PM

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. :)

dalek 01-28-2004 09:38 PM

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

:scratch: :scratch: :D :D

synaptical 01-28-2004 09:45 PM

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. :D 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. :)

dalek 01-28-2004 09:56 PM

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. :scratch:

Later

:D :D :D :D

synaptical 01-28-2004 10:02 PM

Quote:

Originally posted by dalek
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. :scratch:

:p

make all makes the bzImage? i may try that next time, much easier. i think i'm going to get arthritis since switching to linux with all the typing. :p my WPM has increased by a ton, however. :D

dalek 01-28-2004 10:16 PM

Quote:

Originally posted by synaptical
my WPM has increased by a ton, however.
Wish mine would. :cry: :cry: :cry: :cry: :cry:

:D :D

synaptical 01-28-2004 10:25 PM

Quote:

Originally posted by dalek
Wish mine would. :cry: :cry: :cry: :cry: :cry:

:D :D

heh heh, i just noticed your sig. :p

RHLinuxGUY 01-30-2004 01:00 PM

Should i just stick with my onboard graphics? (intel Extreme Graphics or 856G)

synaptical 01-30-2004 01:15 PM

Quote:

Originally posted by RHLinuxGUY
Should i just stick with my onboard graphics? (intel Extreme Graphics or 856G)
you can use the radeon, you just won't have the 3D acceleration until you install the ati drivers. so your fps will be much lower than it would be otherwise -- probably something like 200 or 300 compared to easily ten times that amount or more (you can check your fps with the glxgears command).

if you don't need 3D acceleration, it's not really a huge deal. i used my radeon with the vesa drivers for all my desktop/multimedia uses for months before getting the ati drivers working. the 2D performance is a little better with the ATIs, but not enough to really be majorly noticeable. don't get me wrong, it is better, but if you aren't the type of person who is "bugged" knowing their hardware isn't functioning at 100% (or higher :D) i wouldn't worry too much about it.

if you absolutely have to have 3D, or need to for gaming, etc. check out this thread:
http://www.linuxquestions.org/questi...drivers+radeon

it's massive, but all the answers are there. gl.

vincebs 01-30-2004 01:56 PM

Hi everyone,

I'm not sure what version of module-init-tools to download. There's 0.9.13, 0.9.14, 0.9.15-pre1, 0.9.15-pre2, 3.0, and testsuite versions. Which one?

The last time I compiled module-init-tools, it stopped my old kernel from being able to call modprobe properly. I would get the message "Kernel requires old modprobe". What do I do to avoid this problem? Yes, I did do "make moveold".

And someone please tell me how to avoid "Unresolved Symbols" errors during make modules_install. Arrgh!

witeshark 01-30-2004 01:58 PM

Are you getting Kernel 7.6?

vincebs 01-31-2004 12:18 AM

You mean 2.6? Yes.

After i do make modules, it tells me I may need to install module-init-tools. But the last time I installed module-init-tools, it broke my kernel 2.4's modprobe. I get the error message "Kernel requires old modprobe, but could not find old modprobe". And even after upgrading module-init-tools, several modules still fail to load. Is there something I need to change in modules.conf to get my modules to work in 2.6.1?

Thanks,
Vince

Edit: Another thing. Mandrake seems to be forcing me to install the supermount patch in order to mount my Windows partition. But when I used RedHat, the partition mounted perfectly without it. Any way to not use supermount and still be able to load my partitions?

witeshark 01-31-2004 12:29 PM

Maybe a fresh start will be better. Here is what I'm planning:
2. Go to The Linux Kernel Archives.
Not as root!
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.)
Remember to NOT be logged in as root on-line!
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


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