A Guide to Recompiling the Kernel


Recommended Posts

Downloading and installing the kernel

The new kernel is quite easy to find and download. Follow these steps.

1. First, become root (use the: su command in a shell)

2. Go to The Linux Kernel Archives.

3. Download the Linux 2.6.xx 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 -zxvf linux-2.6.xx.tar.gz
cd linux-2.6.xx
make menuconfig

After your machine takes a bit of time to compose the menus, you should see the Linux kernel menu system. The menu gives you the ability to choose which options are included in your kernel. After choosing these options, you'll be able to compile your kernel.

Compiling the kernel

First, type in the following.

make bzImage

If you use LILO as your boot manager, then type the following.

make install

If you configured your kernel to use modules, which many people want to do, you'll need to type in the following command.

make modules
make modules_install

Hurry up and wait

If it's your first time building a kernel, keep the boot disk from the first time you installed your OS. It'll come in handy if you did something wrong when configuring your kernel!

Building the kernel can take a lot of time, depending on your machine's specs. Think in terms of at least a half-hour and you won't be far off. It's a big plate of spaghetti for your computer to munch on, so be patient.

The good news is that Linux is great at multitasking, so you can go surf the Web while the kernel compiles. And have fun!

Link to comment
https://www.neowin.net/forum/topic/149758-a-guide-to-recompiling-the-kernel/
Share on other sites

Not a bad guide. Perhaps if you could include a run down on the recommended options in the Linux Kernel Menu system? For newbies this can be a very daunting process. Remember. Always aim your guide towards first time users. Keep it as simplified as possible. Step by step instructions are a must!

A couple of things:

1) you want to untar the file with

tar -xvjpf linux.whatever

or

tar -xvzpf linux.whatever

It keeps the permissions correct. I don't know if the p is necessary for compiling and using, but it is a good practive for kernels

2) With the latest 2.6 kernels you only need to type

make

after the menuconfig. It will make the bzlmage and the modules. then type

make modules_install

3) You don't need to symling to /usr/src/linux. This is for the kernel headers. Actually it is advisable to have this linked to an older 2.4 kernel or a 2.4 header set for backwards compatibility. It will not mess up compiling anything if you set it to a 2.4 kernel. However the 2.6 kernel's headers are slightly different than normally expected by the compiler and its libraries.

4) you can run

make install

for both lilo and grub if they are set right.

5) For the menuconfig I suggest that you get a listing of all your hardware on a piece of paper and make sure that it is very detailed. Additionally you need to check with the distro to make sure that you don't need to add in extra stuff to make that distro work right. I know you need to with gentoo.

6) lastly if you don't choose make install to install the kernel, don't overwrite the last one. and if you choose make install it will over write the last kernel installed if it has the same name. For example if you have installed a 2.6.3 kernel and want to change some things and don't do anything to the kernel source (ie add patches) and re make the 2.6.3 kernel and choose make install the original 2.6.3 kernel will be replaced with the newer one. However you can change this in the make file in the base kernel source directory. it is in the extraversion options. I suggest you patch the kernel source to see what I am talking about because most patches will change the append on the end of the image files and system map files.

7) I am sorry if I confused anyone. Compiling your own kernel isn't difficult. However you have to make sure you configure it correctly in the menuconfig. Wierd things can happen, and at worse a kernel panic. But these are all fixable. Try to have another kernel for just in case your new one fails. Then you can boot with it at lilo or grub and you can fix whatever error you made.

I get Unexpected EOF in archive error

Most likely you downloaded a bad kernel source. download a new one and try again.

What about generate-modprobe.conf?

I've always had to do that in order to get everything working. Remember that you have to specify the output of the modprobe.conf file to the /etc dir tho.

Also I found make gconfig better than menuconfig, but I guess that is a matter of personal taste.

I'm not an expert but, like I think that like I said, make install will usually update grub for you so that the new kernel is listed on the statup menu.

For example here is my /etc/grub.conf file:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: ?You do not have a /boot partition. ?This means that
# ? ? ? ? ?all kernel and initrd paths are relative to /, eg.
# ? ? ? ? ?root (hd0,4)
# ? ? ? ? ?kernel /boot/vmlinuz-version ro root=/dev/hda5
# ? ? ? ? ?initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
title Fedora Core (2.4.22-1.2174.nptl)
	root (hd0,4)
	kernel /boot/vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/ hdd=ide-scsi rhgb
	initrd /boot/initrd-2.4.22-1.2174.nptl.img
