Ian Pratt
2006-Mar-30 15:48 UTC
RE: [Xen-devel] [RFC][PATCH] create an initrd for dom0 in install.shscript
> I''m guessing that the initrd created for dom0 in general > won''t work for > domU domains. I''m not sure what to do about that.If this is a -xen kernel, we should create a an initrd that can be used by both dom0 and domU, i.e. it has the necessary hardware drivers, but also the front end drivers. Aren''t there various differences between different distro''s mkinitrd routines? What distros will this script work on? [I recall that on various FC versions (FC3?) its necessary to have an upgraded nash to be able to build working initrd''s at all] It would be great to get a version of this script that''s tested on a bunch of different distros. Thanks, Ian> Also my script-fu is weak so even what little is here could > probably be > better. > > Harry. > > # HG changeset patch > # User harry@localhost.localdomain > # Node ID 7d648c1099b21f36de09acf5481122ceaeb1fde4 > # Parent 9239f190736d85933bbe64eca0613c24c07617df > Create an initrd for dom0 in the install script. > > diff -r 9239f190736d -r 7d648c1099b2 install.sh > --- a/install.sh Wed Mar 29 23:11:53 2006 > +++ b/install.sh Thu Mar 30 14:57:57 2006 > @@ -44,6 +44,18 @@ > (cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf - > rm -rf "$tmp" > > +if [ -x "$(which mkinitrd)" ] && [ -x "$(which depmod)" ] && > [ $dst => ''/'' ]; then > + cd $src/lib/modules > + for i in *; do > + echo " - creating initrd-$i.img for dom0" > + depmod $i > + mkinitrd -o $dst/boot/initrd-$i.img $i > + done > + cd - > +else > + echo " - you may need to create an initrd for dom0" > +fi > + > echo "All done." > > echo "Checking to see whether prerequisite tools are installed..." > diff -r 9239f190736d -r 7d648c1099b2 > linux-2.6-xen-sparse/arch/i386/boot-xen/Makefile > --- a/linux-2.6-xen-sparse/arch/i386/boot-xen/Makefile > Wed Mar 29 > 23:11:53 2006 > +++ b/linux-2.6-xen-sparse/arch/i386/boot-xen/Makefile > Thu Mar 30 > 14:57:57 2006 > @@ -19,3 +19,4 @@ > install -m0664 .config > $(INSTALL_ROOT)/boot/config-$(XINSTALL_NAME)$(INSTALL_SUFFIX) > install -m0664 System.map > $(INSTALL_ROOT)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX) > ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) > $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUES > T)$(INSTALL_SUFFIX) > + ln -f -s initrd-$(XINSTALL_NAME)$(INSTALL_SUFFIX).img > $(INSTALL_ROOT)/boot/initrd-$(VERSION).$(PATCHLEVEL)$(XENGUEST > )$(INSTALL_SUFFIX).img > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Harry Butterworth
2006-Mar-30 17:21 UTC
RE: [Xen-devel] [RFC][PATCH] create an initrd for dom0 in install.shscript
On Thu, 2006-03-30 at 16:48 +0100, Ian Pratt wrote:> > I''m guessing that the initrd created for dom0 in general > > won''t work for > > domU domains. I''m not sure what to do about that. > > If this is a -xen kernel, we should create a an initrd that can be used > by both dom0 and domU, i.e. it has the necessary hardware drivers, but > also the front end drivers.OK I''ll give that a go.> Aren''t there various differences between different distro''s mkinitrd > routines? What distros will this script work on?I''ve only tested on ubuntu 64 bit. There has already been some feedback with changes required for SUSE. I''ll put that in. Harry _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Seemingly Similar Threads
- RE: [RFC][PATCH] create an initrd for dom0 in install.shscript
- Re: persistent ssh_host_keys
- [PATCH node] refactor node image recipe
- [PATCH node-image] Working version of Add the ability to use persistent ssh_host_keys on the ovirt-node
- [PATCH node-image] Add ability to set persistent ssh_host_keys on the node, usefull if you run diskless instance of ovirt-node