LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Red Hat custom Kernel compilation mini-How-To for Red Hat 8-9 (https://www.linuxquestions.org/questions/red-hat-31/red-hat-custom-kernel-compilation-mini-how-to-for-red-hat-8-9-a-91503/)

xbaez 07-04-2004 09:40 AM

Dear LQ users

I am trying to compile a kernel for my server, being this a complex task since there shouldn't be many errors

My question is, were can I find information about block devices?
I remember that I did found a usefull documentation in the kernel source, which listed all the devices. However I didn't take note and I really want my server to speed up with a custom kernel.

Here's the error:

Kmod: Failed to exec /sbn/modprobe -s -k block-major-33. errno =2
VFS: Cannot open root device "hde3" or 21:03
please append a correct "root=" boot partition
Kernel Panic: VFS: Unable to mount root fs on 21:03

Here's lilo info:
image=/boot/vmlinuz-2.4.26
label="TESTING_KERNEL"
initrd=/boot/initrd-2.4.26.img
read-only
#append="root=/dev/hde3"
root=/dev/hde3

Any ideas?

Thetargos 07-04-2004 09:50 AM

Hello Xavier!!

That LILO config should get you started, unless of course the root filesystem does NOT reside inside hde3.

Only by this "hde" drive, I'm bold enough as to guess you are using SATA disks, if this is the case and if you are using Libata instead of IDE/ATA/MRL, etc support you drive will no longer be hde, but sda, you'll just have to boot into rescue mode (which will still see the drive as hde) and re-map the devices (in lilo.conf and fstab) to the SCSI bus.

Hope this helps.

xbaez 07-04-2004 10:55 AM

What I did actually (and I don't think it's listed in other parts of Linuxquestions.org) is that for ALL the:

block-major-xx

problems, you could go to your kernel source (ex: /usr/src/linux-2.x.xx) and read the

Documentation/devices.txt

In my case, here is what I found

33 = /dev/st1l Second SCSI tape, mode 1

Therefore, I compiled all of the SCSI as modules (exepct 'scsi support', hope it works now)

Regards

Thetargos 07-04-2004 11:10 AM

Good luck!

xbaez 07-04-2004 11:27 PM

Dear LQ users:

After I install kernel 2.4.26 apache doesn't starts

I receive this error:

[Sun Jul 04 23:01:54 2004] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache-2.0.49/bin/suexec)
[Sun Jul 04 23:01:54 2004] [crit] (38)Function not implemented: mod_rewrite: could not create rewrite_log_lock
Configuration Failed

Any ideas?

xbaez 07-05-2004 12:12 AM

It's all solved

I had to reconfigure, make, and make install apache

I suppose this apache will now work with my previous kernel as well

morrisset 07-08-2004 07:33 AM

Hi,
I meet a kernel problem after a compile the 2.6.7, when I reboot the pc with the new kernel, I recieve this message:
Kernel panic: VFS: Unable to mount root vfs on unknow- block(0,0)

my origrinal version is 2.4.0 now it still can work, and during my configurition, except some warning, everyting seems to be ok. Here is my grub.conf script:
Quote:

# 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,6)
# kernel /vmlinuz-version ro root=/dev/hda8
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,6)/grub/splash.xpm.gz
title Red Hat Linux (2.6.7-bk6)
root (hd0,6)
kernel /vmlinuz-2.6.7-bk6 ro root=LABEL=/ hdc-ide-scsi
initrd /initrd-2.6.7-bk6.img
title Red Hat Linux (2.4.20-8smp)
root (hd0,6)
kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8smp.img
title Red Hat Linux-up (2.4.20-8)
root (hd0,6)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
some friends say delete hdc-idc-scsi will be ok, but it doesn't work for me :cry:

Hope someone could help me :rolleyes: thx any way for every help

xbaez 07-08-2004 07:28 PM

Dear LQ users

I noticed that my kernel is not loading the modules listed in /boot/initrd-2.4.6

I did created the file manually with "mkinitrd -v" (verbbose) and I was able to see how, jfs, ext3, aic7xxx, sr_mod... were loaded in the initrd

However, when In configured GRUB to use other initrd file (which does loads the aic7xxx module for kernel 2.4.20), I noticed that the kernel simply doesn't loads any module in the initrd file

Why does that happens?

xbaez 07-13-2004 05:00 PM

Dear LQ Users

I successfully compiled the 2.4.26 kernel for my RedHat 9 system, however I noticed that the aic7xxx module was not loading at startup.

checking at the config, I noticed that the initial Ram disk support was disabled.

I made all the neccesary changes, recompiled the kernel, run the 'mkinitrd -v' command (in which I saw the ext3, jbd, aic7xxx... modules built into /boot/initrd-2.4.6), restarted the machine and this is what I see

Loading aic7xxx module
unresolved symbol bread-RSS74607
unresolved symbol scsi-unblock_requests_R&ae42de
unresolved symbol xxxx
unresolved symbol yyyy
unresolved symbol zzzz

For every module compressed into the initrd-2.4.6.img, file, I see tons of those errors

Finally, I receive a Kernel Panic.

If I boot the same kernel without the initrd-2.4.6.img file, then it boots correctly. However I have to manually load the aic7xxx module if I want to use my CD-R

