Blame SOURCES/0051-Add-tests-for-btrfs-support.patch

cca0c4
From e35dee09e4b7446651dfa5b231328e52ce4f8918 Mon Sep 17 00:00:00 2001
cca0c4
From: Gene Czarcinski <gczarcinski@gmail.com>
cca0c4
Date: Mon, 9 Jun 2014 21:11:37 -0400
cca0c4
Subject: [PATCH 51/55] Add tests for btrfs support
cca0c4
cca0c4
The tests performed are:
cca0c4
- add kernel with /boot on btrfs subvol (20)
cca0c4
- update kernel/add initrd with /boot on btrfs subvol (21)
cca0c4
- add kernel with rootfs on btrfs subvol and /boot a directory (22)
cca0c4
- update kernel/add initrd with rootfs on btrfs subvol and
cca0c4
  /boot a directory (23)
cca0c4
- add kernel and initrd with /boot on btrfs subvol (24)
cca0c4
- add kernel and initrd with rootfs on btrfs subvol and /boot
cca0c4
  a directory (25)
cca0c4
---
cca0c4
 test.sh                               |  40 +++++++
cca0c4
 test/grub2-support_files/g2.20-mounts |   2 +
cca0c4
 test/grub2-support_files/g2.21-mounts |   1 +
cca0c4
 test/grub2-support_files/g2.22-mounts |   1 +
cca0c4
 test/grub2-support_files/g2.23-mounts |   1 +
cca0c4
 test/grub2-support_files/g2.24-mounts |   1 +
cca0c4
 test/grub2-support_files/g2.25-mounts |   1 +
cca0c4
 test/grub2.20                         | 126 ++++++++++++++++++++++
cca0c4
 test/grub2.21                         | 140 +++++++++++++++++++++++++
cca0c4
 test/grub2.22                         | 128 +++++++++++++++++++++++
cca0c4
 test/grub2.23                         | 143 +++++++++++++++++++++++++
cca0c4
 test/grub2.24                         | 126 ++++++++++++++++++++++
cca0c4
 test/grub2.25                         | 128 +++++++++++++++++++++++
cca0c4
 test/results/add/g2-1.20              | 140 +++++++++++++++++++++++++
cca0c4
 test/results/add/g2-1.21              | 141 +++++++++++++++++++++++++
cca0c4
 test/results/add/g2-1.22              | 143 +++++++++++++++++++++++++
cca0c4
 test/results/add/g2-1.23              | 144 ++++++++++++++++++++++++++
cca0c4
 test/results/add/g2-1.24              | 141 +++++++++++++++++++++++++
cca0c4
 test/results/add/g2-1.25              | 144 ++++++++++++++++++++++++++
cca0c4
 19 files changed, 1691 insertions(+)
cca0c4
 create mode 100644 test/grub2-support_files/g2.20-mounts
cca0c4
 create mode 120000 test/grub2-support_files/g2.21-mounts
cca0c4
 create mode 100644 test/grub2-support_files/g2.22-mounts
cca0c4
 create mode 120000 test/grub2-support_files/g2.23-mounts
cca0c4
 create mode 120000 test/grub2-support_files/g2.24-mounts
cca0c4
 create mode 120000 test/grub2-support_files/g2.25-mounts
cca0c4
 create mode 100644 test/grub2.20
cca0c4
 create mode 100644 test/grub2.21
cca0c4
 create mode 100644 test/grub2.22
cca0c4
 create mode 100644 test/grub2.23
cca0c4
 create mode 100644 test/grub2.24
cca0c4
 create mode 100644 test/grub2.25
cca0c4
 create mode 100644 test/results/add/g2-1.20
cca0c4
 create mode 100644 test/results/add/g2-1.21
cca0c4
 create mode 100644 test/results/add/g2-1.22
cca0c4
 create mode 100644 test/results/add/g2-1.23
cca0c4
 create mode 100644 test/results/add/g2-1.24
cca0c4
 create mode 100644 test/results/add/g2-1.25
cca0c4
cca0c4
diff --git a/test.sh b/test.sh
cca0c4
index a97ada94d22..b3ba31e25ca 100755
cca0c4
--- a/test.sh
cca0c4
+++ b/test.sh
cca0c4
@@ -682,6 +682,46 @@ if [ "$testgrub2" == "y" ]; then
cca0c4
             --initrd /boot/initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img \
cca0c4
             --copy-default --title "Fedora 21 Rescue" --args=root=/fooooo \
cca0c4
             --remove-kernel=wtf --boot-filesystem=/boot/
