{"body":"#!/bin/sh\n# This script is designed to behave like 10_linux\n#\n# These variables represent the two volumes we're going to peek at:\nROOTFS_UUID=348e0ebd-25f4-47ab-9637-29be2520e637\nBOOTFS_UUID=ade2a118-7198-4876-8e5b-12a069d2aa41\n\n# Our prober:\ngrub_probe=/usr/sbin/grub-probe\n\n# Our workspace:\nROOT_VOL=/root/mnt\nmkdir -p $ROOT_VOL\nmount /dev/disk/by-uuid/$ROOTFS_UUID $ROOT_VOL\nmount /dev/disk/by-uuid/$BOOTFS_UUID $ROOT_VOL/boot\n\n# Gather information\nGRUB_DISTRIBUTOR=$(cat $ROOT_VOL/etc/system-release)\nGRUB_DEVICE=\"`${grub_probe} --target=device $ROOT_VOL`\"\nGRUB_DEVICE_UUID=\"`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`\" || true\nGRUB_DEVICE_BOOT=\"`${grub_probe} --target=device $ROOT_VOL/boot`\"\nGRUB_DEVICE_BOOT_UUID=\"`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`\" || true\nGRUB_FS=\"`${grub_probe} --target=fs $ROOT_VOL 2> /dev/null || echo unknown`\"\n\nexport GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_DISTRIBUTOR\n\n# We need a slightly customized' version of /etc/grub.d/10_linux:\nROOT_VOL_10_LINUX=/root/10_linux.x\nperl -pn -e 'next unless m!list=.*vmlinu!;s! /! '$ROOT_VOL'/!g' < /etc/grub.d/10_linux > $ROOT_VOL_10_LINUX\nchmod +x $ROOT_VOL_10_LINUX\n\n# Run 10_linux to get our pretty menu items\n$ROOT_VOL_10_LINUX\n\n# Clean up\nrm -f $ROOT_VOL_10_LINUX\numount $ROOT_VOL/boot\numount $ROOT_VOL","name":"/etc/grub.d/41_linux_centos","extension":"sh","url":"https://www.irccloud.com/pastebin/LriGK6iP/%2Fetc%2Fgrub.d%2F41_linux_centos","modified":1519264371,"id":"LriGK6iP","size":1386,"lines":38,"own_paste":false,"theme":"","date":1519264371}