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

Re: Kernel Configuration Question



On 12/23/06 11:25:25AM -0600, Mike Reinehr wrote:
> On Saturday 23 December 2006 09:35, Jim Crilly wrote:
> > On 12/22/06 12:10:41PM -0600, Mike Reinehr wrote:
> > > I hate to answer my own posting but it belatedly has occurred to me that
> > > perhaps it's not possible to mount a root partition using LVM without an
> > > initrd.img. I've booted without an initrd.img before & I've used LVM
> > > before, but not with the root partition as part of the logical volumes.
> > > Yes, no, maybe?
> >
> > That's pretty much it, you need to run the LVM tools (vgchange I think) to
> > scan for and setup the logical volumes. There is no code in the kernel to
> > do that for you so you have to use an initramfs image if your root is on
> > LVM. But why go through all of that trouble to not use one? The only burden
> > it puts on you is to run 'update-initramfs -u -k <kernel-version>' on of
> > the off chance that you change something that also needs to go in the
> > image, normal updates to things like LVM tools, udev, etc should update it
> > for you.
> >
> > Jim.
> 
> Thanks for confirming this. I think I may have read something about this last 
> year when I first researched LVM but then forgot.
> 
> As for not using an initrd.img, long ago I became a confirmed follower of the 
> KISS theory of operations (Keep It Simple, Stupid) and was just trying to 
> pare my kernel of any unnecessary pieces. But, as you say, it's not that much 
> trouble to maintain an initrd.img.
> 

Exactly, it's virtually 0 maintenance unless you're doing really odd, complex
things in your initramfs and even then once you set it up and put the
files under /etc/initramfs-tools/ it'll keep working. A decent example is
this, I setup this box with some dm-crypt block devices and by default the
generic aes module is used, to switch to aes_x86_64 all I had to do
was put the module name in /etc/modules, update my initramfs and reboot, if
they had been compiled in statically I would have been stuck recompiling my
kernel for that. And with the kernel people wanting to push more and more
device discovery and setup to userland it's going to be unavoidable at some
point anyway.

Jim.



Reply to: