Add (py)grub entry for xen kernel

removed old linux25 installfiles
This commit is contained in:
Arne Fitzenreiter
2009-09-10 23:49:31 +02:00
parent 2a69bb4445
commit 4411715afa
3 changed files with 8 additions and 13 deletions

View File

@@ -24,7 +24,7 @@
. /opt/pakfire/lib/functions.sh
extract_files
#
KVER=2.6.25.18
KVER=2.6.27.31
ROOT=`grep "root=" /boot/grub/grub.conf | cut -d"=" -f2 | cut -d" " -f1 | tail -n 1`
MOUNT=`grep "kernel" /boot/grub/grub.conf | tail -n 1`
# Nur den letzten Parameter verwenden
@@ -37,26 +37,21 @@ let ENTRY=$_+1
#
# backup grub.conf
#
cp /boot/grub/grub.conf /boot/grub/grub-backup-$KVER.conf
cp /boot/grub/grub.conf /boot/grub/grub-backup-$KVER-xen.conf
#
# Add new Entry to grub.conf
#
echo "" >> /boot/grub/grub.conf
echo "title IPFire alternative Kernel:$KVER" >> /boot/grub/grub.conf
echo "title IPFire Xen-Kernel:$KVER" >> /boot/grub/grub.conf
echo " root (hd0,0)" >> /boot/grub/grub.conf
echo " kernel /vmlinuz-$KVER-ipfire root=$ROOT rootdelay=10 panic=10 $MOUNT" >> /boot/grub/grub.conf
echo " initrd /ipfirerd-$KVER.img" >> /boot/grub/grub.conf
echo " kernel /vmlinuz-$KVER-ipfire-xen root=$ROOT rootdelay=10 panic=10 $MOUNT" >> /boot/grub/grub.conf
echo " initrd /ipfirerd-$KVER-xen.img" >> /boot/grub/grub.conf
echo " savedefault $ENTRY" >> /boot/grub/grub.conf
#
# Made initramdisk
#
mkinitcpio -k $KVER-ipfire -g /boot/ipfirerd-$KVER.img
#
# ReInstall grub
#
grub-install --no-floppy ${ROOT::`expr length $ROOT`-1}
mkinitcpio -k $KVER-ipfire-xen -g /boot/ipfirerd-$KVER-xen.img
#
# Create new module depency
#
depmod -a $KVER-ipfire
depmod -a $KVER-ipfire-xen

View File

@@ -23,4 +23,4 @@
#
. /opt/pakfire/lib/functions.sh
remove_files
mv -f /boot/grub/grub-backup-2.6.25.*.conf /boot/grub/grub.conf
mv -f /boot/grub/grub-backup-2.6.27.*.-xen.conf /boot/grub/grub.conf