This is a discussion on Do I need a new initrd? within the Linux Operating System forums, part of the Unix Operating Systems category; --> If I want to compile (and then boot into) a new kernel, is it necessary that I make a ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| If I want to compile (and then boot into) a new kernel, is it necessary that I make a new initrd too? Or can I stick with the (working) initrd that came with my Linux distribution (SuSE 10.3), which has been working just fine? (SuSE 10.3 installed a 2.6.22.5 kernel, and I want to compile a 2.6.25.6. I ask this question because I've tried going with the old initrd and my system hangs almost immediately after I select the new kernel from the grub menu. |
| |||
| On 2008-06-30, strnbrg <strnbrg59@gmail.com> wrote: > > > If I want to compile (and then boot into) a new kernel, is it > necessary that I make a new initrd too? Or can I stick with the > (working) initrd that came with my Linux distribution (SuSE 10.3), > which has been working just fine? (SuSE 10.3 installed a 2.6.22.5 > kernel, and I want to compile a 2.6.25.6. > > I ask this question because I've tried going with the old initrd and > my system hangs almost immediately after I select the new kernel from > the grub menu. Doesn't that answer your question? Of course, if you are compiling a kernel specifically for your machine, you could compile it so that it doesn't need an initrd. |
| |||
| My understanding of what an initrd is, didn't lead me to the immediate conclusion that I needed a kernel-specific initrd. Isn't the initrd just a small root filesystem that contains just enough hard disk drivers to enable loading the real root filesystem? And in that case, it seemed that whatever succeeded in loading my root filesystem with the old kernel would work with the new kernel too. After all, I don't expect to rebuild my *real* root filesystem just to satisfy the new kernel. Moreover, this new kernel I'm having trouble with actually came up (along with the rest of the system) pretty well, when I installed it on an old Linux 2.4-based system. The other thing, to be perfectly honest, is that I'm having no luck making a good initrd, following the instructions in the new kernel howto (http://www.digitalhermit.com/linux/K...ld-HOWTO.html). |
| |||
| strnbrg <strnbrg59@gmail.com> wrote: > If I want to compile (and then boot into) a new kernel, is it > necessary that I make a new initrd too? Or can I stick with the > (working) initrd that came with my Linux distribution (SuSE 10.3), > which has been working just fine? (SuSE 10.3 installed a 2.6.22.5 > kernel, and I want to compile a 2.6.25.6. Kernel modules stored in initrd are specificly for the kernel the initrd was made with, so yep, you'll need to mkinitrd... UNLESS... you compile your kernel with the things required for booting compiled INTO the kernel, rather than as modules. If you do that, you shouldn't need an initrd at all. > I ask this question because I've tried going with the old initrd and > my system hangs almost immediately after I select the new kernel from > the grub menu. It will, none of the modules will work, they're linked to the old kernel. that means no filesystem (ext3), possibly no sata drivers, no framebuffer, etc etc etc... -- | spike1@freenet.co.uk | Windows95 (noun): 32 bit extensions and a | | | graphical shell for a 16 bit patch to an 8 bit | | Andrew Halliwell BSc | operating system originally coded for a 4 bit | | in |microprocessor, written by a 2 bit company, that| | Computer Science | can't stand 1 bit of competition. | |
| ||||
| On 30 Jun, 23:29, Andrew Halliwell <spi...@ponder.sky.com> wrote: > strnbrg <strnbr...@gmail.com> wrote: > > If I want to compile (and then boot into) a new kernel, is it > > necessary that I make a new initrd too? *Or can I stick with the > > (working) initrd that came with my Linux distribution (SuSE 10.3), > > which has been working just fine? *(SuSE 10.3 installed a 2.6.22.5 > > kernel, and I want to compile a 2.6.25.6. > > Kernel modules stored in initrd are specificly for the kernel the initrd was > made with, so yep, you'll need to mkinitrd... > > UNLESS... you compile your kernel with the things required for booting > compiled INTO the kernel, rather than as modules. Doing this for SuSE is awkward: the 'YaST' GUI is absolutely awful about dealing with multiple kernels, especially home-grown kernels, and tends to flush your old kernel when doing RPM kernel updates. I ran into this a lote with SuSE 9.x. |