Solved

After compiling the kernel...

Posted on 2001-08-04
3
315 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
  • 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

770 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