Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have compiled a new kernel (2.4.21) on RH 9.0 and am happy that the bzImage in /boot is cool. My issue is that I cannot configure grub correctly or use mkinitrd to get the kernel to boot.
Below is my /boot directory and grub.conf file for comments.
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=2
splashimage=(hd0,0)/grub/splash.xpm.gz
title Pasco Linux (2.4.21)
root (hd0,0)
kernel /boot/bzImage.pasco ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.21.img
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
Many txs for the advice; I used mkinitrd to make a initial ramdisk. I
used the command;
/sbin/mkinitrd --fstab /boot/initrd-2.4.21.img 2.4.21 to create a file
initrd-2.4.21.img.
The issue seems to be with my grub config or initrd.img file.
When I rebooted to test the kernel, I got the following error;
Kernel panic: no init found. Try passing init= option to kernel. This I
understand is a typical newbie compile error, but was preceded a couple
of statements;
RAMDISK: Compressed image found at block 0
**
**
**
mounting root filesystem
mount: missing root filesystem
The howto kernel compile discusses these errors with LILO and I am using
grub, so I could not find a way to solve it.
I punched in 'c' at the grub command line and was able to boot the kernel
manually, but not with grub. My grub.conf is copied below.
****************************************grub.conf*********************************************
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this
file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=2
splashimage=(hd0,0)/grub/splash.xpm.gz
title Pasco Linux (2.4.21)
root (hd0,0)
kernel /bzImage.pasco ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.21.img
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
****************************************************************************************************
any suggestions for me to fix this?
i had a similar problem before. if you were able to successfully get pass 'make modules_install' in kernel complation, just type 'make install' afterwards. that automatically configures grub.
I want to create different entries in my grub configuration file for:
1) the current, good kernel
2) the current good "test" kernel
3) the current experimental kernel
I want to do this, of course, to be able to start kernels without a bunch of typing at boot time, and easily update the images after building.
The grub configuration file looks pretty straightforward, but I wanted to make sure that I understand the kernel build procedure correctly. Also, there are some parts of the mkinitrd step that escape me.
First, the "How to build a kernel" mini above helps a bunch. Thanks! What I am not clear on is whether the "make modules-install" will overwrite any important files in /etc/sysconfig that will corrupt the current kernel workings. Particularly, I am concerned about the module version info that was aluded to in a previous post.
Next, there are references to unlinking the symlinks to the system map and kernel bzImage. Is this really necessary if you want to keep the current kernel and initrd image, and just make another one available as well? Are the unlinks necessary to make things work properly? If so, do I need to replace the symlinks later?
I have seen suggestions that "make install" will update the grub loader. The last time I tried this, my system hung horribly, causing a terrible mess. It seemed like lilo was pretty well supported, but grub was not. Do downloaded kernels, such as the -ac series, know I am using grub and take it into account? If not, what do I need to do to tell it?
So, if someone has a mini howto on building kernels and configuring grub, please let me know!
There is a very good one for the impatient in the how-to at http://www.tldp.org. If you follow the instructions, the recompile will not damage or corrupt your current (good) set up. At boot in grub, you will be able to select the required kernel.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.