Kernel Compile

From Linuxhelp Wiki

powerpoint dual monitor web hosting companies irs online tax filing motorola v180 accessories rachel18 godzilla monsters greene town center awkward lyric romance payless car rental kendall school and belmont red sovine song lyric radar jammer www.lycos.com the general dispatch changes 2pac att cordless phone interference liberalism sunat mini dow jones office accessory curtain pole brackets mega millions best free email provider symptoms of yeast infection initialisation artist card e music microsoft exchange hints 1934 musical the merry widow cast bhmotorsports writing strategies ocean zones automated delivery software coyote sounds baby sunscreen emprex pablo francisco eversley cross jessica conseco water skis caetano veloso sitemap cleaning leather car seats 3d skull wallpaper discount pet medicines squirt large clit tom tom go gps navigation unit link tequin url artificial human skin faqs mihoshi bathing www sitemap atlanta booty http drunk chicks gallery english tack singin the blues lyrics stopzilla john wesley specialty advertising cheap mp3 players meaning of lily flowers 500 cup daytona nextel noni juice benefits tmobile phones roasted garlic spirit in the sky civil war pictures 14 year old boy average size penis monitoare lcd second hand paulding progress newspaper youngstown crab house sether ansem pawier american female poet population of the states in america free game download shanna united country four season real estate leaders nhl preseason scoring natural hormones for menopause white castle cherry hill new jersey pet bowls 5 pin bowling scoring swine amg cl55 used playstation 2 systems indy 500 winners ruger pistols english japan simple wikipedia fuckmywife.com list of municipalities in south africa condos in livingston county bosch tools blade thompson asnad tehran nigger fight video medical power supplies incomming mail server for yahoo underactive thyroid stephen glass graduate psychology school law books kinds of birth control texas quail hunts link elk hunting outfitter cabbage soup teds montana grill link ceylon tea angie george arizona mortgage leads wwf sunny south carolina homes for sale iconography edison effect royal oak mirror url roman law stress theodore geisel nevada real estate for sale lilly flower eastlawn memorial park raw diet london trains aasld b hepatitis phrase infinity motorcycle accessories hunting blinds wood beds aculaser c8500ps option imported italian foods http domain super taboo extreme john deleeuw webmap dulse painting ideas masterbate myself somebody told me mp3 art institute sf ca ic555 circuits hair replacement transplant tool schism estate mortgage tax value mac sheet time golf putting greens odors import car show ferngully california state parks julia domna raffles city tower museum replicas meta tags optimization margo napoli kurvsgirl web 2004 olympian swimmers pictures of childhood obesity www death be not proud three mile limit satisfying women in bed nashville predators carrying unconscious women magic weight watcher point finder slide separation processes inc laird hamilton pulse of the maggots auction service manual electromechanical linear actuator domain travel to danmark pizza sign christmas music vga splitter pit bull stand record keeping programs steam table saarc summit in dhaka sophie moon canadian government company sweatshirt bruce patterson clips mlm success domain lionel richie hiking peritoneal mesothelioma sruvival rates tara reed christian ranch mail recovery spelling practice games vaginal washing house and garden mike huckabee kitchens inc. homepage noble street charter school chicago waiver of service usa motorcycle helmets list open ports solaris lesbian love scenes latin to english automated driver logs carpal tunnel symptoms small refrigerator lupita softball team names button maker atv starter nissan titan exhaust pineapple glazed baked ham kohler toilets microsoft downloads for powerpoint alfa see ya oriental naked women rainbow imitating jigs bloomingdale homes radios enro man shirt st francis medical center trenton latine naked truss joist macmillian anime character quizzes jordan gambling problem prey verve pipe bittersweet symphony waray waray vamanos translation cmc rescue masten space system implant capillaires aluminum oxide powder sandblasting polishing crane rentals type reunion download tunnel view yosemite used range rover parts leonard whiting electra bikes credit card debt relief scuba diving courses uk running programs theme from robinhood hot pictures messy palaces ultimate spiderman organza gift bags home pest control photoshop cs brush affordable engineering services european vacation packages golf cartoon domain helping index http insurance report world 1997 saturn sc2 review gay arab men arsic operation 555 soul plus size climate control storage alien invasion tv products texas de brazil bonsal the matrix revolutions utility locating site ice skating hagerstown maryland scott patterson spss license more boys brief underwear snowboard protective gear that smells like pure big girl diapers natural wood dressers selegiline the mississippians what is domestic tranquility slapshot techniques educational background images queen elizabeth 2nd pictures human resource management page wild west show black girls fat asses spitting caves checkbook wallet walthers teen guy apple the fruit headset adapter vue cinema jorge linares cindy (at)aol.com info andromeda people in canada ken blanchard webmap rucksack assembly solar power controllers racine real estate cable television racconto italian import designing business card waterbug larvae photo first date riello 40 fishing chair family camp incline village nv vacation rentals chicago musical suction cups stick shannon tweed addictinggames atlatl nancy mckeon held domain diabetes insipidus chorus eastern motors rheumatoid arthritis symptoms whalen furniture newmans south pacific tours 64 booty talk shyla stylez free movies over the shoulder boulder holder 2 propanol boiling point alphabet in graffiti form job descriptions accounting free valu inn newport oregon alaska purchase mortgage loans american grocery chains amigos.com jim davis cognition yahwehs new moons rave flyer art wrong turn church jokes teens for cash daily space elevator katie world woody allen samsung sph a400 accessory mls and santa cruz john waters dirty shame dvd release rli english academy penn fishing reel parts led zeppelins greatest songs miss april pro euthanasia customer support systems stenosis texas banker barbie doll allianz bajaj health insurance discount refurbished laptop la ley surround speaker black tail magazine intel pc camera mark rothko green sending flowers american hi-fi ryoko embassy suite phoenix airport add com port to windows xp intermodal car black and white wedding photography pound cake medicare part b news novaform elite memory foam mattress topper yellowjackets ashland specialty nurit 2085 mine obsidian nursing education shirehampton park golf club fake leeann tweeden matsushita toyota prius hybrid up in here adp gsi 47 the holy cow canoe company scallop recipe links japanese manga cartoon play oasis wonderwall pearl jewelry working college students statistics 9th formal grade youth summer camp south florida luxury residences pnc bank routing number windjammer cruise line wholesale dealers me n eds pizza san diego international humanitarian organization treating depression carnivorous plants music terms trademark logo event catering atlanta wallaroo peptide homepage real estate stockton anniversary poetry best cell phone plans razor motor scooters law schools http death from above wireless credit card processing medical software industry association 2006 drill extrication photo free home business a husbands love easy make toga definition of diversity top 2006 california rv show mr rogers military record 50-cent scanner antennas photos of sloths solar water fountains diamond setting just reels vampires exist barefootmaniacs city of the dead folic acid land rover discovery headlight switch
Author:Joey
Created On:Unknown
Updated On:June 10th, 2001

