LinuxQuestions.org
Help answer threads with 0 replies.
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 03-10-2004, 01:58 PM   #1
lyonsd
Member
 
Registered: Mar 2004
Location: Flowery Branch, GA
Distribution: FC3, FreeBSD 5.3, Solaris 10
Posts: 43

Rep: Reputation: 15
making an initrd file


I download the source for the 2.6.3 kernel and compiled a kernel using these instructions, which basically involves the following commands:

make mrproper
make config
make bzImage
make modules
make modules_install

According to the instructions:

Quote:
n initrd image is needed for loading your SCSI module at boot time. If you do not need an initrd image, do not make one and do not edit lilo.conf to include this image.

The shell script /sbin/mkinitrd can build a proper initrd image for your machine if the following conditions are met:

The loopback block device is available.

The /etc/conf.modules file has a line for your SCSI adapter; for example:

alias scsi_hostadapter BusLogic


To build the new initrd image, run /sbin/mkinitrd with parameters such as this:

/sbin/mkinitrd /boot/newinitrd-image 2.2.15-2.5.0sjs
I had no /etc/conf.modules file, but when I installed RH9 there was an initrd file. And when I installed an RPM for 2.4.20-30.9 kernel, an initrd file was present too.

So first I tried commenting out the initrd line for the new kernel, and in paniced on boot. something about ROOT=

so I built an initrd file using the following command:

/sbin/mkinitrd /boot/newinitrd-image 2.6.3

Then renamed the file to initrd-2.6.3 and edited my grub.conf

And it paniced on boot.

NOTE: the initrd file I built was significantly smaller than the two initrd files associated with the two previous kernels. So what am I doing wrong in building this initrd?

Do I need /etc/conf.modules file with this line:

alias scsi_hostadapter BusLogic

Do I need that exact line? Or what else should I put for "BusLogic"? Where do I find out?

Thanks
 
Old 03-10-2004, 02:35 PM   #2
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 47
"/etc/conf.modules"
I think that's a typo. It is /etc/modules.conf.
Edit: Also, making a monolithic kernel and doing away with the initrd mat be easier (see howto you posted).

Last edited by aaa; 03-10-2004 at 02:38 PM.
 
Old 03-10-2004, 03:53 PM   #3
lyonsd
Member
 
Registered: Mar 2004
Location: Flowery Branch, GA
Distribution: FC3, FreeBSD 5.3, Solaris 10
Posts: 43

Original Poster
Rep: Reputation: 15
cat /etc/modules.conf

alias eth0 pcnet32
alias usb-controller usb-uhci


No SCSI in there.
 
Old 03-11-2004, 07:01 AM   #4
lyonsd
Member
 
Registered: Mar 2004
Location: Flowery Branch, GA
Distribution: FC3, FreeBSD 5.3, Solaris 10
Posts: 43

Original Poster
Rep: Reputation: 15
Well, I've built a 2.6 kernel three times. The first two times I did a make xconfig and customized it. It paniced on boot. The third time I built a "default" kernel using make oldconfig and it paniced as well.

I also did a make install as the last step to let the system build an initrd file. And I'm thinking the initrd file is where the problem lies.

Whether I build the initrd file myself or do it via make install, it is quite a bit smaller than the existing initrd files I have for my 2.4 kernels.

Is there a pre-built generic 2.6 kernel and initrd file that I can download somewhere? At kernel.org it appears all I can get is the source.

Last edited by lyonsd; 03-11-2004 at 07:02 AM.
 
Old 03-14-2004, 06:26 AM   #5
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
You only need initrd if your boot device is scsi and you build scsi support as a module. Or if you have a boot filesystem such as reiserfs and you build reiserfs as a module. To use initrd you must have loopback device support built into the kernel. Also I have found that it requires ext2 filesystem support built into the kernel also.
Quote:
Do I need /etc/conf.modules file with this line:

alias scsi_hostadapter BusLogic
You only need that if you actually have a BusLogic scsi controller. If your hard drive is IDE and you have root filesystem support built into your kernel then you probably don't need initrd file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to use initrd for making RAMdisk Boudewijn Debian 1 12-08-2004 03:34 AM
making kernel RPM. does not make initrd file mindcry Linux - Software 5 08-12-2004 10:20 PM
SMP initrd file can created after installation atlantislcs Red Hat 0 06-28-2004 07:07 PM
How do you make a initrd and vmlinux file? britishnemesis Linux - General 10 11-03-2003 09:30 AM
Initrd-x.x.x-x.img File bas12547 Linux - Software 1 07-05-2003 07:47 AM

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

All times are GMT -5. The time now is 02:31 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