文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>编译内核时,initrd的问题

编译内核时,initrd的问题

时间:2009-04-25  来源:gaohp2008

Hello,

I had installed Fedora core 3 (from fedora website) on my Toshiba M45
laptop (with intel processor). It installed correctly, and linux was running fine (except
ethernet,wireless etc..)

The kernel it was using was 2.6.9-1.667

I wanted to upgrade the kernel, so i grabbed source code for
2.6.11.10 from kernel.org. I recompiled the kernel (without any changes)
using make bzImage/modules/modules_install etc..
and placed the new System.map file to /boot/System.map-2.6.11.10
and new bzImage to /boot/vmlinuz-2.6.11.10.

I changed my grub.conf to reflect the changes -
---------------
WInXP
...

root (hd0,1)
kernel /vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.667.img
root (hd0,1)
kernel /vmlinuz-2.6.11.10 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.667.img
-------------------

When i rebooted my system, and try to boot with new kernel,i got Kernel Panic..
Note that the old kernel works fine.

=======================
insmod: error inserting '/lib/scsi_mod.ko' : -1 Invalid module format
ERROR: /bin/insmod exited abnormally!
insmod: error inserting '/lib/sd_mod.ko' : -1 Invalid module format
ERROR: /bin/insmod exited abnormally!
insmod: error inserting '/lib/libata.ko' : -1 Invalid module format
ERROR: /bin/insmod exited abnormally!
insmod: error inserting '/lib/ata_piix.ko' : -1 Invalid module format
ERROR: /bin/insmod exited abnormally!
insmod: error inserting '/lib/jbd.ko' : -1 Invalid module format
ERROR: /bin/insmod exited abnormally!
insmod: error inserting '/lib/ext3.ko' : -1 Invalid module format
ERROR: /bin/insmod exited abnormally!
mkrootdev: label / not found
mount: error 19 mounting ext3
mount: error 2 mounting none
switchroot: mount failed: 22
unmount /initrd/dev failed: 2
kernel panic - not syncing: Attempted to kill init!
=========================

I am not sure if i did something wrong.

Thanks in advance,
Raahi.
AndyGreen 2005-05-24, 09:33 AM CDT You have given your new kernel the initrd from the old one in grub.conf.... peters 2005-05-24, 09:36 AM CDT Simple. You'll notice in your grub.conf line for that new kernel

kernel /vmlinuz-2.6.11.10 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-1.667.img

You will have to make a new initrd for your new kernel, you can't mix up initrd's and kernel images, each initrd consists of modules copied from the kernel that needs them. Use mkinitrd . There are many docs on that procedure. Reply if you can not find them.

HTH
raahi108 2005-05-24, 10:23 AM CDT Thanks Andy and peters.
It solved the problem real quick!
imdeemvp 2005-05-24, 10:46 AM CDT No offense but that was simple.... raahi108 2005-05-24, 11:11 AM CDT I am sorry for my limited knowledge..

i am new to kernel compiling & installing linux in general..

i browsed through the web and at most of the places
i didn't see they mentioning to make a new initrd (only system.map and vmlinuz) ..
http://www.linuxplanet.com/linuxplanet/tutorials/202/1/
http://www.kernelnewbies.org/faq/

so i thought invoking old initrd would be fine..

---------------

As a side question, when i try to upgrade my packages using Up2date, it still recognizes that
i am using old kernel (2.6.9) rather than 2.6.11.10 ...
I compiled the kernel using make bzimage/modules/modules_install and not using rpm. Is it due to this that the Up2date isn't able to recognize my new kernel?

Since i have already installed the new kernel, is it possible that i just download an rpm for 2.6.11.10 and Up2date would recognize it? or do i have to start over again to compile using rpm?

Thanks a lot in advance.
peters 2005-05-24, 11:55 AM CDT Is there something wrong and/or missing from the kernel that is making you recompile it?? The newest kernel available is at http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/i386/kernel-2.6.11-1.27_FC3.i586.rpm

Do you have a reason for compiling your own? Are you not aware of the yum update system?
AndyGreen 2005-05-24, 11:56 AM CDT Yes, RPM is blissfully unaware of anything you do outside of RPM.

What caused you to recompile the kernel? 4K stacks?
peters 2005-05-24, 12:10 PM CDT Wait, I think I know what you are looking for. Modules and support for wireless cards..

Please have a look at the Dag Apt repository.

http://dag.wieers.com/home-made/apt/packages.php

If you can, you can use it as a Yum source for RPMs, or download them manually and install them.

Search on that page for "kernel-module-", there are many installable wireless drivers.
raahi108 2005-05-24, 12:15 PM CDT My ethernet wasn't working.. The vendor for the ethernet driver required either to recompile the driver with kernel or install as a loadable module. I was trying to make it an loadable module using 2.3.6.9-677 kernel, but it failed with some errors (inline fn call etc..).
So i tried to get hold of 2.3.11.10 (using windows login /vfat partition) and see if it worked with the driver installation.

I was confused whether recompiling would be required for the driver installation to work, so just to be on safe side i recompiled it and then tried to install the ethernet driver as a loadable module, and it worked.

Now since my ethernet is working, i wanted to download all updates. But since i recompiled manually, its still seeing that i am running old ver of kernel. I will download the kernel rpms tonight and fix it.

Thanks for all your help!!
raahi108 2005-05-24, 12:38 PM CDT Thanks peters for the link..

Yes, configuring wireless as well as other peripherals is my next step:)-
The link will be really useful..
相关阅读 更多 +
排行榜 更多 +
利星行服务

利星行服务

购物比价 下载
最后一夜

最后一夜

角色扮演 下载
财会学堂

财会学堂

学习教育 下载