Hi,
When generating a initrd for a system with the root directory on LVM, it seems that I have to specify (1) the root kernel boot parameter and (2) the -d option to mkinitrd.
I don’t really understand this. Why do I need to specify the root device in two places?
Also, when generating an mkinitrd for a system from another system, this other system checks the existence of the root device. Can I somehow avoid this check so that I don’t have to artificially create a device with the same name on this other system?
Cheers
Erik
You don’t mention which version of OS you’re running.
Odd, because the root device used to be specified (sometimes patched into kernel with old LVM may be version 1), in old times to solve a chicken & egg problem, to get min, maj device numbers before /dev was mounted, but that became unecessary (I think) in 2.4 days.
I was told now that 11.1 is using udev rules for running system, to determine what modules were required to boot.
So specifiying the root device, may help it determine what is needed when moving to LVM. Your finding could explain why I mkinitrd actually lost an LVM based system, though copying in the initrd previously made did boot the LVM based root. Though that suggests a bug in the script which has been redeveloped.
Having a way of specifying the root filesystem ‘/’ is useful for installers or recovery from a live CD, where your ‘/’ may very well be ‘/mnt’ or somethign else.
Forgot to say that I’m running 11.1.
I am just curious why I would need to specify the -d option to mkinitrd. It really doesn’t boot when I don’t specify this option (waiting for /dev/system/root to appear…).
It would really be useful if I could generate an initrd just by specifying the lvm2 feature (-f lvm2). Also, it would be good if it would not actually check the root volume or if I could avoid this check. That would at least allow me to generate one generic initrd that I can use on different machines.
Cheers
Erik