LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   Tried to install new kernel but doesnt succeed? (http://www.linuxquestions.org/questions/red-hat-31/tried-to-install-new-kernel-but-doesnt-succeed-138033/)

RHLinuxGUY 01-24-2004 12:10 AM

Tried to install new kernel but doesnt succeed?
 
I've tried to install the latest kernel on my redhat box but i dont think it install correctly. 'Cause shouldn't the login screen (text mode) say kernel 2.6 NOT 2.4? And when i go into the directory where the kernel is located it shows the 2.4 kernel and the 2.6? Is this fine? This is what i did to install it...

Download kernel and bzimage.
Sent them to /usr/src/
cd into /usr/src/, and ran the command "tar -xzvf (the name of the package).tar.gz.
the "cd linux-2.6.0"
"make menuconfig"

afterwards i ran "make bzImage"

and "make modules", "make modules_install"

an suggestions or answers would be great. thanx in advance!

Simon Bridge 01-24-2004 02:04 AM

You need to edit the bootloader .conf file, in redhat it is usually found in
/etc/<bootloadername>.conf

Find out about how to edit the file by reading the man pages relvant to it and your bootloader.

Read the .conf file

There will be a line setting the default kernel, the one that loads when the countdown ends.

There will be a block of commands starting
image=<old kernel image>
label=<old kernel label>
initrd=<old kernel initial ramdisk>
<options - like hdc=ide-scsi>

in whatever syntax your bootloader recognises.
You'll need to create a duplicate of this for the new kernel, replacing the old kernel names with the new ones. You'll need a new initrd.img file (use mkinitrd - see man mkinitrd and mkinitrd --help) Remember the manual files and the help files are your best freinds. To read around a command try apropos <name>.

When you've got it right, you'll see the initial boot screen list both kernels with a countdown to select one. This way, if you stuff up you can always reboot into the old one wot you know works.

Good luck
Simon

jamie_barrow 01-25-2004 11:25 AM

I have installed the new kernel (2.6.1) on redhat 9, but when it tries to boot the new kernel, it gives the following messages and stops:

Red Hat nash version 3.4.42 starting
Mounting /proc filesystem
Creating block devices
Creating root device
Mounting root filesystem
mount: error 19 mounting ext3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
umount /initrd/proc failed: 2
Freeing unused kernel memory: 244k freed
Kernel panic: No init found. Try passing init= option to kernel

---
Why isn't the new kernel loading?

Simon Bridge 01-25-2004 05:52 PM

Hah! You think you've got troubles :)

Yeah - never mind...
I think the clue to your problem is on that init line - have you made an initial ramdisk AND put a line referencing it in you bootloader config file?

(Append bootloader config file if you like.)
Simon

jamie_barrow 01-25-2004 06:41 PM

Simon, were you replying to me?
If so what do you mean by ramdisk, remember, this is my first time updating the kernel...

Simon Bridge 01-25-2004 09:42 PM

OK - to find out for yourself, there are docs with the kernel distribution tarball (the readme file should tell you about them), and there are man pages for your boot loader. (type "man <bootloader name>" and "man <bootloader-name>.conf" and "man mkinitrd")

Here's the gist:

Most OS's cannot boot from the default bootsector because it is too small - normally the boot is a two stage process, first a ramdisk is loaded (initrd-<version number>) which can then be used to install the OS from the kernel image.

(A ramdisk in an imitation disk drive which lives in Random Access Memory.)

From what you say, you did not do "mkinitrd"?

Also - post the content of your bootloader config file, it should be

/etc/<bootloader name>.conf

i.e. if you use GRUB then it will be /etc/grub.conf
do gedit /etc/grub.conf and copy/paste the content to a reply screen here.

alternatively if you use lilo then it will be /etc/lilo.conf
and so on.

Simon

velska 01-27-2004 03:13 AM

Tip
 
Go look at the Kernel mini-HOWTO thread's last page... There's an ongoing discussion about your problem.

If you're running the latest version of tools, you don't have to "mkinitrd", "make install" does it for you. It also edits grub.conf, if you use grub.

Your problem is not about initrd, it's about starting the init daemon, which starts the system and its services. And you get the panic because of the error in mounting root filesystem.

jamie_barrow 01-27-2004 11:44 AM

thanks everyone. I'll have a look at the mini-HOWTO thread.

RHLinuxGUY 01-27-2004 11:32 PM

Hey wait this didn't my problem!? How do u know if the kernel is install at all??????


All times are GMT -5. The time now is 12:19 PM.