From 4a74a1f483533de6a2ebd5c65d888d1be3995ac3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 14 Mar 2018 22:34:15 +0100 Subject: drop grub workaround, use upstream support for multiple early initrd images This requires grub upstream support for multiple early initrd images: http://git.savannah.gnu.org/cgit/grub.git/commit/?id=a698240df0c43278b2d1d7259c8e7a6926c63112 --- Makefile | 1 - README-dracut.md | 14 +++++++++----- README-mkinitcpio.md | 14 +++++++++----- grub/09_linux | 16 ---------------- 4 files changed, 18 insertions(+), 27 deletions(-) delete mode 100755 grub/09_linux diff --git a/Makefile b/Makefile index 2afdbcf..e4ce4b0 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,6 @@ install-bin: bin/worker bin/ykfde bin/ykfde-cpio $(INSTALL) -D -m0644 conf/ykfde.conf $(DESTDIR)/etc/ykfde.conf $(INSTALL) -d -m0700 $(DESTDIR)/etc/ykfde.d/ $(INSTALL) -D -m0644 conf/gitignore $(DESTDIR)/etc/ykfde.d/.gitignore - $(INSTALL) -D -m0755 grub/09_linux $(DESTDIR)/etc/grub.d/09_linux $(INSTALL) -D -m0644 systemd/ykfde.service $(DESTDIR)/usr/lib/systemd/system/ykfde.service $(INSTALL) -D -m0644 systemd/ykfde-2f.service $(DESTDIR)/usr/lib/systemd/system/ykfde-2f.service $(INSTALL) -D -m0644 systemd/ykfde-worker.service $(DESTDIR)/usr/lib/systemd/system/ykfde-worker.service diff --git a/README-dracut.md b/README-dracut.md index cb1690c..108e2af 100644 --- a/README-dracut.md +++ b/README-dracut.md @@ -123,12 +123,16 @@ Build the initramfs: ### Boot loader -Update your `grub` configuration by running: +Make sure to load the cpio archive `/boot/ykfde-challenges.img` +as an additional initramfs. -> grub2-mkconfig -o /boot/grub/grub.cfg +With `grub` you need to list `ykfde-challenges.img` in configuration +variable `GRUB_EARLY_INITRD_LINUX_CUSTOM` in `/etc/default/grub`: -This will add new boot entry that loads the challenges. With other boot -loaders make sure to load the cpio archive `/boot/ykfde-challenges.img` -as an additional initramfs. +> GRUB_EARLY_INITRD_LINUX_CUSTOM="ykfde-challenges.img" + +Then update your `grub` configuration by running: + +> grub-mkconfig -o /boot/grub/grub.cfg Reboot and have fun! diff --git a/README-mkinitcpio.md b/README-mkinitcpio.md index ca446da..1759d3f 100644 --- a/README-mkinitcpio.md +++ b/README-mkinitcpio.md @@ -127,12 +127,16 @@ Now rebuild your initramfs with: ### Boot loader -Update your `grub` configuration by running: +Make sure to load the cpio archive `/boot/ykfde-challenges.img` +as an additional initramfs. -> grub-mkconfig -o /boot/grub/grub.cfg +With `grub` you need to list `ykfde-challenges.img` in configuration +variable `GRUB_EARLY_INITRD_LINUX_CUSTOM` in `/etc/default/grub`: -This will add new boot entry that loads the challenges. With other boot -loaders make sure to load the cpio archive `/boot/ykfde-challenges.img` -as an additional initramfs. +> GRUB_EARLY_INITRD_LINUX_CUSTOM="ykfde-challenges.img" + +Then update your `grub` configuration by running: + +> grub-mkconfig -o /boot/grub/grub.cfg Reboot and have fun! diff --git a/grub/09_linux b/grub/09_linux deleted file mode 100755 index 5fbef4c..0000000 --- a/grub/09_linux +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -prefix="/usr" -datarootdir="${prefix}/share" -sysconfdir="/etc" -grub_mkconfig_dir="${sysconfdir}/grub.d" - -source "${datarootdir}/grub/grub-mkconfig_lib" - -ykfde-cpio -YKFDE_CHALLENGES="$(make_system_path_relative_to_its_root /boot/ykfde-challenges.img)" - -source "${grub_mkconfig_dir}/10_linux" | sed \ - -e "/\\s*initrd/s|$| ${YKFDE_CHALLENGES}|" \ - -e "/\\s*menuentry/s|menuentry '\\(.*\\)' --|menuentry '\\1 for YKFDE' --|" - -- cgit v1.2.3-54-g00ecf