#!/bin/bash -e source /usr/lib/grub/grub-mkconfig_lib cat << EOF menuentry "Restore OS to factory state" { search --no-floppy --hint '(hd0,gpt2)' --set --fs-uuid 1E00-35E9 set uuid_options="uuid=1E00-35E9" if [ -s /factory/common.cfg ]; then source /factory/common.cfg else set options="boot=casper automatic-ubiquity noprompt quiet splash nomodeset" fi if [ -s /factory/post-rts-gfx.cfg ]; then source /factory/post-rts-gfx.cfg fi if [ -s /factory/post-rts-wlan.cfg ]; then source /factory/post-rts-wlan.cfg fi #Support starting from a loopback mount (Only support ubuntu.iso for filename) if [ -f /ubuntu.iso ]; then loopback loop /ubuntu.iso set root=(loop) set options="\$options iso-scan/filename=/ubuntu.iso" fi if [ -n "\${lang}" ]; then set options="\$options locale=\$lang" fi if [ -s /factory/dual_enable ]; then set options="\$options dell-recovery/dual_boot=true" fi linux /casper/vmlinuz.efi dell-recovery/recovery_type=hdd \$uuid_options \$options initrd /casper/initrd.lz } EOF