Is lvmcreate_initrd expected to work?
Now that we've solved the pressing oh-my-goodness-my-system-won't-boot problem, I've got a few other questions.
The lvm package comes with the nifty lvmcreate_initrd command...but in my experience it simply doesn't work. While it's especially clever about resolving library dependencies, it seems to ignore the issue of kernel modules.
For instance, I'm running a "reasonably" stock RedHat/SGI 7.2 installation, which means that both SCSI support and the RAID5 module are built as drivers. This means that my initrd needs, minimally:
- scsi_mod
- sd_mod
- xor
- raid5
- lvm-mod
And unfortunately, lvmcreate_initrd doesn't pick up on any of this.
I ended up custom building an initrd around busybox, which provides a flexible pre-boot environment, including access to a shell prompt from within the initrd (which proved extremely useful recently). But obviously, not everybody is going to have the time or experience to do this.
I realize that the root-on-LVM design is fairly bleeding-edge, as these things go, but it is in the FAQ. I suppose the best solution would be for distribution vendors such as RedHat to include LVM support in their own dist-specific 'mkinitrd' type script.
While it would probably be easier to build a custom kernel with all the necessary drivers built in, I'll probably stick with this solution now since I'm fond of my initrd. What are other folks doing?
-- Lars
Quoted 4 lines · Lars Kellogg-Stedman
I ended up custom building an initrd around busybox, which provides a flexible pre-boot environment, including access to a shell prompt from within the initrd (which proved extremely useful recently). But obviously, not everybody is going to have the time or experience to do this.
Could you share some details about your cusrom initrd setup?
I tried to do the same, but always have problmes with
- executing a shell
- continuing boot afterwards
Thanks,
Goetz.
Quoted 1 line
Could you share some details about your cusrom initrd setup?
Goetz,
I've added a section to my LVM web page at
<http://larsshack.freeservers.com/lvm/> detailing my initrd configuration.
If you (or anyone else) has questions about the information there, feel free to email me.
-- Lars
=====
[email protected]
__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
Quoted 7 lines · Lars Kellogg-Stedman
Now that we've solved the pressing oh-my-goodness-my-system-won't-boot problem, I've got a few other questions.
The lvm package comes with the nifty
lvmcreate_initrdcommand...but in my experience it simply doesn't work. While it's especially clever about resolving library dependencies, it seems to ignore the issue of kernel modules.
Yes it does ignore the issue of kernel modules. It's quite hard for lvmcreate_initrd to know just which modules are needed to get the system booted, though I suppose it's possible.
It is recommended that you build the kernel with the drivers needed to mount the root partition compiled in, rather than as modules. I realise this goes against the Red Hat methodology of having everything as a module.
patrick
Quoted 3 lines · Patrick Caulfield
Yes it does ignore the issue of kernel modules. It's quite hard for
lvmcreate_initrdto know just which modules are needed to get the system booted, though I suppose it's possible.
It could do the same thing as mkinitrd does by default (approx):
- check if SCSI drivers are needed (scsi_hostadapter lines in modules.conf), if so add them to initrd and make sure to preload scsi_mod and sd_mod.
- check the current lvm configuration, and if any of the pv's are MD devices, pre-load the appropriate raid[0145] module as well (can determine via /proc/mdstat).
Alternatively, options for specifying modules would work too. :)
Signature · 4 lines
Randomly Generated Tagline: "My spleen is twice the size of a normal human spleen. This isn't such a big deal right now, but after I'm dead ... There's going to be a bidding war." - Dave Foley, Kids in the Hall