2 # Filename: /etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs
3 # Purpose: configure live-initramfs and build initramfs for booting
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@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 # Latest change: Sun Dec 16 19:11:33 CET 2007 [mika]
8 ################################################################################
12 cp /etc/grml/fai/live-initramfs/live.conf $target/etc/live.conf
13 cp /etc/grml/fai/live-initramfs/grml-script.init-top "$target/usr/share/initramfs-tools/scripts/init-top/grml"
15 FILE=$(ls -1 $target/boot/vmlinuz-* 2>/dev/null| sort -r | head -1)
16 KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}")
18 # make sure mdadm isn't executed in initrd:
19 #if [ -f "$target"/etc/default/mdadm ] ; then
20 # sed -i "s/START_DAEMON=.*/START_DAEMON=false/" "$target"/etc/default/mdadm
21 # sed -i "s/INITRDSTART=.*/INITRDSTART=none/" "$target"/etc/default/mdadm
24 if [ -z "$KERNELVERSION" ] ; then
25 echo "Error: No kernel found, can not create initramfs. Exiting.">&2
29 if [ -f $target/usr/share/initramfs-tools/scripts/live ] ; then
30 $ROOTCMD update-initramfs -c -t -k $KERNELVERSION
32 echo "Error: live-initramfs does not seem to be present, can not create initramfs. Exiting.">&2
36 ## END OF FILE #################################################################
37 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3