]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/scripts/rebuild-initrd
set version in backupiso and also pakfire core to 140
[ipfire-2.x.git] / src / scripts / rebuild-initrd
index 79ec1c36d70b2e9f2ef8f0728db21fa83b0b924d..3dd08dc215f1d68eafb9969018d1dd96105ddd3c 100644 (file)
 # along with IPFire; if not, write to the Free Software                    #
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
 #                                                                          #
-# Copyright (C) 2008 IPFire-Team <info@ipfire.org>.                        #
+# Copyright (C) 2018 IPFire-Team <info@ipfire.org>.                        #
 #                                                                          #
 ############################################################################
 #
 #
-KVER=`uname -r | cut -d"-" -f1`
-ROOT=`grep "root=" /boot/grub/grub.conf | cut -d"=" -f2 | cut -d" " -f1 | tail -n 1`
-echo
-echo Rebuild the Initramdisk ...
-cp -f /etc/mkinitcpio.conf.org /etc/mkinitcpio.conf
-#
-# Made initramdisk
-#
-if [ "${ROOT:0:7}" == "/dev/sd" ]; then
-    # Remove ide hook if root is on sda 
-    sed -i "s| ide | |g" /etc/mkinitcpio.conf
-else
-if [ "${ROOT:0:7}" == "/dev/hd" ]; then
-    # Remove pata & sata hook if root is on hda 
-    sed -i "s| pata | |g" /etc/mkinitcpio.conf
-    sed -i "s| sata | |g" /etc/mkinitcpio.conf
-fi
-fi
-mkinitcpio -k $KVER-ipfire -g /boot/ipfirerd-$KVER.img
+KVER=`uname -r`
+
+dracut --force --early-microcode --xz /boot/initramfs-$KVER.img $KVER