LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 04-27-2007, 05:35 AM   #1
nkd
Member
 
Registered: Oct 2006
Location: india
Distribution: fedora 8, ubuntu 10.10
Posts: 318

Rep: Reputation: 34
problem with running mkinitrd for kernel 2.6.20.7


hi every1,
I have been using RHEL4 with kernel 2.6.9 . I have downloaded the 2.6.20-7 tarball and created the bzImage.
I tried running the mkinitrd to create a initrd.img for the kernel . It didnot work and complained that ata_piix.ko could not be found. I have tried looking for the file but only found the ata_piix.c file in the source tree. Obviously it didnot get compiled. I compiled it seperatly and then put it in /lib/modules/2.6.20-7 directory under the kernel/drivers/scsi/ directory. It failed to work. Incidentally, I have a SATA hard disk.
I donot know how to get it going and every time I try booting my new kernel without the initrd , there is a kernel panic. What to do.
 
Old 04-27-2007, 06:10 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
You are using old inaccurate information to compile and 2.6 series kernel. The steps in order are;

make mrproper (the first time you get ready to build a kernel)
make clean (for each retry)
make manuconfig (this is where you make the changes to meet your hardware needs)
make
make menu_install
make install

Nothing more is need, the last command does the work for you to install and update the files required for booting the new kernel.

The default kernel config file for a vanilla kernel does not build a working kernel in many cases. By running 'make oldconfig' before 'make menuconfig' or doing something like;
cp /boot/config-<kernel-version-number> .config will get you close but many things still need to be tweaked with 'make menuconfig'

Also grab and have handy:

http://www.kernel.org/pub/linux/kern...lkn_pdf.tar.gz

This explains building a 2.6 series kernel extremely well, far better then I could in this reply.
 
Old 04-28-2007, 05:36 AM   #3
nkd
Member
 
Registered: Oct 2006
Location: india
Distribution: fedora 8, ubuntu 10.10
Posts: 318

Original Poster
Rep: Reputation: 34
thanks

hi lenard,
thanks for the tip.
I followed it till the make after make menuconfig. But when i ask it to do a make menu_install it quits saying no makefile found. I executed the command from the /usr/src/linux directory. What am I doing wrong ? I however have a vmlinuz and system.map corresponding to the 2.20.6 kernel in the boot directory anyway. I just need the initrd.img file to get it going . Isn't it so ????
bye
nishith
 
Old 04-28-2007, 06:02 AM   #4
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
Quote:
Originally Posted by nkd
hi lenard,
thanks for the tip.
I followed it till the make after make menuconfig. But when i ask it to do a make menu_install it quits saying no makefile found. I executed the command from the /usr/src/linux directory. What am I doing wrong ? I however have a vmlinuz and system.map corresponding to the 2.20.6 kernel in the boot directory anyway. I just need the initrd.img file to get it going . Isn't it so ????
bye
nishith
That should be make modules_install not menu_install.

You will have to create the mkinitrd image by pointing to the relavant modules directory for the new kernel.

mkinitrd <image> <kernel-version>

replace <image> with what you want to name the image, and <kernel-version> with the version of your new kernel.
 
Old 04-28-2007, 07:18 AM   #5
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Yes, thanks SlackDaemon my mistake it is 'make modules_install' and not 'menu_install' (my mind must have taken a breakfor a brief time).

The 'make install' command creates the needed (System.map, initrd-<version_number> and vmlinuz-<version_number) files and updates grub or lilo to boot to this new kernel, the mkinitrd is part of this process and not needed in the Red Hat family.
 
Old 05-01-2007, 01:07 AM   #6
nkd
Member
 
Registered: Oct 2006
Location: india
Distribution: fedora 8, ubuntu 10.10
Posts: 318

Original Poster
Rep: Reputation: 34
still having a problem

thanks guy for the prompt responses.
Yeah i figured that out and ran the make modules && make modules_install too.
All went off well. Then I started the make install
It complained that module ata_piix.ko has not been found continuing anyway. It completed its job and i have all the required files in the /boot dir - system.map, initrd.img and bzImage too. Even the grub gets edited auto. I double checked it anyway !
But when i restart there is a kernel panic and i am still where I was ?!?!?!?!? a old workable kernel.

by the way I am trying this all on a 2.6.9-5 kernel (RHEL 4).

Can't I enable some options in the menuconfig stage to build in the support for ata_piix not to be loaded as a lkm ???

any hope ?
thanks in advance
nishith
 
Old 05-01-2007, 07:42 AM   #7
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Hmmm....... it sounds like your missing something or you have something else configured which is in conflict. I can offer this, you need to carefully edit the 2.6.20.7 kernel .config file to patch this as a replacement section;

Code:
#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=m
CONFIG_BLK_DEV_IDE=m

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=m
# CONFIG_IDEDISK_MULTI_MODE is not set
CONFIG_BLK_DEV_IDECS=m
# CONFIG_BLK_DEV_IDECD is not set
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_IDE_TASK_IOCTL is not set

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=m
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_IDEPNP is not set
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_IDE_ARM is not set
# CONFIG_BLK_DEV_IDEDMA is not set
# CONFIG_IDEDMA_AUTO is not set
# CONFIG_BLK_DEV_HD is not set

#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=m
# CONFIG_SCSI_TGT is not set
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=m
CONFIG_CHR_DEV_ST=m
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=m
# CONFIG_CHR_DEV_SCH is not set

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
# CONFIG_SCSI_SCAN_ASYNC is not set

#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set

#
# SCSI low-level drivers
#
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set

#
# PCMCIA SCSI adapter support
#
# CONFIG_PCMCIA_FDOMAIN is not set
# CONFIG_PCMCIA_QLOGIC is not set
# CONFIG_PCMCIA_SYM53C500 is not set

#
# Serial ATA (prod) and Parallel ATA (experimental) drivers
#
CONFIG_ATA=m
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_SATA_AHCI=m
# CONFIG_SATA_SVW is not set
CONFIG_ATA_PIIX=m
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SX4 is not set
CONFIG_SATA_SIL=m
# CONFIG_SATA_SIL24 is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
# CONFIG_PATA_ALI is not set
CONFIG_PATA_AMD=m
# CONFIG_PATA_ARTOP is not set
CONFIG_PATA_ATIIXP=m
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
CONFIG_PATA_CS5530=m
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
CONFIG_ATA_GENERIC=m
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_MARVELL is not set
CONFIG_PATA_MPIIX=m
CONFIG_PATA_OLDPIIX=m
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PCMCIA is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RZ1000 is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't mkinitrd for Kernel 2.6.11.6 (when compiling) LordOfer Linux - Newbie 3 04-02-2005 11:20 AM
Use mkinitrd to include module in kernel Travers Linux - Newbie 1 07-23-2004 02:35 PM
kernel 2.6.6 mkinitrd problem ziox Linux - Software 0 07-13-2004 07:48 PM
mkinitrd isn't working when compilaing a new kernel citrus Linux - General 6 02-12-2004 06:42 PM
mkinitrd problem - kernel upgrade newbie irvken Linux - Newbie 31 12-23-2003 12:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration