Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
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.
I seem to have succesfully recomplied my kernel, everything that should be in /boot is there... the only thing I don't know how to do now is boot with the new kernel. Can someone help me out with that please? I'm using Red Hat 8.0. In case anyone's curious, I was following the instructions of leo laporte at the techtv site. Since this is my first post, I can't post a URL, so just go to the screensavers website and do a search for "linux kernel" and it's the second one on the list.
Nah, I don't understand what you mean. I ran the command "make bzImage"... I've already copied the kernel image to boot, but I don't know how to edit the grub.conf file so it boots the new kernel instead of the old.
Well actually, two parts are obvious. First I should change my title to my new kernel version (duh). Second, I should change the line "kernel /vmlinuz-<kernelversion>" to the new image I want to boot to.
This concerns me though, I would think I'd also have to change the line that start with "initrd /initrd-<kernelversion>"... however, there's no other file to match my kernel version. There is initrd-2.4.18-14, but I need one that is initrd-2.4.21. Did I forget to do something?
initrd is only for loading scsi modules... the original kernel is compiled with scsi modules thus an initrd image is compiled and included in boot...
it is very easy to boot the new kernel. ignore everything in /boot, including vmlinux-x.x.x, vmlinuz, initrd.x.x.x etc... all you care about is bzImage, that is the new kernel you compiled. now you can certainly re-name it vmlinuz-2.4.21 or whatever the kernel version is, but that's not necessary. ok, so bzImage is in /boot, and you need to tell grub to load this kernel...
so assuming that grub is installed on the master boot record of hd0, make this your grub.conf file, and the new kernel will boot:
# grub.conf
# i am assuming that (hd0,0) which is hda1 is your /boot partition
# and that your / partition is /dev/hda3, and the master boot
# record is installed on hda, which is (hd0)
title linux, kernel version 2.4.21
root (hd0)
kernel (hd0,0)/bzImage root=/dev/hda3
note: if you are using a scsi module, you need to configure initrd, if you don't have scsi at all and are still using a scsi module consider re-compiling your kernel to exclude it...
i'll be watching this thread if you need more help...
Here's my error message that I got when I tried to boot my kernel after changing editing grub.conf
ds: no socket drivers loaded!
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
/boot/grub/grub.conf (original grub file)
# 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,1)
# kernel /vmlinuz-version ro root=/dev/hda3
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-14)
root (hd0,1)
kernel /vmlinuz-2.4.18-14 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.18-14.img
title DOS
rootnoverify (hd0,0)
chainloader +1
What do you mean by partition table? are you asking what partitions are on my hdd's?
/dev/hda
hda1 - FAT32
hda2 - ext3
hda3 - ext3
hda4 - extended
hda5 - swap
/dev/hdb
hdb1 - ntfs
people tend to get alot of errors the first time a freshly compiled kernel is reboot.
what did you change to get it to boot?
oh and to view errors use:
dmesg | less
or just view the file: /var/log/dmesg which is the boot log...
and you might want to check on /etc/modules.conf which tends to generate alot of errors...
if all else fails try re-compiling the kernel and pay special attention to all the drivers you include as well as the modules you include, and make sure to save your kernel compile config file, which is: /usr/src/linux-2.4.21/.config
Originally posted by asc3ndant people tend to get alot of errors the first time a freshly compiled kernel is reboot.
what did you change to get it to boot?
I got an idea after I saw another grub.conf, I'm not sure if it was from a message board or from a tutorial i was looking at... but anyway, I added another choice in the grub.conf file. I added the lines:
title Red Hat Linux (2.4.21)
root (hd0,1)
kernel /kernel-2.4.21 ro root=/dev/hda3 hdd=ide
initrd /initrd-2.4.21.img
Yes, I also made an initrd image, just because I wasn't sure if i had made any modules that needed to be loaded for the kernel to be initialized (i just wanted to be on the safe side).
Anyway, I did get it to boot, and thanks asc3ndant for posting the dmesg | less command, that was quite interesting, but it's not quite what I wanted. I was looking for just about everything *after* the dmesg log. I wanted to see what services the kernel tried to start, which passed, and which failed.
I suppose I'll try recompiling my kernel for the 3rd time or so...
wish me luck all
P.S. If anyone would like to talk to me directly, my AIM is "Buffered Asprin"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.