diff options
author | vitalogy <vitalogy_github@milaw.biz> | 2015-11-01 20:28:25 +0100 |
---|---|---|
committer | vitalogy <vitalogy_github@milaw.biz> | 2015-11-01 20:28:25 +0100 |
commit | 1e65133983f404ea64079df0933dd820619a9b44 (patch) | |
tree | 7bca20982025fa195c4b0cb13d776ebb6b281f58 /sys-boot/systemrescuecd-x86-grub | |
parent | dev-python/elasticsearch-py: follow up edit to doc, man page install (diff) | |
download | gentoo-1e65133983f404ea64079df0933dd820619a9b44.tar.gz gentoo-1e65133983f404ea64079df0933dd820619a9b44.tar.bz2 gentoo-1e65133983f404ea64079df0933dd820619a9b44.zip |
sys-boot/systemrescuecd-x86-grub: new ebuild
Diffstat (limited to 'sys-boot/systemrescuecd-x86-grub')
4 files changed, 136 insertions, 0 deletions
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 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <name>Michael Lange</name> + <email>gentoobugs@milaw.biz</email> + <description>Accepts only mails from Gentoo's Bugzilla</description> + </maintainer> + <maintainer> + <name>Michał Górny</name> + <email>mgorny@gentoo.org</email> + </maintainer> + <longdescription> + This package adds menu entries in GRUB for the SystemRescueCD. You can + add custom bootoptions for SystemRescueCD in a special config file. + </longdescription> +</pkgmetadata> 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" +} |