[Lunar-commits] <moonbase-core> dracut: Initial import of this initramfs generator

Stefan Wold ratler at lunar-linux.org
Fri Nov 2 09:39:13 CET 2012


commit 815419a7a1e716e5fe6572c3ca437b67e9d2fad2
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Tue, 17 Jul 2012 04:04:43 -0700
URL: https://github.com/lunar-linux/moonbase-core/commit/815419a7a1e716e5fe6572c3ca437b67e9d2fad2

dracut: Initial import of this initramfs generator

- A dracut.plugin is in development with necessary core tool changes to follow
---
  kernel/dracut/BUILD               | +16/-0    
  kernel/dracut/DEPENDS             | +21/-0    
  kernel/dracut/DETAILS             | +23/-0    
  kernel/dracut/PRE_BUILD           | +18/-0    
  kernel/dracut/files/01-lunar.conf | +9/-0     
  5 files changed, 87 insertions(+)

--- /dev/null
+++ b/kernel/dracut/BUILD
@@ -0,0 +1,16 @@
+(
+
+  patch_it $SOURCE2 1 &&
+
+  prepare_install &&
+  make prefix=/usr sysconfdir=/etc install &&
+
+  # Removing modules we don't support
+  rm -rf /usr/lib/dracut/modules.d/{01fips,02fips-aesni,95fcoe,80cms,95dasd,95dasd_mod,95zfcp,95znet} &&
+
+  # We always install this file (which means overwriting)
+  install -m 0644 -g root -o root $SCRIPT_DIRECTORY/files/01-lunar.conf /etc/dracut.conf.d/ &&
+
+  gather_docs HACKING TODO AUTHORS
+
+) > $C_FIFO 2>&1
--- /dev/null
+++ b/kernel/dracut/DEPENDS
@@ -0,0 +1,21 @@
+depends bash
+depends coreutils
+depends cpio
+# Making this systemd only for now (includes udev)
+depends systemd
+depends systemd-sysv
+depends util-linux
+depends gzip
+depends bzip2
+depends xz
+depends kmod
+depends libcap
+
+optional_depends btrfs-progs "" "" "for btrfs filesystem support"
+optional_depends xfsprogs "" "" "for XFS filesystem support"
+optional_depends jfsutils "" "" "for JFS filesystem support"
+optional_depends cryptsetup "" "" "for cryptsetup support"
+optional_depends open-iscsi "" "" "for iSCSI support"
+optional_depends lvm2 "" "" "for Linux Volume Management support"
+optional_depends mdadm "" "" "for software raid support"
+optional_depends rsyslog "" "" "for syslog support"
--- /dev/null
+++ b/kernel/dracut/DETAILS
@@ -0,0 +1,23 @@
+           MODULE=dracut
+          VERSION=020
+           SOURCE=$MODULE-$VERSION.tar.xz
+          SOURCE2=0077-i18n-module-setup.sh-do-not-install-systemd-vconsole.patch
+       SOURCE_URL=http://www.kernel.org/pub/linux/utils/boot/dracut
+      SOURCE2_URL=$PATCH_URL
+ SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
+       SOURCE_VFY=sha1:6bbfdd36bb65bbb5343baca985a6a2043f8bffdd
+      SOURCE2_VFY=sha1:04a75b432e5efe50f77dc6b2b4f54961cb35640e
+         WEB_SITE=https://dracut.wiki.kernel.org/index.php/Main_Page
+          ENTERED=20120715
+          UPDATED=20120715
+            SHORT="Initramfs generator using udev"
+COMPRESS_MANPAGES=off # If we compress them it will mess up an upgrade for this module due to symlinks
+
+cat <<EOF
+Dracut contains tools to generate a bootable initramfs for 2.6 Linux
+kernels or later. Unlike exisiting implementations, dracut try
+hard-code as little as possible into the initramfs. Dracut contains
+various modules which are driven by the event-based udev. Having root
+on MD, DM, LVM2, LUKS is support as well as NFS, iSCSI, NBD with the
+dracut-network package.
+EOF
--- /dev/null
+++ b/kernel/dracut/PRE_BUILD
@@ -0,0 +1,18 @@
+for opt in \
+  CONFIG_BLK_DEV_INITRD \
+  CONFIG_DEVTMPFS \
+  CONFIG_MODULES
+do
+  if ! kernel_option_present $opt; then
+    WARN=1
+    message "${MESSAGE_COLOR}Kernel configuration option is missing: ${PROBLEM_COLOR}$opt${DEFAULT_COLOR}"
+  fi
+done
+if [ -n "$WARN" ]; then
+  message "${MESSAGE_COLOR}Please reconfigure and rebuild your kernel before booting with an initramfs generated by dracut.${DEFAULT_COLOR}"
+  if ! query "Ignore this warning and continue installation?" n ; then
+    exit 1
+  fi
+fi
+
+default_pre_build
--- /dev/null
+++ b/kernel/dracut/files/01-lunar.conf
@@ -0,0 +1,9 @@
+# Dracut config file for Lunar Linux
+# NEVER edit this file, it will be overwritten everytime dracut is
+# installed or upgraded. To override these settings create a new file
+# prefixed with 02- in /etc/dracut.conf.d
+i18n_vars="/etc/vconsole.conf"
+stdloglvl=3
+install_items=" ps "
+omit_dracutmodules+=" network "
+realinitpath=/usr/lib/systemd/systemd




More information about the Lunar-commits mailing list