Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-09-2003, 06:17 AM
|
#1
|
LQ Newbie
Registered: Jul 2003
Distribution: RH 9.0
Posts: 3
Rep:
|
Kernel compiling and boot issues
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.
Any suggestions?
*****************/boot***********************************
total 6662
drwxr-xr-x 4 root root 1024 Jul 8 16:56 .
drwxr-xr-x 19 root root 4096 Jul 8 16:59 ..
-rw-r--r-- 1 root root 5824 Jan 25 07:05 boot.b
-rw-r--r-- 1 root root 945262 Jul 8 15:58 bzImage.pasco
-rw-r--r-- 1 root root 612 Jan 25 07:05 chain.b
-rw-r--r-- 1 root root 44309 Mar 14 01:01 config-2.4.20-8
-rw-r--r-- 1 root root 37706 Jul 8 15:59 config-2.4.21
drwxr-xr-x 2 root root 1024 Jul 8 16:39 grub
-rw-r--r-- 1 root root 150760 Jun 25 15:48 initrd-2.4.20-8.img
-rw-r--r-- 1 root root 149601 Jul 8 16:35 initrd-2.4.21.img
-rw-r--r-- 1 root root 473 Jun 25 15:48 kernel.h
drwx------ 2 root root 12288 Jun 25 15:44 lost+found
-rw-r--r-- 1 root root 23108 Feb 25 02:51 message
-rw-r--r-- 1 root root 21282 Feb 25 02:51 message.ja
lrwxrwxrwx 1 root root 20 Jun 25 15:48 module-info -> module-info-2.4.20-8
-rw-r--r-- 1 root root 15436 Mar 14 01:01 module-info-2.4.20-8
-rw-r--r-- 1 root root 640 Jan 25 07:05 os2_d.b
lrwxrwxrwx 1 root root 19 Jun 25 15:48 System.map -> System.map-2.4.20-8
-rw-r--r-- 1 root root 520129 Mar 14 01:01 System.map-2.4.20-8
-rw-r--r-- 1 root root 526087 Jul 8 16:56 System.map-2.4.21
-rw-r--r-- 1 root root 3193503 Mar 14 01:01 vmlinux-2.4.20-8
lrwxrwxrwx 1 root root 16 Jun 25 15:48 vmlinuz -> vmlinuz-2.4.20-8
-rw-r--r-- 1 root root 1122186 Mar 14 01:01 vmlinuz-2.4.20-8
*************************************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 /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
|
|
|
07-09-2003, 02:24 PM
|
#2
|
LQ Newbie
Registered: Oct 2002
Distribution: Gentoo [AMD64]
Posts: 10
Rep:
|
Can you attach a snip from your boot log?...and if you can't get that far, what kind of error are you getting at boot?
Last edited by Major Konig; 07-09-2003 at 02:25 PM.
|
|
|
07-09-2003, 02:27 PM
|
#3
|
LQ Newbie
Registered: Jul 2003
Distribution: RH 9.0
Posts: 3
Original Poster
Rep:
|
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?
Regards,
G
|
|
|
07-09-2003, 03:14 PM
|
#4
|
LQ Newbie
Registered: Oct 2002
Distribution: Gentoo [AMD64]
Posts: 10
Rep:
|
Should it be
kernel /boot/bzImage.pasco
other than
kernel /bzImage.pasco
?
|
|
|
07-09-2003, 10:05 PM
|
#5
|
LQ Newbie
Registered: Jul 2003
Distribution: RH 9.0
Posts: 15
Rep:
|
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.
|
|
|
07-17-2003, 02:20 AM
|
#6
|
LQ Newbie
Registered: Jul 2003
Distribution: SuSE 8.2
Posts: 2
Rep:
|
Creating test kernel configurations using 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!
|
|
|
07-17-2003, 02:47 AM
|
#7
|
LQ Newbie
Registered: Jul 2003
Distribution: RH 9.0
Posts: 3
Original Poster
Rep:
|
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.
Regards,
G
|
|
|
All times are GMT -5. The time now is 09:00 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|