Before you begin the upgrade please make sure you create an emergency boot floopy by typing mkbootdisk --device /dev/fd0 2.2.18 (You might have to change the 2.2.18 part if you're currently running a different kernel). It is extremely important that you make this backup disk. If the kernel upgrade goes wrong, you can end up being locked out of your system. Please note that if you have any trouble with the mkbootdisk command, either type man mkbootdisk or come and see us in #LinuxGroup.

If you're running Debian GNU/Linux then the command is mkboot /boot/vmlinuz-2.2.18 and as also stated above, you will have to change the 2.2.16 part to reflect the current kernel you are using.

If at any part you run into a problem with your kernel, please check the troubleshooting section at the end of this guide for hints.

So now that it's all clear we can begin. Once you log in as root, you should download the latest source (linux-2.4.7.tar.gz) at ftp://ftp.kernel.org/pub/linux/kernel/v2.4. That will probably take awhile, it is a 14 meg file. Once it is done downloading, place the file into /tmp and then untar it by doing:

tar -zxvf linux-2.4.7.tar.gz

Once it untar's then you should move it to /usr/src by typing:

mv /tmp/linux /usr/src/linux-2.4.7

Now that that's done, go into /usr/src and remove the linux symlink by typing:

rm linux

Now recreate the link pointing it to the latest kernel.

ln -s /usr/src/linux-2.4.7 linux

If you have previously compiled a kernel and you are now upgrading it, then, you can save yourself some time by copying the .config file from the old kernel directory to the new kernel directory. If you haven't and you have no idea what I'm talking about, don't worry about it and just continue on with the guide.

Now go into /usr/src/linux-2.4.7 and type:

make menuconfig

if you are in console or type:

make xconfig

if you are in X.

In a couple of seconds there will be a menu with a bunch of options for you to choose from. I can't really tell you what to select and what not to select in these menus due to the fact that every system has different hardware needs etc. I suggest you go through each of the listing and read the help for each of the options and decide if you wish to have that feature in the kernel. I will however include my /usr/src/linux-2.4.7/.config file for you to look at.

If you really aren't sure if you need something in the kernel, and you have already made a rescue boot disk like I said to do in the beginning of this guide, then you can probably just include it into the kernel. Besides having a bigger kernel, it probably won't harm your system. But you shouldn't be messing with something if you have no idea what it is. So I leave it up to you to decide.

Once that is all done and you choose "Exit" and save your config file, you must run the following:

make dep

make clean

Now the real fun begins, type make bzImage to build your kernel. This will take awhile (15mins ) depending on your system, so go browse our site a little and send us some feedback ;).