title Fedora Core (2.4.22-1.2115.nptl)
	root (hd0,4)
	kernel /boot/vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ hdd=ide-scsi rhgb
	initrd /boot/initrd-2.4.22-1.2115.nptl.img
title Windows XP
	rootnoverify (hd0,0)
	chainloader +1

You see I have two different linux kernel entries (2.4.22-1.2174.nptl?& 2.4.22-1.2115.nptl)?

You could try manually adding the new kernel to the grub.conf file but to me it sounds like the install has not worked properly as it has always done this itself for me.

  • 3 weeks later...

For LILO try running the $lilo command from the terminal see if this adds the kernel to your config

Alternate

-----------

1.Assumes that you have "root" or "sudo"

Take a look in the "/boot" partition or file path depending on how you partitioned your drive.

use the following from your terminal of choice

$ls -F /boot

See what you have got there and double check that with your grub.conf file.

<snip>

kernel /boot/vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/ hdd=ide-scsi rhgb

initrd /boot/initrd-2.4.22-1.2174.nptl.img

title Fedora Core (2.4.22-1.2115.nptl)

root (hd0,4)

</snip>

Your output from the "ls" command should be able to be matched to one of your kernel entries,

ie..

If you have kernel named vmlinuz-2.4.22-1.nptl in your config file you should also have a file named

vmlinuz-2.4.22-1.nptl in your "/boot" directory. If for some chance your kernel image is not listed in

your "/boot" directory search for it then move it to your /"boot" directory manualy.

#Update your locate database

$updated

#Search for the kernel image

$locate vmlinuz-2.6.* | less

See what you can find, use the up & down cursor keys to navigate to the end of the results or until you

find what you are looking for, if you find the kernal image then move it to the "/boot" directory.

$mv -r /file.name/path/to file /boot

Repeat the above steps for the initrd image.

Now double check that your conf file and your kernel images line up. Restart the box to see if you get an option for the kernel at boot.

Hope this helps,

The_Geek

i did this question in other thread, but i guess i can repeat it here too because are pretty the same post...

wich is the diference in set to Built-in or Module on the kernel configuration when you enter the make menuconfig command?

that's all. thanks

built-in compiles the part into the kernel. modules compiles the part as an externel module that can be loaded or unloaded at any given time given the correct circumstances. Some parts need to be compiled in otherwise you risk a kernel panic, most doesn't and you need to experiment with those to determine the optimum settings for your computer.

I got a kernel panic :oops: :D

Couldnt mount the hard drive or something, which i imagine is pretty serious :p Im sure it just needs a little bit more care and adaptation from me, and i'll try later, but if anyone has any tips that would be appreciated.

Oh, by the way, im using SuSE and have been told that i shouldnt of just compiled 2.6.0 randomly and needed a SuSE-adapted kernel. How correct is this? Sounds a load of rubbish to me

Kongit - is there any speed advantage to using modules over compiled-in or do I have that back to front?

Specifically I'd like to improve the boot speed of the kernel as currently it takes 5 or 10 secs before my services etc start.

It depends. I for one have noticed no speed increase on boot with the exception of usb. I use hotplug (almost all distros do) so only the usb stuff that is plugged in at boot will be loaded. If you get your kernel properly configured and the modules that are supposed to load at boot properly configured then you will probably have the best in time for boot. However boot times for a normal linux user shouldn't matter as you stay booted for long periods of time.

