[Fedora-xen] Slightly off-topic question about Xen+LVM

Richard W.M. Jones rjones at redhat.com
Thu Nov 29 09:51:57 UTC 2007


Aaron Metzger wrote:
> Dale Bewley wrote:
>>> Do I need to make a custom boot/initrd script or am I on the wrong 
>>> track?  Ideas are welcome.
>>
>> Does your initrd contain dm-snapshot.ko?
>>
>> # cat initrd-2.6.21-2950.fc8xen.img | gunzip | cpio -vt | grep snapshot
>> -rw-------   1 root     root        34608 Nov 27 08:43 lib/dm-snapshot.ko
>>
> 
> Dale:
> 
> No, it does not.
> 
> Is the solution as simple as adding it?
> If so, what is the procedure to correctly create/build a custom initrd?

"initrd" is built for you when you install the kernel package.  The step 
  by step process goes something like this:

(1) When the kernel RPM is installed, an RPM script runs (see 'rpm -q 
--scripts kernel'):

   /sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install 
$version

(2) new-kernel-pkg is a shell script which amongst other things runs 
mkinitrd:

   /sbin/mkinitrd --allow-missing -f $initrdfile $version

(3) mkinitrd is also a shell script which probes the current machine and 
decides which drivers the machine needs to boot and mount the root 
filesystem, and combines those drivers and a big shell script together 
into an initrd image.  (Which is a kind of ramdisk available before the 
kernel has finished booting).

The whole thing is a bit crap to be honest ...

Anyway, if you read the mkinitrd script you'll see that if a dm module 
other than 'linear' is used in some dmtable entry (see 'dmsetup table' 
command) then mkinitrd will include the snapshot module, in case it's 
being used.  Actually, on my system mkinitrd appears to be broken so 
that it never probes for anything in the dmtable at all, so maybe 
there's a real bug going on here.

You can run new-kernel-pkg at any time to rebuild initrd, and the 
details above should tell you what's going on.  Do file a bugzilla if 
there is a real problem in mkinitrd script.

Rich.

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-xen/attachments/20071129/08ee4c91/attachment.bin>


More information about the Fedora-xen mailing list