Recommend imagemagick
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 47-initramfs
1 #!/bin/sh
2 # Filename:      ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/47-initramfs
3 # Purpose:       Rebuild initramfs in chroot
4 # Authors:       grml-team (grml.org)
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2 or any later version.
7 ################################################################################
8
9 set -u
10 set -e
11
12 echo "Rebuilding initramfs"
13
14 for initrd in "$(basename $target/boot/vmlinuz-*)" ; do
15     if ! $ROOTCMD update-initramfs -k "${initrd##vmlinuz-}" -c ; then
16         echo "Creating fresh initrd did not work, trying update instead:"
17         $ROOTCMD update-initramfs -k "${initrd##vmlinuz-}" -u
18     fi
19 done