Linux - GeneralThis 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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
ive just compiled a kernel (2.4.20) and bleieve it is completely ready for use the only problem is i have no initrd.img and dont know what it is or where to get it...i still have one from 2.4.19-9mdk but im assuming this does me no good wiht the new kernel?...so how do i create an initrd.img?
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Initrd stands for INITial Ram Disk. This is a tiny root filesystem that's loaded into the memory for booting systems that need modules that cannot be accessed at boot time otherwise.
You probably wont need an initrd for the kernel if ext3 support is compiled in( as opposed to modules) Assuming you're not using raid/LVM for the root filesystem and if you are you have the necessary options compiled in. If this is the case you may safely boot the kernel without the initrd.
Mandrake is based on RedHat., I hear. See mkinitrd manpage.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Originally posted by watashiwaotaku7 then i most likely dont need one...but when i try to configure lilo it tells me that there is no initrd.img and that it cant continue without one should i just put the old image in to appease it?
Edit lilo.conf and remove the initrd line from under your 'new' kernel image. Then rerun the map installer ( /sbin/lilo )
Yeah but how do you do it? I have a bunch of modules that weren't loaded in my Suse 9.0 kernel 2.6.2 install and I know for a fact that there were loaded when I did use an initrd.
I've been looking for days to try to find a way to make one - I have searched hundreds of Google pages - and its always the same anser. "You probably don't need one". Well I have no network, no sound and no 3D acceleration - which kind of makes me think that maybe I do need one.
If I could work out some other way to load the modules I need at boot time then I guess I would be good to go. But Suse doesn't seem to have a /etc/modules file like debian, nor does it have an ./etc/init.d/Kernel-version file like Gentoo.
I'm beginning to think that this is some kind of big Linux secret only known to true gurus. Lol.
Comeon guys, can you just explain this to me, please?
do you have an /etc/rc.d//rc.modules-this script loads the modules for sound, network cards and agp support-xf86config plus your drivers should get your 3d going-if you're just plugging in a new kernel and have done 'make modules', what you need should be there.
Yea... An initrd.img is pointless.... I dont use one on Redaht or Suse even tho they start you out with one. I've got a custom compiled kernel specific to my machine and I have alot of stuff hard-wired in as well... Your either missing something in your kernel or your not deleting the initrd line from your bootloader config file. Trust me.... Ditch it.
Thanks guys, but SuSe doesn't seem to have an etc/rc.d//rc.modules or rc.local file. Does anybody know how I can get the modules I need to load automatically at boot time in Suse without an initrd? You guys seem to think an initrd is a bad idea so I am happy to try another method.
Any ideas? So far there is no /etc/modules, no /etc/init.d/kernel-version, no /etc/rc.local, no etc/rc.d//rc.modules and nothing else resembling that that I can see. I would be happy to live without an initrd entry - but I do need my drivers to be automatically loaded at boot time so I don't have to modprobe them by hand every time my PC starts.
Recompile your kernel. DO NOT use modules for a file system. Especially not your root file system. That is a really illogical thing to do. I never use modules for important KEY functions. All file systems and devices I hardwire into the kernel. The only thing I use modules for is ipv6 and various other "less important stuff". My kernel image still stays under 1.5mb. If all that is built in, and your kernel config is just the way you want it, do a
make bzImage modules modules_install
move your new System.map and bzImage to your boot folder and readjust your grub or lilo config file. Ditch the initrd line as well... Boot up. (I also move the vmlinux to /boot as well just to keep that stuff together.)
Your kernel will know what modules to load by looking at config files in /lib/modules/uname -r
The answer to the question is:
mkinitrd /boot/initrd-x.y.z x.y.z
Where x.y.z is the kernel version.
Having an initrd is perfectly acceptible. If you choose to build a modular kernel then go ahead, and don't let anyone tell you it is wrong to do. I have a reiserfs filesystem and always build reiserfs as a module with no problems. And yes there are some things that CAN NOT be built into the kernel and therefore require an initrd. The one thing I know of is the pictures for bootsplash require an initrd to pass them to the kernel. The one filesystem you have to build into the kernel is ext2 because the initrd image is made using ext2 filesystem.
Thanks man, I was begining to wonder if making an initrd was some kind of Linux secret - and yes I do want to use bootsplash. The only problem is I did exactly what you said. I opened a command window on the desktop and typed:
where the only thing I changed was the number to represent my initrd and kernel version.
mkinitrd is just a shell script, perhaps you might look through it to see where the problem is occurring. Offhand in my version, I don't see where that message would come from, but I'm using RedHat. One thing to be aware of is that it does a loopback mount of the initrd-2.6.3 file and creates a directory structure under it. It is possible that is what it is referring to.
BTW if you didn't apply the bootsplash patch to the 2.6.3 kernel sources then you won't have bootsplash. The patch is at www.bootsplash.org but it's for 2.6.0-test9. It works for most 2.6.X kernels except you get some errors patching and have to do some of the work by hand. I havent got it to work for 2.6.3 yet.