Instead of make bzImage, you can run make zdisk which will write your kernel to a floppy disk instead. This is a good way to test your new kernel without having to really endanger your system.

Now that it's done, you have to run the following commands:

make modules

make modules_install

This will build all the modules (M) that you selected in the kernel configuration menu. Now it's time to set up LILO. First you have to move the newly created Kernel to your /boot directory. Do this by typing:

cp /usr/src/linux-2.4.7/arch/i386/boot/bzImage /boot/vmlinuz-2.4.7

The next step would be to move the System.map file to your /boot directory. Do that by typing:

cp /usr/src/linux-2.4.7/System.map /boot/System.map-2.4.7

Next up, you'll have to edit your /etc/lilo.conf file. Do this by typing:

pico /etc/lilo.conf

You should see something like this:

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
image=/boot/vmlinuz-2.2.18
       label=linux
       root=/dev/hda5
       read-only
other=/dev/hda1
       label=windows
       table=/dev/hda

You should change it to look like this:

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
image=/boot/vmlinuz-2.4.7
       label=linux
       root=/dev/hda5
       read-only
image=/boot/vmlinuz-2.2.18
       label=linux.old
       root=/dev/hda5
       read-only
other=/dev/hda1
       label=windows
       table=/dev/hda

Note that if your root=/dev/hda# is different then mine, that's perfectly fine. The number 5 on mine means that the partition where the Kernel is located is the 5th partition. Yours could be hda6 etc. Once that is done, exit pico by hitting control x and it will ask you if you want to save it, say yes and it will return you to the prompt.

Also, please note that you might not have the windows portion in your /etc/lilo.conf file if you do not have windows installed on that machine.

You must rerun LILO now by typing /sbin/lilo and if everything goes okay, you will see something like this:

[lyte@linuxhelp.net boot/]# /sbin/lilo
Added linux *
Added linux.old
Added windows
[lyte@linuxhelp.net boot/]#

Do you know what that means? It means that everything so far is going ok. Now the ultimate test, reboot your computer and see if it works. If all goes well you should see your computer boot up as usual and you will see something like:

Red Hat Linux Release 7.1 [LinuxHelp.net]
Kernel 2.4.7 tty1

linuxhelp.net login:

Congratulations, you have just installed your new Kernel.

One last thing, if you get those net-pf-5 errors when you boot your system, you can get rid of them by adding the following lines to your /etc/conf.modules file (/etc/modules.conf in Debian):

alias ppp-compress-21 bsd_comp
alias ppp-compress-24 ppp_deflate
alias ppp-compress-26 ppp_deflate

Troubleshooting

Okay, it's not easy to just sit here and think of problems and solutions without having it happen to myself on my machine. With that said I'll just cover some problems that I have had and how I fixed them.

Problem 1. make menuconfig wont run Okay this can be caused by a number of problems. First off make sure you are in the /usr/src/linux-2.4.7 directory after you untar'ed the Kernel source. If that doesn't work, the error messages can give you guidance. For instance, you might not have "make" installed. If you run make menuconfig and get an error about "curses", make sure you have the ncurses and ncurses-devel packages installed. Also you need to have libc6-devel, bin86 and gcc installed. Perhaps you didn't choose to install all the "development packages" when you installed your base system.

Problem 2. Kernel Panic on reboot Ouch, this is where I ask you if you made your boot disk before you started and you answer "yes" like all the good boys and girls do. This error can be caused by a couple of things, maybe you took out something from the kernel that you needed, such as IDE Disk support for your hard drives (don't laugh I did this for 2.2.17). Anyhow, using your boot disk that you made, reboot your computer with the disk in the drive and it will boot your old kernel. With this you can compare your kernel .config files and see what went wrong.

Problem 3. Modules have unmet dependancies at boot I'll try to explain this the best I can. I had this problem when I first installed Debian 2.2 with Kernel 2.2.17 and then decided to recompile my kernel to customize it a little. After rebuilding the kernel and running make modules, make modules_install, it created a list of the modules I needed called modules.dep. Since the default kernel had loads of modules, there was alot of modules sitting in /lib/modules/2.2.17 that were not needed. This was corrected by erasing or by moving the /lib/modules/2.2.17 directory to a safe place before running make modules_install. This error should only happen when you are recompiling the same kernel version.

Problem 4. I recompiled my kernel and now something doesn't work If it worked before you compiled, then you changed something that you shouldn't have changed. Go back and check your old kernel's .config file and see what the differences are.