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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
11-02-2003, 08:47 PM
|
#1
|
LQ Newbie
Registered: Oct 2003
Posts: 14
Rep:
|
How do you make a initrd and vmlinux file?
I just compiled my very own 2.6 test 9 kernel for the first time. However it complains at boot that it needs an initrd file (and I assume a vmlinux file as well). How can I make these files?
|
|
|
11-02-2003, 09:14 PM
|
#2
|
Senior Member
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374
Rep:
|
hm, initrd is part of lilo I believe, did you deleate old one?
if by vmlinux you are refering to kernel image it is in:
/usr/src/linux[or path to kernel source dir]/arch/i386/boot/bzImage that is usually copied to /boot/vmlinuz
that is hopefully helpful.
|
|
|
11-02-2003, 09:40 PM
|
#3
|
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
hold on, as soon as i find the script in genkernel that creates one i'll post it (a gentoo thing)
|
|
|
11-02-2003, 09:45 PM
|
#4
|
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
Code:
initrd() {
ebegin "Creating initrd"
local modc i mods mymod
for modc in storage firewire ataraid pcmcia usb
do
install -d ${TEMP}/kernel-initrd/modules/${modc}
mods=`echo $modc | tr [:lower:] [:upper:]`_MODULES
for i in ${!mods}
do
mymod=`find /lib/modules/${KV} -name "${i}.o"`
if [ -z "${mymod}" ]
then
echo "Warning: ${i}.o not found; skipping..."
continue
fi
cp $mymod ${TEMP}/kernel-initrd/modules/${modc}
done
done
#tweak our storage module settings based on our initrd
cat ${GK_SHARE}/linuxrc | sed -e "s/##STORAGE_MODULES##/${STORAGE_MODULES}/" \
-e "s/##FIREWIRE_MODULES##/${FIREWIRE_MODULES}/" \
-e "s/##ATARAID_MODULES##/${ATARAID_MODULES}/" \
-e "s/##PCMCIA_MODULES##/${PCMCIA_MODULES}/" \
-e "s/##USB_MODULES##/${USB_MODULES}/" \
> ${TEMP}/kernel-initrd/linuxrc
chmod +x ${TEMP}/kernel-initrd/linuxrc
umount ${TEMP}/initrd
if [ $BOOTSPLASH = "yes" ]
then
ebegin "Adding Bootsplash Initrd"
cat ${BOOT_SPLASH_INITRD} >> ${TEMP}/initrd || die
cp -f ${TEMP}/initrd /boot/initrd-${KV}
eend
else
gzip -f -9 ${TEMP}/initrd
mv -f ${TEMP}/initrd.gz /boot/initrd-${KV}
eend
fi
}
i have NO CLUE how this works man, in Gentoo all i have to do is:
genkernel and it compiles the kernel for me (baring i have set the symbolic link /usr/src/linux to point to the kernel source tree) and it also creates and install initrd.
if i want to configure the kernel
genkernel --config
and it adds make menuconfig to the mix so i can configure it. what i have posted is the initrd( ) function from that shell script.
|
|
|
11-02-2003, 09:49 PM
|
#5
|
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
oh, initrd is not part of lilo, it stands for initial root disk and contains some config info for booting. it isnt really needed and in gentoo if you compile your own kernel you wont make one (it even tell you that you will leave the initrd line out of the <brand-name>.conf file (where brand-name is lilo or grub).
so basically, you SHOULDNT need one but i dont know much about the 2.6 kernel.
|
|
|
11-02-2003, 09:49 PM
|
#6
|
Member
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357
Rep:
|
Hi!
I suppose that you use grub. To make initrd file.
->su -
password:******
->mkinitrd /boot/initrd-2.6-xxxx.img 2.6-xxx
The last part [2.6-xxx] refers to /lib/modules/2.6-xxx dir.
The mkinitrd is located in /sbin or /usr/sbin dir [which one?].
But as far as I know the kernel compilation for 2.6 has some command to install all those files (initrd, vmlinuz and the other one [I can't check it now since I'm using windows on public computer]) in the /boot dir.
But the way to make initrd that described above is for 2.4. Is it the same as for 2.6?

|
|
|
11-02-2003, 09:50 PM
|
#7
|
Senior Member
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374
Rep:
|
2.6 does not need one, I use it and have never made one, and there is no reference to it in my lilo, i assumed that it used it if it needed it and left it in the /boot dir.
|
|
|
11-02-2003, 09:59 PM
|
#8
|
Senior Member
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
|
hmm, i'm not sure how to make initrd images, i usually end up doing without them, i'm not sure they're required in fact they support for initial ram disks can even be compiled out of the kernel. as for vmlinuz files, that's done by recompiling the kernel
|
|
|
11-02-2003, 10:08 PM
|
#9
|
Senior Member
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374
Rep:
|
Oh! arent initrd images the splash screen ? like in suse/redhat where it has a background image for lilo?
|
|
|
11-03-2003, 03:00 AM
|
#10
|
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
there is splash stuff in the initrd but it contains some config info. if you compile your own kernel you dont need it.
|
|
|
11-03-2003, 09:30 AM
|
#11
|
Member
Registered: Jul 2003
Location: Bedford, UK
Distribution: Slackware 11.0, LFS 6.1
Posts: 519
Rep:
|
<Oh! arent initrd images the splash screen ? like in suse/redhat where it has a background image for lilo?>
Nope - INITial RamDisk. I think the original point of them was that, when booting linux, the filesystems were first mounted read-only, so the initial ram disk provides a file system where temporary files can be written to, until the filesystems are remounted as read/write.
They don't seem always to be necessary; I've compiled kernels and used them without OK, although I tend to use them by default because Mandrake uses them and, if I compile a kernel and do "make install," it creates an initrd image automatically and tells lilo to use it.
|
|
|
All times are GMT -5. The time now is 02:29 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|