summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2016-10-05 10:16:20 -0400
committerMike Gilbert <floppym@gentoo.org>2016-10-05 10:22:44 -0400
commitec629c23a6e8cf6c18fa51d69ae11932c7ada3cc (patch)
treee48621769841d29d569d67774511f0211607ac99 /sys-boot
parentsys-libs/libcxx: Require matching libcxxabi version (diff)
downloadgentoo-ec629c23a6e8cf6c18fa51d69ae11932c7ada3cc.tar.gz
gentoo-ec629c23a6e8cf6c18fa51d69ae11932c7ada3cc.tar.bz2
gentoo-ec629c23a6e8cf6c18fa51d69ae11932c7ada3cc.zip
sys-boot/grub: Install an example grub.cfg
Package-Manager: portage-2.3.1_p6
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/grub/files/grub.cfg.example90
-rw-r--r--sys-boot/grub/grub-2.02_beta3-r1.ebuild5
2 files changed, 95 insertions, 0 deletions
diff --git a/sys-boot/grub/files/grub.cfg.example b/sys-boot/grub/files/grub.cfg.example
new file mode 100644
index 000000000000..4c6e46435826
--- /dev/null
+++ b/sys-boot/grub/files/grub.cfg.example
@@ -0,0 +1,90 @@
+# Example configuration for GRUB
+# Much of this example configuration was taken from the GRUB manual.
+
+# Menu timeout
+timeout=5
+
+# Default menu entry
+default=0
+
+# If we have a font available, start graphical output.
+if loadfont unifont; then
+ # Output resolution for GRUB (eg. 1024x768 or 'auto').
+ gfxmode=auto
+
+ # Output resolution for Linux (VESAFB only).
+ # 'keep' means use the same resolution as GRUB.
+ # For other framebuffer drivers, pass a resolution using the video= kernel param.
+ gfxpayload=keep
+
+ # Load all video drivers.
+ insmod all_video
+
+ # Switch to graphical output.
+ terminal_output gfxterm
+fi
+
+# Load modules necessary to find any boot files (/boot).
+
+# Partition table(s).
+insmod part_msdos
+#insmod part_gpt
+
+menuentry "Gentoo Linux 4.7.2" {
+ # Filesystem for /boot
+ #insmod btrfs
+ insmod ext2
+ #insmod xfs
+ #inmod zfs
+
+ # Search all block devices for a matching UUID (for /boot)
+ search --set=root --fs-uuid 33d4013a-ec25-4462-a540-8078aeb8ed17
+
+ # Load a linux kernel, passing the root filesystem and init process as parameters
+ echo "Loading kernel..."
+ linux /vmlinuz-4.7.2 root=UUID=e1fce3ad-d7e4-4e2f-a1f5-537642bbccd5 rootfstype=btrfs init=/usr/lib/systemd/systemd
+
+ echo "Loading initramfs..."
+ initrd /initramfs-4.7.2.img
+}
+
+menuentry "Windows XP" {
+ insmod ntfs
+ search --set=root --label WINDOWS_XP --hint hd0,msdos1
+ ntldr /ntldr
+}
+
+menuentry "Windows 7" {
+ insmod ntfs
+ search --set=root --label WINDOWS_7 --hint hd0,msdos2
+ ntldr /bootmgr
+}
+
+menuentry "FreeBSD" {
+ insmod zfs
+ search --set=root --label freepool --hint hd0,msdos7
+ kfreebsd /freebsd@/boot/kernel/kernel
+ kfreebsd_module_elf /freebsd@/boot/kernel/opensolaris.ko
+ kfreebsd_module_elf /freebsd@/boot/kernel/zfs.ko
+ kfreebsd_module /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
+ set kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd
+ set kFreeBSD.hw.psm.synaptics_support=1
+}
+
+menuentry "Fedora 16 installer" {
+ search --set=root --label GRUB --hint hd0,msdos5
+ linux /fedora/vmlinuz lang=en_US keymap=sg resolution=1280x800
+ initrd /fedora/initrd.img
+}
+
+menuentry "Fedora rawhide installer" {
+ search --set=root --label GRUB --hint hd0,msdos5
+ linux /fedora/vmlinuz repo=ftp://mirror.switch.ch/mirror/fedora/linux/development/rawhide/x86_64 lang=en_US keymap=sg resolution=1280x800
+ initrd /fedora/initrd.img
+}
+
+menuentry "Debian sid installer" {
+ search --set=root --label GRUB --hint hd0,msdos5
+ linux /debian/dists/sid/main/installer-amd64/current/images/hd-media/vmlinuz
+ initrd /debian/dists/sid/main/installer-amd64/current/images/hd-media/initrd.gz
+}
diff --git a/sys-boot/grub/grub-2.02_beta3-r1.ebuild b/sys-boot/grub/grub-2.02_beta3-r1.ebuild
index f54eadba3bde..45fcb9844b62 100644
--- a/sys-boot/grub/grub-2.02_beta3-r1.ebuild
+++ b/sys-boot/grub/grub-2.02_beta3-r1.ebuild
@@ -264,6 +264,8 @@ src_install() {
einstalldocs
+ dodoc "${FILESDIR}/grub.cfg.example"
+
if use multislot; then
mv "${ED%/}"/usr/share/info/grub{,2}.info || die
fi
@@ -275,8 +277,11 @@ src_install() {
pkg_postinst() {
elog "For information on how to configure GRUB2 please refer to the guide:"
elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
+ elog
+ elog "For manual configuration, see /usr/share/doc/${PF}/grub.cfg.example"
if has_version 'sys-boot/grub:0'; then
+ elog
elog "A migration guide for GRUB Legacy users is available:"
elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
fi