From 1e65133983f404ea64079df0933dd820619a9b44 Mon Sep 17 00:00:00 2001 From: vitalogy Date: Sun, 1 Nov 2015 20:28:25 +0100 Subject: sys-boot/systemrescuecd-x86-grub: new ebuild --- .../files/systemrescuecd.default | 21 +++++++ .../files/systemrescuecd.grub | 65 ++++++++++++++++++++++ sys-boot/systemrescuecd-x86-grub/metadata.xml | 17 ++++++ .../systemrescuecd-x86-grub-0.1.ebuild | 33 +++++++++++ 4 files changed, 136 insertions(+) create mode 100644 sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default create mode 100644 sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub create mode 100644 sys-boot/systemrescuecd-x86-grub/metadata.xml create mode 100644 sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.1.ebuild (limited to 'sys-boot') diff --git a/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default new file mode 100644 index 000000000000..d9b2d0b8db7d --- /dev/null +++ b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default @@ -0,0 +1,21 @@ +# Here you can set custom bootoptions for the SystemRescueCD +# +# You can add for example in a space separated list: +# setkmap=xx: which defines the keymap to load (example: setkmap=de) +# dostartx: load the X.Org graphical environment and launch Xfce +# docache: causes the iso file to be fully loaded into memory +# this requires 400MB of memory to cache everything +# doload=xxx: loads needed kernel modules (example: doload=3c59x,e1000) +# noload=xxx: prevents loading kernel modules +# nomodeset: do not load the Kernel-Mode-Setting video driver +# +# Example: +# SRCD_BOOTOPTIONS="setkmap=de docache dostartx" +# +# For all available bootoptions see: +# http://www.sysresccd.org/Sysresccd-manual-en_Booting_the_CD-ROM +# +# Note: +# After changing this, you must update your grub configuration file, to take effect + +SRCD_BOOTOPTIONS="" diff --git a/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub new file mode 100644 index 000000000000..b69f29888c9a --- /dev/null +++ b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub @@ -0,0 +1,65 @@ +#!/bin/sh +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +. /usr/share/grub/grub-mkconfig_lib + +if [ -r /etc/default/systemrescuecd ] ; then + . /etc/default/systemrescuecd +fi + +# srcd = path of newest link to iso of systemrescuecd, created by the ebuild +# of systemrescuecd-x86 +srcd="/usr/share/systemrescuecd/systemrescuecd-x86-newest.iso" + +longname="SystemRescueCD" +bootops=")" + +if [ ! -z "${SRCD_BOOTOPTIONS}" ]; then + bootops=" with bootoptions)" +fi + +if [ -f "${srcd}" ]; then + + device=$(${grub_probe} --target=device "${srcd}") + path=$(make_system_path_relative_to_its_root "${srcd}") + grub_string=$(prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab) + + gettext_printf "Found %s on %s\n" "${longname}" "${device}" >&2 + onstr=$(gettext_printf "(on %s)" "${device}") + + cat << EOF +submenu "${longname}" --class submenu { + menuentry "${longname} (32bit standard${bootops}" --class rescue { +${grub_string} + set isofile=${srcd} + loopback loop \${isofile} + linux (loop)/isolinux/rescue32 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} + initrd (loop)/isolinux/initram.igz + } + menuentry "${longname} (64bit standard${bootops}" --class rescue { +${grub_string} + set isofile=${srcd} + loopback loop \${isofile} + linux (loop)/isolinux/rescue64 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} + initrd (loop)/isolinux/initram.igz + } + menuentry "${longname} (32bit alternative${bootops}" --class rescue { +${grub_string} + set isofile=${srcd} + loopback loop \${isofile} + linux (loop)/isolinux/altker32 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} + initrd (loop)/isolinux/initram.igz + } + menuentry "${longname} (64bit alternative${bootops}" --class rescue { +${grub_string} + set isofile=${srcd} + loopback loop \${isofile} + linux (loop)/isolinux/altker64 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} + initrd (loop)/isolinux/initram.igz + } +} +EOF + +fi diff --git a/sys-boot/systemrescuecd-x86-grub/metadata.xml b/sys-boot/systemrescuecd-x86-grub/metadata.xml new file mode 100644 index 000000000000..608603ed8f20 --- /dev/null +++ b/sys-boot/systemrescuecd-x86-grub/metadata.xml @@ -0,0 +1,17 @@ + + + + + Michael Lange + gentoobugs@milaw.biz + Accepts only mails from Gentoo's Bugzilla + + + Michał Górny + mgorny@gentoo.org + + + This package adds menu entries in GRUB for the SystemRescueCD. You can + add custom bootoptions for SystemRescueCD in a special config file. + + diff --git a/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.1.ebuild b/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.1.ebuild new file mode 100644 index 000000000000..32f5706c0b58 --- /dev/null +++ b/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="Grub menu entries for the .iso image of systemrescuecd-x86" +HOMEPAGE="http://www.sysresccd.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT=0 +KEYWORDS="~amd64 ~x86" +IUSE="" + +S=${WORKDIR} + +RDEPEND="app-admin/systemrescuecd-x86 + sys-boot/grub" + +src_install() { + exeinto /etc/grub.d + newexe "${FILESDIR}"/systemrescuecd.grub 39_systemrescuecd + + insinto /etc/default + newins "${FILESDIR}"/systemrescuecd.default systemrescuecd +} + +pkg_postinst() { + elog "To add the menu entries for systemrescuecd to grub, you should now run" + elog " grub-mkconfig -o /boot/grub/grub.cfg" + elog "You can set custom bootoptions in /etc/default/systemrescuecd" +} -- cgit v1.2.3-65-gdbad