Solved

After compiling the kernel...

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can't connect to FTP 18 154
Looking for a program called HoneyMine. 3 117
Centos 7 DNS server not replying to clients 3 95
Bash script to include windows servers 13 40
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…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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.:
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…

738 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