cca0c4
+
cca0c4
+        testing="GRUB2 add kernel with boot on btrfs subvol"
cca0c4
+        grub2Test grub2.20 add/g2-1.20 --add-kernel=/boot/new-kernel.img \
cca0c4
+            --title='title' \
cca0c4
+            --boot-filesystem=/boot/ \
cca0c4
+            --copy-default \
cca0c4
+            --mounts='test/grub2-support_files/g2.20-mounts'
cca0c4
+
cca0c4
+        testing="GRUB2 add initrd with boot on btrfs subvol"
cca0c4
+        grub2Test grub2.21 add/g2-1.21 --update-kernel=/boot/new-kernel.img \
cca0c4
+            --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
cca0c4
+            --mounts='test/grub2-support_files/g2.21-mounts'
cca0c4
+
cca0c4
+        testing="GRUB2 add kernel with rootfs on btrfs subvol and boot directory"
cca0c4
+        grub2Test grub2.22 add/g2-1.22 --add-kernel=/boot/new-kernel.img \
cca0c4
+            --title='title' \
cca0c4
+            --boot-filesystem= \
cca0c4
+            --copy-default \
cca0c4
+            --mounts='test/grub2-support_files/g2.22-mounts'
cca0c4
+
cca0c4
+        testing="GRUB2 add initrd with rootfs on btrfs subvol and boot directory"
cca0c4
+        grub2Test grub2.23 add/g2-1.23 --update-kernel=/boot/new-kernel.img \
cca0c4
+            --initrd=/boot/new-initrd --boot-filesystem= \
cca0c4
+            --mounts='test/grub2-support_files/g2.23-mounts'
cca0c4
+
cca0c4
+        testing="GRUB2 add kernel and initrd with boot on btrfs subvol"
cca0c4
+        grub2Test grub2.24 add/g2-1.24 --add-kernel=/boot/new-kernel.img \
cca0c4
+            --title='title' \
cca0c4
+            --initrd=/boot/new-initrd \
cca0c4
+            --boot-filesystem=/boot/ \
cca0c4
+            --copy-default \
cca0c4
+            --mounts='test/grub2-support_files/g2.24-mounts'
cca0c4
+
cca0c4
+        testing="GRUB2 add kernel and initrd with rootfs on btrfs subvol and boot directory"
cca0c4
+        grub2Test grub2.25 add/g2-1.25 --add-kernel=/boot/new-kernel.img \
cca0c4
+            --title='title' \
cca0c4
+            --initrd=/boot/new-initrd \
cca0c4
+            --boot-filesystem= \
cca0c4
+            --copy-default \
cca0c4
+            --mounts='test/grub2-support_files/g2.25-mounts'
cca0c4
     fi
cca0c4
 fi
cca0c4
 
