LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 07-09-2003, 06:17 AM   #1
georgen_za
LQ Newbie
 
Registered: Jul 2003
Distribution: RH 9.0
Posts: 3

Rep: Reputation: 0
Lightbulb 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
 
Old 07-09-2003, 02:24 PM   #2
Major Konig
LQ Newbie
 
Registered: Oct 2002
Distribution: Gentoo [AMD64]
Posts: 10

Rep: Reputation: 0
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.
 
Old 07-09-2003, 02:27 PM   #3
georgen_za
LQ Newbie
 
Registered: Jul 2003
Distribution: RH 9.0
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
Old 07-09-2003, 03:14 PM   #4
Major Konig
LQ Newbie
 
Registered: Oct 2002
Distribution: Gentoo [AMD64]
Posts: 10

Rep: Reputation: 0
Should it be

kernel /boot/bzImage.pasco

other than

kernel /bzImage.pasco

?
 
Old 07-09-2003, 10:05 PM   #5
Mikx
LQ Newbie
 
Registered: Jul 2003
Distribution: RH 9.0
Posts: 15

Rep: Reputation: 0
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.
 
Old 07-17-2003, 02:20 AM   #6
baddog
LQ Newbie
 
Registered: Jul 2003
Distribution: SuSE 8.2
Posts: 2

Rep: Reputation: 0
Question 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!
 
Old 07-17-2003, 02:47 AM   #7
georgen_za
LQ Newbie
 
Registered: Jul 2003
Distribution: RH 9.0
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Kernel Issues prometheus Debian 4 09-02-2004 05:41 PM
Won't boot after compiling 2.4.26 kernel with Slackware 10 Cerbrim Linux - Laptop and Netbook 3 09-01-2004 01:00 AM
Newbie Boot and Kernel Issues mharley Slackware - Installation 7 05-03-2004 01:12 PM
Framebuffer device issues after compiling kernel 2.6.3 Gaghiel Slackware 3 03-10-2004 11:24 AM
Kernel Boot Issues mikeyt_3333 Linux - General 6 09-15-2001 09:57 AM


All times are GMT -5. The time now is 06:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration