Skip to content

Commit f682e17

Browse files
authored
Merge pull request #321 from StollD/set-subvolid
Add support for GRUB patches from SUSE
2 parents 72a3dc0 + ece8d87 commit f682e17

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

41_snapshots-btrfs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,12 @@ make_menu_entries()
224224
search --no-floppy --fs-uuid --set=root ${boot_hs} ${boot_uuid}
225225
else
226226
search --no-floppy --fs-uuid --set=root ${boot_uuid}
227+
fi"
228+
if [ "${SUSE_BTRFS_SNAPSHOT_BOOTING:-"false"}" = "true" ]; then
229+
entry "\
230+
set btrfs_subvolid=5"
227231
fi
232+
entry "\
228233
echo 'Loading Snapshot: "${snap_date_trim}" "${snap_dir_name_trim}"'
229234
echo 'Loading Kernel: "${k}" ...'
230235
linux \"${boot_dir_root_grub}/"${k}"\" root="${LINUX_ROOT_DEVICE}" ${kernel_parameters} ${rootflags}subvol=\""${snap_dir_name_trim}"\""
@@ -259,7 +264,12 @@ make_menu_entries()
259264
search --no-floppy --fs-uuid --set=root ${boot_hs} ${boot_uuid}
260265
else
261266
search --no-floppy --fs-uuid --set=root ${boot_uuid}
267+
fi"
268+
if [ "${SUSE_BTRFS_SNAPSHOT_BOOTING:-"false"}" = "true" ]; then
269+
entry "\
270+
set btrfs_subvolid=5"
262271
fi
272+
entry "\
263273
echo 'Loading Snapshot: "${snap_date_trim}" "${snap_dir_name_trim}"'
264274
echo 'Loading Kernel: "${k}" ...'
265275
linux \"${boot_dir_root_grub}/"${k}"\" root="${LINUX_ROOT_DEVICE}" ${kernel_parameters} ${rootflags}subvol=\""${snap_dir_name_trim}"\""

0 commit comments

Comments
 (0)