Solved

After compiling the kernel...

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now