setting a newly compiled kernel to load
i have redhat 9, and need to set the kernel to read (read-only) from ntfs partitions. i used "make xconfig" to make the required adjustmanets, followed by "make dep", "make clean", "make bzImage", and have the newly compiled kernel in the expected folder.
whats next ?!
i tried to dumbly replace the old kernel with the new file,
but after restart the system did not load.
i believe the missing step is the boot loader setup.
in an old linux book i have, they say that the next step should be "make bzlilo",
but i use "grub" not "lilo"
what gives ?!
There should be a file called /boot/grub/grub.conf that will contain the bootloader info (the filename could be different; this is on Gentoo, not RH9). However, try running make modules; make modules_install in your kernel tree.
There shouldn't really be a problem with copying the new kernel over the old one; if the kernel compiled properly everything should just work. The reason you shouldn't copy over it is if you messed up your kernel configuration and the new one doesn't boot, the old one is still there.
On my system I just have symlinks /boot/vmlinux and /boot/vmlinux.old that point to the current and previous kernels, and bootloader choices to switch between them.
There shouldn't really be a problem with copying the new kernel over the old one; if the kernel compiled properly everything should just work. The reason you shouldn't copy over it is if you messed up your kernel configuration and the new one doesn't boot, the old one is still there.
On my system I just have symlinks /boot/vmlinux and /boot/vmlinux.old that point to the current and previous kernels, and bootloader choices to switch between them.
Slow down cowboy.
There are a couple difference in building a kernel between 2.4 and 2.6 and it's important to know what one you are using. Also I noticed that you didn't build your modules. I always build/install modules when I recompile the kernel.
If you have a 2.4 kernel do this.
make dep && make clean && make bzImage && make modules && make modules_install
Type that all on one line then go for a walk, it will take a while.
If you have a 2.6 kernel type:
make && make modules && make modules_install
take same walk advice as above.
Afterwards you have to mount your boot partition (it is unmounted normally right?) and copy the bzImage file there. You will have to add it to grub through some configuration file magic then run some kind of grub updater to update the actual boot loading part. I use lilo and don't know how to do this in grub but I'm sure the steps are the same.
There are a couple difference in building a kernel between 2.4 and 2.6 and it's important to know what one you are using. Also I noticed that you didn't build your modules. I always build/install modules when I recompile the kernel.
If you have a 2.4 kernel do this.
make dep && make clean && make bzImage && make modules && make modules_install
Type that all on one line then go for a walk, it will take a while.
If you have a 2.6 kernel type:
make && make modules && make modules_install
take same walk advice as above.
Afterwards you have to mount your boot partition (it is unmounted normally right?) and copy the bzImage file there. You will have to add it to grub through some configuration file magic then run some kind of grub updater to update the actual boot loading part. I use lilo and don't know how to do this in grub but I'm sure the steps are the same.
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
(you're assuming that he has a separate boot partition, which I guess many RH users don't)
for 2.6 kernels you can just do:
make && make modules_install
and for 2.4:
make dep && make bzImage modules modules_install (I wouldn't bother with make clean, but some people say it's a good idea)
for 2.6 kernels you can just do:
make && make modules_install
and for 2.4:
make dep && make bzImage modules modules_install (I wouldn't bother with make clean, but some people say it's a good idea)
i have kernel 2.4
i have a seperate 100MB ext3 /boot partition
the instructions i use are from a book for
SuSE linux 6.2 with LILO boot-loader,
but i have redhat 9, and use the grub boot-loader :S
and i am a newbie :(
in that book, they have a note that you might need these "makes modules", "make modules_install" only if you specified any modules as loadable (i think i didnot make this)
ok, let me try what u suggested now :D
edit:
i reinstalled linux this time with lilo,
but seems that was not all of the problem.
i think telling you the error message i recieve might help you
understand my problem.
after i copied the bzImage over vmlinuz (sure i made vmlinuz.old)
then ran /sbin/lilo to update it
i restarted, and this message appeared:
VFS: Cannot open root device "LABEL=/" or 00:00
Please appand a correct "root=" boot option
Kernel Panic: VFS: Unable to mount root fs on 00:00
[Edited by - zaidgs on October 29, 2004 9:16:02 AM]
i have a seperate 100MB ext3 /boot partition
the instructions i use are from a book for
SuSE linux 6.2 with LILO boot-loader,
but i have redhat 9, and use the grub boot-loader :S
and i am a newbie :(
in that book, they have a note that you might need these "makes modules", "make modules_install" only if you specified any modules as loadable (i think i didnot make this)
ok, let me try what u suggested now :D
edit:
i reinstalled linux this time with lilo,
but seems that was not all of the problem.
i think telling you the error message i recieve might help you
understand my problem.
after i copied the bzImage over vmlinuz (sure i made vmlinuz.old)
then ran /sbin/lilo to update it
i restarted, and this message appeared:
VFS: Cannot open root device "LABEL=/" or 00:00
Please appand a correct "root=" boot option
Kernel Panic: VFS: Unable to mount root fs on 00:00
[Edited by - zaidgs on October 29, 2004 9:16:02 AM]
Quote: Original post by zaidgs
VFS: Cannot open root device "LABEL=/" or 00:00
Please appand a correct "root=" boot option
Kernel Panic: VFS: Unable to mount root fs on 00:00
Wild guess : you forgot to add support for the filesystem on your root partition.
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
Since you say you are using lilo now post your lilo.conf.
It looks to me like you arn't telling it which drive is your root drive or you don't have support for that filesystem type. However I'm guessing that since your gigantic boot partition is ext3 your root partition probably is too so not support the fs type probably isn't the issue.
Edit: I'm guessing that you need to add a line something like
root=hda3
to lilo.conf.
But I'm no lilo expert and may just be barking up the wrong tree.
It looks to me like you arn't telling it which drive is your root drive or you don't have support for that filesystem type. However I'm guessing that since your gigantic boot partition is ext3 your root partition probably is too so not support the fs type probably isn't the issue.
Edit: I'm guessing that you need to add a line something like
root=hda3
to lilo.conf.
But I'm no lilo expert and may just be barking up the wrong tree.
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
i switched back to grub.
anyways, this does seem to make much difference.
about the file system not being supported, i am just replacing a file in a partition, so i suppose there was no change in file
system
i will post the relevant part of grub.conf:
title Red Hat Linux
root(hd1,1)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
now i replaced that with:
# this entry doesnot work
title Red Hat Linux (new)
root(hd1,1)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
# this entry does work
title Red Hat Linux (old)
root(hd1,1)
kernel /vmlinuz-2.4.20-8.old ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
anyways, this does seem to make much difference.
about the file system not being supported, i am just replacing a file in a partition, so i suppose there was no change in file
system
i will post the relevant part of grub.conf:
title Red Hat Linux
root(hd1,1)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
now i replaced that with:
# this entry doesnot work
title Red Hat Linux (new)
root(hd1,1)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
# this entry does work
title Red Hat Linux (old)
root(hd1,1)
kernel /vmlinuz-2.4.20-8.old ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
Try using
root (hd0,1)
instead.
Edit: Can you post your fstab?
root (hd0,1)
instead.
Edit: Can you post your fstab?
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
fstab:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb4 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hdb5 /mnt/hdC auto auto,owner 0 0
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb4 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hdb5 /mnt/hdC auto auto,owner 0 0
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement