Solved

After compiling the kernel...

Posted on 2001-08-04
3
321 Views
Last Modified: 2013-12-16
I must have attempted this 20 times and each time I get the same result. I compile my kernel and move all the appropriate files and directories. I edit LILO to point to my new kernel. Re-run LILO and reboot. I ALWAYS fail at this point:
"uncompressing linux...ok, booting the kernel"
but it NEVER goes further than that. I've waited over an hour and still nothing. What am I doing wrong? I am not very proficient at Linux but I've read a lot about compiling the kernel and followed step by step instructions. I've just never compiled it successfully. Can anyone give me any pointers. Please no referrals to the HOW-TO website. I've already read them. Thanks a lot.
0
Comment
Question by:jackiethejokeman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
ID: 6354193
The sequence that I use on RedHat, with say a 2.4.3-12 kernel looks like:

# cd /usr/src/linux
# make mrproper

The 'make mrproper' is needed the very first time a kernel is built or if the CPU type is changing (like i386<->i586, UP<->SMP). For subsequent builds of the same CPU type it isn't necessary. Then do:

# make xconfig               # -or- make menuconfig, etc
# make dep
# make bzImage
# make modules
# make modules_install
# cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.3-12
# cp vmlinux /boot/vmlinux-2.4.3-12
# cp System.map /boot/System.map-2.4.3-12
# cd /boot
# ln -s vmlinuz-2.4.3-12 vmlinuz             # symlink may already exist
# ln -s System.map-2.4.3-12 System.map # symlink may already exist

Then if the boot device for the system is a loadable module (like SCSI, RAID, etc) I make a new initrd image like:

# cd /boot
# mkinitrd initrd-2.4.3-12.img 2.4.3-12

Finally I edit /etc/lilo.conf to adjust, if necessary, the kernel version and run lilo to update the boot info.

If you are using the same sequence and it isn't working, then it becomes somewhat likely that you aren't correctly configuring the kernel. On a RedHat system I'd recommend that the first kernel that you build use one of the RedHat 'canned configs' from /usr/src/linux/configs. Pick the one that matches your CPU (as shown by 'uname -m'), load it into your favorite config tool, save that and build the kernel. When that works you can build another tailored as desired.

On a RedHat 7.0 system you won't be able to sucessfuly build a kernel unless you've installed the kgcc rpm.
0
 

Author Comment

by:jackiethejokeman
ID: 6360125
That was it. I was missing the step:

mkinitrd initrd-2.4.3-12.img 2.4.3-12

Thanks Jlevie!

0
 
LVL 40

Expert Comment

by:jlevie
ID: 6360216
Yep, that would do it. I suspected it might be something as simple as that.
0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question