xen-image: add linux-xen to pakfire database
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 13 Sep 2009 20:51:09 +0000 (22:51 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 13 Sep 2009 20:51:09 +0000 (22:51 +0200)
xen-image: create pygrub menu entry

lfs/xen-image
make.sh

index 3b2199d..d936fe0 100644 (file)
@@ -79,6 +79,20 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        chroot $(MNThdd) /opt/pakfire/tmp/install.sh
        rm -rf $(MNThdd)/opt/pakfire/tmp/*
 
+       #Create grub menuentry for pygrub
+       mkdir $(MNThdd)/boot/grub
+       echo "title IPFire (XEN-Kernel)"           > $(MNThdd)/boot/grub/grub.conf
+       echo "  root(hd0,0)"                      >> $(MNThdd)/boot/grub/grub.conf
+       echo "  kernel /vmlinuz-$(KVER)-ipfire-xen root=/dev/xvda1 rootdelay=10 panic=10 rw" \
+                                                 >> $(MNThdd)/boot/grub/grub.conf
+       echo "  initrd /ipfirerd-$(KVER)-xen.img" >> $(MNThdd)/boot/grub/grub.conf
+       echo "  savedefault 1"                    >> $(MNThdd)/boot/grub/grub.conf
+       ln -s grub.conf $(MNThdd)/boot/grub/menu.lst
+
+       #Copy the meta-info of linux-xen package
+       cp -f /install/packages/meta-linux-xen $(MNThdd)/opt/pakfire/db/installed
+       cp -f /install/packages/meta-linux-xen $(MNThdd)/opt/pakfire/db/meta
+
        #Set default configuration
        echo "LANGUAGE=en" >> $(MNThdd)/var/ipfire/main/settings
        echo "HOSTNAME=$(SNAME)" >> $(MNThdd)/var/ipfire/main/settings
@@ -105,6 +119,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        chroot $(MNThdd) /sbin/mkinitcpio -g /boot/ipfirerd-$(KVER)-xen.img -k $(KVER)-ipfire-xen
        cp -f $(MNThdd)/etc/mkinitcpio.conf.org $(MNThdd)/etc/mkinitcpio.conf
 
+
        # Create a script for rebuild-initrd and setup
        echo "#!/bin/bash"                                   > $(MNThdd)/etc/rc.d/rcsysinit.d/S75firstsetup
        echo "/usr/local/sbin/setup /dev/null INSTALL"      >> $(MNThdd)/etc/rc.d/rcsysinit.d/S75firstsetup
diff --git a/make.sh b/make.sh
index 3308db7..8b6d8ea 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -716,8 +716,10 @@ buildpackages() {
   # Check if there is a loop device for building in virtual environments
   if [ -e /dev/loop/0 ] || [ -e /dev/loop0 ]; then
         cp -f $BASEDIR/packages/linux-xen-*.ipfire $LFS/install/packages/
+        cp -f $BASEDIR/packages/meta-linux-xen $LFS/install/packages/
        ipfiremake xen-image ED=$IPFVER
        rm -rf $LFS/install/packages/linux-xen-*.ipfire
+       rm -rf $LFS/install/packages/meta-linux-xen
   fi
   mv $LFS/install/images/*.bz2 $BASEDIR >> $LOGFILE 2>&1