Re: Building a kernel from source on RH9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Be careful, your grub.conf contains 2.4.28smp and your work 2.4.28. What is your choice ?
Here is my way :
If root=LABEL=/ is right with 2.4.20-37, it will be right with 2.4.28smp. If not, you can replace it by root=/dev/hdan (n is the number of your root partition)
You have to clean all like this (don't write the comments (...)) :
 
1) Edit Makefile and adapt "EXTRAVERSION = smp" or "EXTRAVERSION =", the result will be seen in /lib/modules/2.4.28smp or /lib/modules/2.4.28
You know that smp corresponds to multi processor (see with make xconfig)
2) cp .config /tmp/.config
3) make mrproper    (to wash your src directories ;-))
4) cp /tmp/.config .config
5) make xconfig    (correct variable multi processing, you need it with hyperthreading)
6) make dep    (you forgot it ?)
7) make clean   (a little wash more)
8) make bzImage   (here is kernel)
9) make modules    (all the .o)
10) make modules_install  (results in /lib/modules/2.4.28smp)
11) cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.28smp
12) cp System.map /boot/System.map-2.4.28smp
13) cd /boot
14) mv initrd-2.4.28smp.img initrd-2.4.28smp.old  (case if next mkinitrd crash)
14) mkinitrd initrd-2.4.28smp.img 2.4.28smp
15) edit grub/grub.conf if you need it (with vmlinuz-2.4.28smp and initrd-2.4.28sp.img)
 
Then, if you still Panic, you have to review "make xconfig"
 
Patrick - rhce


Barry Gamblin <bgamblin@xxxxxxxxxxxx> wrote:
|> 
|> On Fri, 2005-01-07 at 11:29 -0700, Barry Gamblin wrote:
|> > I am trying to build the 2.4.28 kernel from source downloaded from 
|> > kernel.org on a RH9 system. I need to do this because fedora-legacy
|> > has not released a kernel that fixes the latest ELF load 
|> > vulnerability.
|> > 
|> > I've run the make commands
|> > 
|> > make xconfig
|> > make clean
|> > make bzImage
|> > make modules
|> > make modules_install
|> > 
|> > I copied the bzImage file to /boot/vmlinuz-2.4.28 and the 
|> > vmlinux file 
|> > to /boot/vmlinuz-2.4.28. I ran /sbin/new-kernel-pkg --mkinitrd 
|> > 2.4.28.
|> > I added a stanza into /etc/grub.conf to load the new kernel.
|> 
|> Is the above a typo? You copied bzImage and vmlinux to the same file?

Yes I made a typo. I copied bzImage to /boot/vmlinuz-2.4.28smp and 
vmlinux to /boot/vmlinux-2.4.28smp.


|> 
|> > But the system won't boot the new kernel. It gets to the point 
|> > where
|> > it is trying to mount the / filesystem and panics.
|> 
|> You could try posting your grub.conf and the specific error message 
|> you
|> are getting and see if anyone here can help...
|> 
|> -- 
|> C. Linus Hicks 
|> 


Here is /etc/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,2)
# kernel /vmlinuz-version ro root=/dev/hda5
# initrd /initrd-version.img
#boot=/dev/hda3
default=3
timeout=10
splashimage=(hd0,2)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-37.9.legacysmp)
root (hd0,2)
kernel /vmlinuz-2.4.20-37.9.legacysmp ro root=LABEL=/ 
hdc=ide-scsi apic
initrd /initrd-2.4.20-37.9.legacysmp.img
title Red Hat Linux (2.4.20-37.9.legacy)
root (hd0,2)
kernel /vmlinuz-2.4.20-37.9.legacy ro root=LABEL=/ hdc=ide-scsi 
apic
initrd /initrd-2.4.20-37.9.legacy.img
title Red Hat Linux (2.4.20-31.9)
root (hd0,2)
kernel /vmlinuz-2.4.20-31.9 ro root=LABEL=/ hdc=ide-scsi apic
initrd /initrd-2.4.20-31.9.img
title Red Hat Linux (2.4.20-31.9smp)
root (hd0,2)
kernel /vmlinuz-2.4.20-31.9smp ro root=LABEL=/ hdc=ide-scsi apic
initrd /initrd-2.4.20-31.9smp.img
title Red Hat Linux (2.4.28smp)
root (hd0,2)
kernel /vmlinuz-2.4.28smp ro root=LABEL=/ hdc=ide-scsi apic
initrd /initrd-2.4.28smp.img


The last couple of lines I get during boot are:

VFS: Cannot open root device :LABEL=/" or 00:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 00:00

I can boot the 2.4.20-37.9.legacysmp kernel just fine.

Barry

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

		
---------------------------------
 Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail
-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux