Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

After compiling the kernel...

Posted on 2001-08-04
3
Medium Priority
?
328 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 150 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!

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Fine Tune your automatic Updates for Ubuntu / Debian
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month12 days, 1 hour left to enroll

916 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