]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/paks/linux-pae/install.sh
initrd: add early microcode load
[ipfire-2.x.git] / src / paks / linux-pae / install.sh
index 27e665f9243b1e18be7a31b5d23b6843be7957fe..fd71621d5752430293127c70c2a280a0dbcf2053 100644 (file)
@@ -17,7 +17,7 @@
 # along with IPFire; if not, write to the Free Software                    #
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
 #                                                                          #
-# Copyright (C) 2007-2014 IPFire-Team <info@ipfire.org>.                   #
+# Copyright (C) 2007-2016 IPFire-Team <info@ipfire.org>.                   #
 #                                                                          #
 ############################################################################
 #
@@ -42,10 +42,17 @@ function find_partition() {
        return 0
 }
 
+if [ "$(grep "^flags.* pae " /proc/cpuinfo)" == "" ]; then
+       rm -f /opt/pakfire/db/installed/meta-linux-pae
+       /usr/bin/logger -p syslog.emerg -i pakfire \
+               "linux-pae: no pae support found, aborted!"
+       exit 1
+fi
+
 extract_files
 #
 KVER=xxxKVERxxx
-
+ROOT=`find_partition /`
 #
 # Create new module depency
 #
@@ -53,7 +60,7 @@ depmod -a $KVER-ipfire-pae
 #
 # Made initramdisk
 #
-/usr/bin/dracut --force --xz /boot/initramfs-$KVER-ipfire-pae.img $KVER-ipfire-pae  
+/usr/bin/dracut --force --early-microcode --xz /boot/initramfs-$KVER-ipfire-pae.img $KVER-ipfire-pae  
 
 if [ -e /boot/grub/grub.cfg ]; then
        #
@@ -67,6 +74,7 @@ else
        echo "timeout 10"                          > /boot/grub/grub.conf
        echo "default 0"                          >> /boot/grub/grub.conf
        echo "title IPFire (pae-kernel)"          >> /boot/grub/grub.conf
+       echo "  root (hd0)"                       >> /boot/grub/grub.conf
        echo "  kernel /vmlinuz-$KVER-ipfire-pae root=/dev/$ROOT rootdelay=10 panic=10 console=hvc0" \
                                                  >> /boot/grub/grub.conf
        echo "  initrd /initramfs-$KVER-ipfire-pae.img" >> /boot/grub/grub.conf
@@ -74,8 +82,6 @@ else
        ln -s grub.conf $MNThdd/boot/grub/menu.lst
 fi
 
-# request a reboot if pae is supported
-if [ ! "$(grep "^flags.* pae " /proc/cpuinfo)" == "" ]; then
-       touch /var/run/need_reboot
-fi
+# request a reboot
+touch /var/run/need_reboot
 sync && sync
\ No newline at end of file