cca0c4
diff --git a/test/grub2-support_files/g2.20-mounts b/test/grub2-support_files/g2.20-mounts
cca0c4
new file mode 100644
cca0c4
index 00000000000..00bdb48e4ab
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2-support_files/g2.20-mounts
cca0c4
@@ -0,0 +1,2 @@
cca0c4
+/dev/sda	/	btrfs	subvol=/root6,defaults	0 0
cca0c4
+/dev/sda	/boot	btrfs	subvol=/boot6,defaults	0 0
cca0c4
diff --git a/test/grub2-support_files/g2.21-mounts b/test/grub2-support_files/g2.21-mounts
cca0c4
new file mode 120000
cca0c4
index 00000000000..42ef3fd4272
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2-support_files/g2.21-mounts
cca0c4
@@ -0,0 +1 @@
cca0c4
+g2.20-mounts
cca0c4
\ No newline at end of file
cca0c4
diff --git a/test/grub2-support_files/g2.22-mounts b/test/grub2-support_files/g2.22-mounts
cca0c4
new file mode 100644
cca0c4
index 00000000000..5b664e72519
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2-support_files/g2.22-mounts
cca0c4
@@ -0,0 +1 @@
cca0c4
+/dev/sda	/	btrfs	defaults,subvol=/root4,ro	0 0
cca0c4
diff --git a/test/grub2-support_files/g2.23-mounts b/test/grub2-support_files/g2.23-mounts
cca0c4
new file mode 120000
cca0c4
index 00000000000..74f036fc4a3
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2-support_files/g2.23-mounts
cca0c4
@@ -0,0 +1 @@
cca0c4
+g2.22-mounts
cca0c4
\ No newline at end of file
cca0c4
diff --git a/test/grub2-support_files/g2.24-mounts b/test/grub2-support_files/g2.24-mounts
cca0c4
new file mode 120000
cca0c4
index 00000000000..42ef3fd4272
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2-support_files/g2.24-mounts
cca0c4
@@ -0,0 +1 @@
cca0c4
+g2.20-mounts
cca0c4
\ No newline at end of file
cca0c4
diff --git a/test/grub2-support_files/g2.25-mounts b/test/grub2-support_files/g2.25-mounts
cca0c4
new file mode 120000
cca0c4
index 00000000000..74f036fc4a3
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2-support_files/g2.25-mounts
cca0c4
@@ -0,0 +1 @@
cca0c4
+g2.22-mounts
cca0c4
\ No newline at end of file
cca0c4
diff --git a/test/grub2.20 b/test/grub2.20
cca0c4
new file mode 100644
cca0c4
index 00000000000..23b75fa8d3c
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2.20
cca0c4
@@ -0,0 +1,126 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+### END /etc/grub.d/30_os-prober ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
diff --git a/test/grub2.21 b/test/grub2.21
cca0c4
new file mode 100644
cca0c4
index 00000000000..579c2f6744a
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2.21
cca0c4
@@ -0,0 +1,140 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'title' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/new-kernel.img root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+### END /etc/grub.d/30_os-prober ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
diff --git a/test/grub2.22 b/test/grub2.22
cca0c4
new file mode 100644
cca0c4
index 00000000000..9466bc35153
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2.22
cca0c4
@@ -0,0 +1,128 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
diff --git a/test/grub2.23 b/test/grub2.23
cca0c4
new file mode 100644
cca0c4
index 00000000000..5cb240fc1de
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2.23
cca0c4
@@ -0,0 +1,143 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'title' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/new-kernel.img root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
diff --git a/test/grub2.24 b/test/grub2.24
cca0c4
new file mode 100644
cca0c4
index 00000000000..23b75fa8d3c
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2.24
cca0c4
@@ -0,0 +1,126 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+### END /etc/grub.d/30_os-prober ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
diff --git a/test/grub2.25 b/test/grub2.25
cca0c4
new file mode 100644
cca0c4
index 00000000000..9466bc35153
cca0c4
--- /dev/null
cca0c4
+++ b/test/grub2.25
cca0c4
@@ -0,0 +1,128 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
diff --git a/test/results/add/g2-1.20 b/test/results/add/g2-1.20
cca0c4
new file mode 100644
cca0c4
index 00000000000..579c2f6744a
cca0c4
--- /dev/null
cca0c4
+++ b/test/results/add/g2-1.20
cca0c4
@@ -0,0 +1,140 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'title' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/new-kernel.img root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+### END /etc/grub.d/30_os-prober ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
diff --git a/test/results/add/g2-1.21 b/test/results/add/g2-1.21
cca0c4
new file mode 100644
cca0c4
index 00000000000..c0dded9724c
cca0c4
--- /dev/null
cca0c4
+++ b/test/results/add/g2-1.21
cca0c4
@@ -0,0 +1,141 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'title' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/new-kernel.img root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/new-initrd
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+### END /etc/grub.d/30_os-prober ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
diff --git a/test/results/add/g2-1.22 b/test/results/add/g2-1.22
cca0c4
new file mode 100644
cca0c4
index 00000000000..5cb240fc1de
cca0c4
--- /dev/null
cca0c4
+++ b/test/results/add/g2-1.22
cca0c4
@@ -0,0 +1,143 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'title' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/new-kernel.img root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
diff --git a/test/results/add/g2-1.23 b/test/results/add/g2-1.23
cca0c4
new file mode 100644
cca0c4
index 00000000000..c3e87cf7897
cca0c4
--- /dev/null
cca0c4
+++ b/test/results/add/g2-1.23
cca0c4
@@ -0,0 +1,144 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'title' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/new-kernel.img root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/new-initrd
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
diff --git a/test/results/add/g2-1.24 b/test/results/add/g2-1.24
cca0c4
new file mode 100644
cca0c4
index 00000000000..c0dded9724c
cca0c4
--- /dev/null
cca0c4
+++ b/test/results/add/g2-1.24
cca0c4
@@ -0,0 +1,141 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'title' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/new-kernel.img root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/new-initrd
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
cca0c4
+	fi
cca0c4
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
cca0c4
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+### END /etc/grub.d/30_os-prober ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
diff --git a/test/results/add/g2-1.25 b/test/results/add/g2-1.25
cca0c4
new file mode 100644
cca0c4
index 00000000000..c3e87cf7897
cca0c4
--- /dev/null
cca0c4
+++ b/test/results/add/g2-1.25
cca0c4
@@ -0,0 +1,144 @@
cca0c4
+#
cca0c4
+# DO NOT EDIT THIS FILE
cca0c4
+#
cca0c4
+# It is automatically generated by grub2-mkconfig using templates
cca0c4
+# from /etc/grub.d and settings from /etc/default/grub
cca0c4
+#
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/00_header ###
cca0c4
+set pager=1
cca0c4
+
cca0c4
+if [ -s $prefix/grubenv ]; then
cca0c4
+  load_env
cca0c4
+fi
cca0c4
+if [ "${next_entry}" ] ; then
cca0c4
+   set default="${next_entry}"
cca0c4
+   set next_entry=
cca0c4
+   save_env next_entry
cca0c4
+   set boot_once=true
cca0c4
+else
cca0c4
+   set default="${saved_entry}"
cca0c4
+fi
cca0c4
+
cca0c4
+if [ x"${feature_menuentry_id}" = xy ]; then
cca0c4
+  menuentry_id_option="--id"
cca0c4
+else
cca0c4
+  menuentry_id_option=""
cca0c4
+fi
cca0c4
+
cca0c4
+export menuentry_id_option
cca0c4
+
cca0c4
+if [ "${prev_saved_entry}" ]; then
cca0c4
+  set saved_entry="${prev_saved_entry}"
cca0c4
+  save_env saved_entry
cca0c4
+  set prev_saved_entry=
cca0c4
+  save_env prev_saved_entry
cca0c4
+  set boot_once=true
cca0c4
+fi
cca0c4
+
cca0c4
+function savedefault {
cca0c4
+  if [ -z "${boot_once}" ]; then
cca0c4
+    saved_entry="${chosen}"
cca0c4
+    save_env saved_entry
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+function load_video {
cca0c4
+  if [ x$feature_all_video_module = xy ]; then
cca0c4
+    insmod all_video
cca0c4
+  else
cca0c4
+    insmod efi_gop
cca0c4
+    insmod efi_uga
cca0c4
+    insmod ieee1275_fb
cca0c4
+    insmod vbe
cca0c4
+    insmod vga
cca0c4
+    insmod video_bochs
cca0c4
+    insmod video_cirrus
cca0c4
+  fi
cca0c4
+}
cca0c4
+
cca0c4
+terminal_output console
cca0c4
+if [ x$feature_timeout_style = xy ] ; then
cca0c4
+  set timeout_style=menu
cca0c4
+  set timeout=15
cca0c4
+# Fallback normal timeout code in case the timeout_style feature is
cca0c4
+# unavailable.
cca0c4
+else
cca0c4
+  set timeout=15
cca0c4
+fi
cca0c4
+### END /etc/grub.d/00_header ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/10_linux ###
cca0c4
+menuentry 'title' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/new-kernel.img root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/new-initrd
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	set gfxpayload=keep
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
cca0c4
+}
cca0c4
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
cca0c4
+	load_video
cca0c4
+	insmod gzio
cca0c4
+	insmod part_msdos
cca0c4
+	insmod part_msdos
cca0c4
+	insmod btrfs
cca0c4
+	set root='hd0,msdos1'
cca0c4
+	if [ x$feature_platform_search_hint = xy ]; then
cca0c4
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	else
cca0c4
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
cca0c4
+	fi
cca0c4
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
cca0c4
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
cca0c4
+}
cca0c4
+
cca0c4
+### END /etc/grub.d/10_linux ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### END /etc/grub.d/20_linux_xen ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
cca0c4
+### END /etc/grub.d/20_ppc_terminfo ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/30_os-prober ###
cca0c4
+###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/40_custom ###
cca0c4
+# This file provides an easy way to add custom menu entries.  Simply type the
cca0c4
+# menu entries you want to add after this comment.  Be careful not to change
cca0c4
+# the 'exec tail' line above.
cca0c4
+### END /etc/grub.d/40_custom ###
cca0c4
+
cca0c4
+### BEGIN /etc/grub.d/41_custom ###
cca0c4
+if [ -f  ${config_directory}/custom.cfg ]; then
cca0c4
+  source ${config_directory}/custom.cfg
cca0c4
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
cca0c4
+  source $prefix/custom.cfg;
cca0c4
+fi
cca0c4
+### END /etc/grub.d/41_custom ###
cca0c4
-- 
cca0c4
2.17.1
cca0c4