Unix Technical Forum

Do I need a new initrd?

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-01-2008, 07:06 AM
strnbrg
 
Posts: n/a
Default Do I need a new initrd?

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-01-2008, 07:06 AM
Bill Marcum
 
Posts: n/a
Default Re: Do I need a new initrd?

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-01-2008, 07:06 AM
strnbrg
 
Posts: n/a
Default Re: Do I need a new 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).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-01-2008, 07:06 AM
strnbrg
 
Posts: n/a
Default Re: Do I need a new initrd?

OK, solved the problem. It wasn't the initrd. It was that I'd failed
to copy over the new /boot/System.map-2.6.25.6.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-01-2008, 07:06 AM
Andrew Halliwell
 
Posts: n/a
Default Re: Do I need a new initrd?

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. |
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-01-2008, 07:06 AM
Nico Kadel-Garcia
 
Posts: n/a
Default Re: Do I need a new initrd?

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:20 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com