Changing subs, Thetargos are you sponsored by LQ in some way?
I can't imagine how valueble is your help for this forum

linuxnut2003 07-17-2004 10:16 AM

morriset
change hdc-ide-scsi to hdc=ide-scsi and check your .config to see if you have your filesystem supported

pascal16 08-24-2004 07:42 AM

Kernel Panic
 
I am trying to install a 2.6.8.1 kernel alongside the 2.4.20-8 kernel that came with my Red Hat 9 installation. Everything went well until I tried to boot the system with the new kernel, where I got these error messages:

Quote:

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: 236k freed
Kernel panic: No init found. Try passing init= option to kernel
Here is a copy of my /boot/grub/menu.lst:

Quote:

# 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 (hd1,1)
# kernel /vmlinuz-version ro root=/dev/hdb3
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=20
splashimage=(hd1,1)/grub/splash.xpm.gz
title Latest Kernel (2.6.8.1)
root (hd1,1)
kernel /bzImage-2.6.8.1 ro root=LABEL=/
initrd /initrd-2.6.8.1.img
title Red Hat Linux (2.4.20-8)
root (hd1,1)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.20-8.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
And here are the results of a ls -l in /boot:

Quote:

total 7347
drwxr-xr-x 4 root root 1024 Aug 24 12:46 .
drwxr-xr-x 19 root root 4096 Aug 24 12:46 ..
-rw-r--r-- 1 root root 5824 Jan 25 2003 boot.b
-rw-r--r-- 1 root root 1382575 Aug 23 19:51 bzImage-2.6.8.1
-rw-r--r-- 1 root root 612 Jan 25 2003 chain.b
-rw-r--r-- 1 root root 44309 Mar 13 2003 config-2.4.20-8
drwxr-xr-x 2 root root 1024 Aug 23 20:00 grub
-rw-r--r-- 1 root root 149625 Aug 15 20:44 initrd-2.4.20-8.img
-rw-r--r-- 1 root root 83627 Aug 23 19:50 initrd-2.6.8.1.img
-rw-r--r-- 1 root root 473 Aug 15 20:44 kernel.h
drwx------ 2 root root 12288 Aug 15 21:36 lost+found
-rw-r--r-- 1 root root 23108 Feb 25 2003 message
-rw-r--r-- 1 root root 21282 Feb 25 2003 message.ja
lrwxrwxrwx 1 root root 20 Aug 15 20:44 module-info -> module-info-2.4.20-8
-rw-r--r-- 1 root root 15436 Mar 13 2003 module-info-2.4.20-8
-rw-r--r-- 1 root root 640 Jan 25 2003 os2_d.b
lrwxrwxrwx 1 root root 19 Aug 24 12:46 System.map -> System.map-2.4.20-8
-rw-r--r-- 1 root root 520129 Mar 13 2003 System.map-2.4.20-8
-rw-r--r-- 1 root root 892051 Aug 23 19:51 System.map-2.6.8.1
lrwxrwxrwx 1 root root 19 Aug 15 20:44 System.map.save -> System.map-2.4.20-8
-rw-r--r-- 1 root root 3193503 Mar 13 2003 vmlinux-2.4.20-8
lrwxrwxrwx 1 root root 16 Aug 15 20:44 vmlinuz -> vmlinuz-2.4.20-8
-rw-r--r-- 1 root root 1122186 Mar 13 2003 vmlinuz-2.4.20-8
Thanks in advance for you help :)

mkaman 08-24-2004 02:53 PM

Hey this is great!
I've got my first linux kernel upgrade by myself and my first kernel rpm !! :D:D:D:D:D

I have seen a lot of people here with lot of panics and fails.
I think that there is something missing for rh9. It's everybody copying their old config file in their new kernel source root with the name ".config"?? I think that the impatients got the commands and executed them.

Thetargos 08-24-2004 06:15 PM

Quote:

Originally posted by morrisset
Hi,
I meet a kernel problem after a compile the 2.6.7, when I reboot the pc with the new kernel, I recieve this message:
Kernel panic: VFS: Unable to mount root vfs on unknow- block(0,0)

my origrinal version is 2.4.0 now it still can work, and during my configurition, except some warning, everyting seems to be ok. Here is my grub.conf script:


some friends say delete hdc-idc-scsi will be ok, but it doesn't work for me :cry:

Hope someone could help me :rolleyes: thx any way for every help

Hello and sorry for the late reply...

Are you building your kernel image with the filesystem (ext2, ext3, etc) support into the image (i.e not as a module)? And you may need to substitute the root=LABEL=/ statement from your grub.conf for the actual partition that holds your root partition (/dev/hda2 in my case, check your partitions).

Thetargos 08-24-2004 06:16 PM

Quote:

Originally posted by mkaman
Hey this is great!
I've got my first linux kernel upgrade by myself and my first kernel rpm !! :D:D:D:D:D

I have seen a lot of people here with lot of panics and fails.
I think that there is something missing for rh9. It's everybody copying their old config file in their new kernel source root with the name ".config"?? I think that the impatients got the commands and executed them.

Congratulations!!

andy18 08-26-2004 11:59 PM

Hello Guys,

Can someone please help me take a look on this thread ?

http://www.linuxquestions.org/questi...61#post1135761


All times are GMT -5. The time now is 02:13 PM.