It shouldn't make a difference between compiling in or as modules if everything is configured correctly for boot speed.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Trailer park trash “sport “, fits the current White House
    • KataLib 5.3.0.0 by Razvan Serea KataLib is more than just a music player — it's a complete audio suite designed for music lovers and creators alike. It combines a powerful audio player, a flexible metadata editor, a capable audio converter, and a music library manager into one streamlined application. Core Features: Audio Player Enjoy seamless playback of virtually any audio format or even streaming video files. DJ Mode lets you mix tracks with manual or automatic crossfades. You can also load and save WinAmp-style playlists for quick access to your favorite sets. Audio Converter Convert between a wide range of audio formats effortlessly. Trim or normalize your output automatically, and even extract audio from streaming video sources. Ideal for preparing files for different devices or platforms. Metadata Editor View and edit ID3v2 tags and other metadata. Batch edit multiple files at once, and fetch missing information directly from the MusicBrainz database. You can also apply or update album art with ease. Music Library Manager Organize your entire audio collection, search across tracks instantly, and download cover images from the internet — or use your own custom artwork. KataLib makes it easy to keep your library tidy and enriched with useful info. Supported Formats: KataLib supports a wide range of both lossy and lossless audio formats: Input: OPUS, AAC, FLAC, M4A, MP3, MP4, MPC, APE, AIF, MKV, AVI, MOV, FLV, WEBM, Ogg Vorbis, WAV, WAVPack, WMA, AC3, OGA, MP2, MPGA, MPEG, DTS, M4B, DSD (DFS) Output: OPUS, FLAC, M4A, MP3, Ogg Vorbis, WAV Under the hood, KataLib uses the trusted FFmpeg engine for audio conversion and media playback, ensuring compatibility with virtually all mainstream media formats. KataLib 5.3.0.0 changelog: Added Option to select the Zoom level of the Oscilloscope visualizer. The taskbar button of the app now displays the progress of its processing tasks. The metadata text of the Visualization Video can now be aligned by the user. We can now reorder the order of the Visualizers and Metadata, in the Visualization Video Setup dialog, by removing any item and adding it again. It will be added at the end. Changed The font size of the Visualization Video can now be more than 30 points. Updated yt-dlp library to version 2026... Fixed Opening the Visualization Video Setup dialog could fail if the settings were wrong. Sometimes there were false duplicates in the Rename Tracks dialog. Tracks without metadata appeared without title in the Recent menu. Download: KataLib 5.3.0.0 | 90.0 MB (Open Source) Links: KataLib Home Page | Github | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • EA Sports UFC 6 review: Brutal, satisfying, and surprisingly accessible to newcomers by Pulasthi Ariyasinghe EA’s UFC series of fighting games has been putting out games for over 10 years now, but it’s a series I have never spent any time with. As a PC guy, the series being console-exclusive is the primary reason for that. The latest entry to the series, EA Sports UFC 6, is still not coming to PC, but I have an Xbox now. When EA reached out to see if I could have a crack at the game and give my opinion about it, I finally got the chance to see what this franchise is about. I have spent about a week playing UFC 6 on the Xbox Series X. Despite my lackluster skill with fighting games, I still have fun with entries like Street Fighter and Tekken. I quickly came to realize this is a different kind of fighting game, not the arcade titles I am usually dabbling with. Most of the week that I spent playing UFC 6 was in the career mode, trying not to get knocked out while slowly improving my combos and reactions. The review below will be from the perspective of a newcomer to the series and an amateur fighting game fan, so please forgive any mistyped lingo or series-staple mechanics I am not comprehending. In the Ring Getting a solid hit in UFC 6 is satisfying. It’s probably the most satisfying impact reaction I have seen in a fighting game. The ripples in the muscles, the spray of sweat (and blood), the meaty sound, and the subsequent stumble all carry a lot of weight. If I miss a heavy swing like that, though, I already know that I'm in for a world of hurt from the incoming counters. The fighting is a real treat. The actions aren’t as snappy as arcade titles, so a miss feels like a much bigger mistake here. This slowness did take some getting used to, but I felt the improvement in my abilities even after a few drills with basic punch and kick combos. If I’m not deliberate with my actions in the ring, whether it be a hasty retreat or a flying punch, the possibility of getting instantly knocked out is always there. The head, chest, and legs all come with their own health bars, so guarding just one area is just asking for trouble. A few hits to the head, and it's game over. Meanwhile, you won’t even be able to stay on your feet if they get damaged enough, drastically lowering the total amount of stamina available for the rest of the match. I was also encountering a large range of fighting styles to customize my own fighter with. There are a huge number of real-life superstars here from multiple eras. It’s not as exaggerated as Street Fighter or Tekken, but the way they move, evade, throw punches, or even take steps is based on their real-life counterparts. I can see this being a big draw for any mixed martial arts fan. One feature I was surprised to see here was the 'Flow State' ability. As rounds progress, a power-up meter can give a temporary boost to the unique fighting style of the selected fighter, essentially boosting what they are good at. There is an entire visual effect that kicks in when activating this, too. The surprising part was seeing something like this in a game that feels like it’s aiming to be more of a simulator than an arcade fighter. My skill level is too low to use this exactly how the game wants me to, so I ended up triggering it whenever the opponent did it as well. Streamlined vs Authentic When I first started it up, UFC 6 asked me about my experience with the series. Being genuinely new, I took its advice and opted for a lowered difficulty level and 'Streamlined' controls. Quickly, I realized that this wasn’t for me. My chosen fighters were throwing random attacks, no matter what combination the game was trying to teach me. Win streaks were happening, and I was already getting bored out of my mind just a few matches in. Turning off this mode and switching to 'Authentic' controls fixed everything right up. I was now able to control my fighter with more precision than I expected. I could control each arm and leg, which body part my attacks would aim at, and the fully customizable controls for setting up unorthodox moves were a cherry on top. None of these made me an expert at the game, but at least I was being beaten up fairly. This is not a point against UFC 6, though. Giving the option for anyone to enjoy the game is always a good thing in my eyes. There is a lot of customizability in the difficulty, with everything from slow-motion reactions to specific assists being offered as toggles. If I had a friend coming over and wanted to try a quick 1v1, the streamlined controls option is one I’d consider to make it a light and fun fight. The one part of the fighting that did not click with me was the grappling. Being taken to the ground brings in an entirely new control mechanism involving mounts and submissions that feel more like quick-time events than the heavy, tactical fighting I had seen so far while standing. The game wants me to hold sticks in certain directions to change the position or pull off submissions, trying to do the opposite actions of the opponent. Even though I tried to get used to this gameplay, it just felt like a momentum killer, and I eventually just wanted to get back on my feet to get back into the action. Legacy and Career It was UFC 6’s career mode that I wanted to play the most when I started it up. I grew up with EA Sports games, and taking my team from the ground to the top has always been my favorite task. UFC 6 has that same option but also offers a more cinematic entrance to the career experience than I expected with ‘The Legacy’ mode. This mini-campaign follows an up-and-coming fighter, Chris Carter, who is attempting to reach the heights his father had reached in the sport. Starting with a small-time gym and coach, the story follows both his growth in the space as well as the growing rivalry with a friend and fighter, Danny Lopez. The fights in this mode are very good at introducing a newcomer like me to the sport and its varying techniques. Cinematics land between the major fights, showing the growing tension between the two fighters as the years go by, feeling the pressure to not miss out on the hard-earned chances. The dialogue can be a little corny at times, especially when the bar fights kick off, but I largely enjoyed the storyline. At the end of it, I was pretty much familiar with all the mechanics of the career mode, unlocking new skills and moves, and how I needed to approach fights, both outside and inside the ring. This story mode isn’t a very lengthy one, so don’t expect an hour-long campaign. Once the conclusion is reached, Carter’s journey continues as if it’s a normal career playthrough, though I decided to start over from scratch now that I have some know-how about the basics. The career mode is very streamlined, which is to be expected considering there isn’t a team to manage like in other EA Sports games. It’s the journey of one fighter. When a fight comes up in the calendar, I could choose how many weeks I dedicate to preparing for it at the gym. A longer prep time gives the opportunity to get my fighter’s fitness up (giving a bonus during fights), earn more money and points for unlocking new skills, and gain more fans to fast-track the rise to stardom. While that sounds like a lot of things to manage, it’s more like a few clicks. There is a social media menu that sometimes pops up with canned replies I can send to fans, and the sponsors are once again a single click away from being assigned as finished. It’s the training aspect that adds a gameplay angle. Using the money from winnings and sponsorships, I was hiring different types of trainers and learning fancier moves to use in the ring. One small thing I appreciated was that it was possible to injure each other during these training sessions. If a trainer goes down in a bad way while sparring, they won’t be available for the remainder of training. If my fighter is injured, it takes valuable time and resources to heal and recuperate. Just like in real life, it makes sense not to go so hard during training sessions and save that energy for the main event. Every training or sponsorship activity I took part in used up the days and weeks I had before the next fight, bringing a balancing element to the whole ordeal. There were times I simulated most of these to just get to the next fight, but the grind for gaining even the slightest bit of advantage while trying not to overdo it is an enjoyable one. Outside of quick fights and career modes, UFC 6 also introduces an almost museum-like mode to explore a trio of fighters considered to be legends of the sport: Max Holloway, Alex Pereira, and Zhang Weili. The aptly named Hall of Legends mode is unlike everything else seen in the game. Each of these fighters has entire levels dedicated to them that I could walk around in and explore their journey into the UFC. This includes footage from real-life fights and interviews about their original inspirations and training methods. Each of these spaces is almost like an interactive documentary. Once the highlights are done, the mode offers the opportunity to take over a deciding fight from the superstars. It’s an impressive transition. Going from the real-life televised event with crowds and commentary to immediately taking over in the game has some real hype behind it. Performance and visuals It’s clear to see that UFC 6 is going for a photo-realism look with its visuals compared to any other fighting game. The fighters don’t look great in selection screens. But inside the arenas, under the flood lights, surrounded by crowds, and facing an opponent, the visuals are more than impressive. As ghastly as it is to witness, things like blood spraying into the mat and muscles reddening as they get pummeled keep improving the immersion. The fluid animations help sell the illusion even further. A missed kick carries the momentum to require a corrective step. Hard punches that glance off blocks give off the air of a hit that still took some wind off the opponent’s guard. The special moves with flips and spins look mega awkward when missing, just as they do in real life. Suffice to say, the Frostbite Engine powering this game is one of the biggest strengths of EA development studios. Playing on the Xbox Series X, the 60 FPS gameplay did not miss the mark or cause any slowdowns that I could detect. I still wish this series were on PC to see just how far the developer can push the engine. One area I continue to have issues with, surprisingly enough, is the menus. The game has fast loading screens, but almost every menu I click through has a large amount of noticeable lag before it registers. This is immensely painful in the career mode, since I have to go through multiple menus between fights to train and do sponsorships, and having a 3-second pause when selecting a simple move between pages is the only time that made me quit the game. Thanks to Xbox’s quick resume, though, I was able to instantly jump back in the next day to the same point (and wade through more laggy menus). Conclusion My primary mission going into this EA Sports UFC 6 review as a newcomer to the series was to find out if this is a good jumping-in point for someone like me. Suffice it to say, the game passed that test with flying colors. Despite the high skill ceiling, the legacy mode introduction campaign, multiple types of accessible controls, and streamlined career had me picking up the basics and fighting styles much faster than I expected. I wish I had gotten to try out competitive multiplayer during my time with the game, too, but the lack of players in the pre-release version prevented this. The impressive visuals and animations, coupled with the impact physics that let me feel every punch and kick easily, made this the most immersive fighting game I have played. The only part that gave me pause was the grappling gameplay, which killed the momentum in most fights. The Flow State amplifying system didn’t hamper the experience, but I also felt like it made more sense for an arcade fighter, not this. Easily the most annoying thing about UFC 6 was its laggy menus, which I hope get some sort of fix later. Returning series veterans might have a completely different experience from me. But for a new fan like me looking to climb ranks and see fighters get floored in spectacular ways, UFC 6 doesn’t miss a step. EA Sports UFC 6 is releasing on June 19 across Xbox Series X|S and PlayStation 5 for $69.99. Ultimate Edition owners can already jump in via advanced access. This review was conducted on the Xbox Series X version of the game provided by EA.
    • No, Microsoft is obviously just spending money on maintaining a product with 0 users.
  • Recent Achievements

    • Week One Done
      ssd21345 earned a badge
      Week One Done
    • Contributor
      MarkHughes4096 went up a rank
      Contributor
    • Dedicated
      jordanspringer earned a badge
      Dedicated
    • Rookie
      Rimplesnort went up a rank
      Rookie
    • One Year In
      Markus94287 earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      486
    2. 2
      +Edouard
      173
    3. 3
      PsYcHoKiLLa
      138
    4. 4
      ATLien_0
      94
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!