Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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 had a coupla questions.
ok, so im tryin to apply the 2.4.22pre6 patch.
i currently am on the 2.4.20-13.8 kernel.
1. do i need to install the 2.4.21 (which is the
latest stable release), to apply the patch.
if not, i get an error while applying the patch.
2. i tried compiling the 2.4.21 kernel, and when i
reboot it, it gives me an error saying "unable to
mount root".
do u know what could have gone wrong while i was
compiling it? i had done a :
a. make oldconfig
b. make dep
c. make modules
d. make modules_install
e. cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.0
f. cp System.map /boot/System.map-2.4.0
g. mkinitrd /boot/initrd-2.4.21.img 2.4.21
then edited the /etc/grub.conf to have this:
title Red Hat Linux (2.4.21)
root (hd0,2)
kernel /boot/vmlinuz-2.4.21 ro root=LABEL=/
hdc=ide-scsi
initrd /boot/initrd-2.4.21.img
can anyone tell me where and what could have gone wrong above? or if there is more for me to do?
hi, thnx for ur prompt reply.
ok, now when i do a "make oldconfig", i assumed it would keep the config from my existing kernel, and proceed.
so, i kept hitting enter at most prompts thinking it would be ok.
in my /usr/src dir :
a. bzip2 -dc /tmp/rajesh/linux-2.4.21.tar.bz2 | tar xvf -
b. bzip2 -dc /tmp/rajesh/patch-2.4.22-pre7.bz2 | patch -p1
c. cp ../linux-2.4/.config .
d. make oldconfig
e. make dep
f. make modules
g. make bzImage
h. make modules_install
i. cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.21
j. cp System.map /boot/System.map-2.4.21
k. mkinitrd /boot/initrd-2.4.21.img 2.4.21
this is what i "observed" during the above steps:
[a-f] : went through with no problems
g : i got some warnng like :
tools/build -b bbootsect bsetup compressed/bvmlinux.out CURRENT > bzImage
Root device is (3, 3)
Boot sector 512 bytes.
Setup is 2540 bytes.
System is 1393 kB
warning: kernel is too big for standalone boot from floppy
make[1]: Leaving directory `/usr/src/linux-2.4.21/arch/i386/boot'
i dont know if that is to make any difference.
[h-k] : went ok.
now, when i go into the /boot dir, i see :
a. vmlinuz-2.4.21
b. System.map-2.4.21
c. initrd-2.4.21.img
i notice that the initrd-2.4.21.img file is about half the size of the initrd of the previous kernels.
then i edit the /etc/grub.conf to be:
title Red Hat Linux (2.4.21)
root (hd0,2)
kernel /boot/vmlinuz-2.4.21 ro root=LABEL=/ hdc=ide-scsi
initrd /boot/initrd-2.4.21.img
title Red Hat Linux (2.4.20-13.8)
root (hd0,2)
kernel /boot/vmlinuz-2.4.20-13.8 ro root=LABEL=/ hdc=ide-scsi
initrd /boot/initrd-2.4.20-13.8.img
and i reboot.
ok, so it initializes the devices and then goes into a kernel panic saying it cannot mount root filesystem.
my questions are:
1. does that warning i see after 'make bzImage' make any difference?
2. when i do the 'make oldconfig', and it asks the questions, can i keep hitting 'enter' thinking i have moved the old .config into this dir before running make, and it would keep that config?
3. how do i check to see if ramdisk support is included? and shouldnt it be a moot point if im using the old .config?
4. when i reboot, and see the kernel panic, is there anyway i can restart without pulling the plug out?
5. and is there anything i should do in /sbin/grub? (im just guessing)
been thro everything online and all the docs, but i cant seem to find much on troubleshooting this. most of them are just docs on how to do it!
If you get through with only warnings, your generally OK- if things are really amiss, it will error out.
I've found it best not to compile kernels as root in /usr/src.
What I do is this:
1.Download 2.4.21.bz2 to it's own directory in /home, and extract it there.
2. Cd to the linux-2.4.21 directory,do make mrproper, then put the .bz2 patch inside the linux-2.4.21 directory, and in a console, still as user, issue:
bzip2 -dc patchxxxx.bz2 | patch -p1
Check the toplevel Makefile extraversion line- it should reflect the patch version- if not, call it = -whatever, to differentiate it from any other kernel on the system.
3. Then you can make xconfig, and load your saved config file into xconfig, and make any edits you need. (Don't do make oldconfig- it's easier to load a copied config file, and then edit in xconfig). If you need ramdisk support, just set it as "y." Save, and exit xconfig.
4.Then do make dep, make clean, and make bzImage, and make modules.
5. su to root, and do make modules_install.
6. Don't do make install!
Instead, copy manually System.map and bzImage, naming them to what the kernel version is. Just make sure it isn't the same as an already installed kernel. I don't use an initrd, but I don't have any scsi drives, so it's OK.
7. Edit, and run lilo, or edit grub. Check lib/modules and /boot to be sure all is correct. reboot, and select the new kernel.
hey - thanks for the reply.
tried it, but i get the same error - kernel panic.
someone pointed this out to me :
Q: My system memory is not fully detected, or the computer hangs shortly after starting with the message "Panic: cannot mount root file system"!
A: Some boards apparently report the usable memory size incorrectly to the Linux kernel. Solution: specify the system memory size as an additional "knoppix" boot option. For example, for 128 Megabytes use
knoppix mem=128M
(Note: make certain an upper-case M is typed after the memory size!)
now, this is using knoppix.
is there an equivalent place/file i can edit to do the above on redhat8?
Whenever I attempt to change a lot of kernel settings I get the same thing. For this reason I have only been able to successfully compile kernels that have just the processor type reset, and nothing else. Every time I edit the modules something messes up and I get the kernel panic you described. Probably adding a patch is similar.
The problem is that some modules are being skipped over in the compilation process. To get all the modules properly made you have to do some pretty fancy stuff (IE the nohup options etc.), which I've never been able to master.
Also, that warning about the kernel being too big to fit on a floppy doesn't really mean that it's not a good kernel.
ok, all the settings are done during the "make xxxconfig" right?
now, no matter what i do "make old/x/...config", i get asked the same questions.
even if i do a make xconfig, and load the config file from my prev kernel version, and follow the steps, i get the error.
if i do a "make oldconfig", i get asked questions on cmd-line, and its even more annoying, cos here i am thinking it will just compile usin the config from the already running kernel.
this is soo annoying!
and umm, u wudnt know if theres an equivalent to the knoppix thingie on RH, wud ya?
It works on Mandrake. Maybe it will also work on RedHat.
But I do not think a small configuration problem would interfere with your kernel compiling. Maybe you should try to weather through the almost baffling Kernel-HOWTO on http://www.linux.org. It's not for the feint of heart though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.