[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do you make mkinitrd work!?



Shawn McCuan wrote:
This is what i get - but - ive already used make for the modules - -



metion:/home/metiosarius/src/linux-2.6.9# mkinitrd -o /boot/initrd-2.6.9.img 2.6.9

/usr/sbin/mkinitrd: /lib/modules/2.6.9: Not a directory

/usr/sbin/mkinitrd: MODULES needs to be set to none?

metion:/home/metiosarius/src/linux-2.6.9#

[snip]


mkinitrd needs access to your modules. If there are no modules in /lib/modules/<version> you need to install some there to make an initrd. You're sure you typed 'make modules_install' in your kernel source directory? Are you sure you selected any modules? If you built your own kernel, then chances are you don't need an initrd. If your kernel can mount root without needing modules to access your hard disk or root filesystem, then theres no reason to create or use an initrd; it will likely have no modules in it even if you do (who would build their own kernel but neglect to select their hard disk drivers and root filesystem as built-ins?).

If you're sure you need it and have successfully installed some modules, try 'ls /lib/modules' and using the correct directory from the list as your version. If you manage to boot the kernel and for some reason still want an initrd, 'uname -r' will tell you the kernel's version.

For example, my kernel has an EXTRAVERSION of -tyr...

# uname -r
2.6.9-tyr
# mkinitrd -o /boot/initrd.img-2.6.9-tyr 2.6.9-tyr
# ls /boot/initrd.img-2.6.9-tyr
/boot/initrd.img-2.6.9-tyr

However, if you have no modules, you can't make one (it wouldn't very useful even if you could... =) Finally, the 'standard' debian naming for the initrd is initrd.img-<version> not initrd-<version>.img. I didn't realize this during my previous post. I say 'standard' because thats simply what update-grub looks for, the name is mostly irrelevant.

Michael Spang



Reply to: