SHARE
TWEET

Untitled

a guest Jun 19th, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. IMAGES=/boot/ubuntu-iso/
  6. . /usr/lib/grub/grub-mkconfig_lib
  7.  
  8. for isofile in ${IMAGES}*.iso
  9. do
  10.       IMAGEPATH=$( make_system_path_relative_to_its_root "$isofile" )
  11.       echo "Found ubuntu iso image: $IMAGEPATH" >&2
  12.       cat << EOF
  13. menuentry "Bootable iso: $(basename $IMAGEPATH | sed s/.iso//)" {
  14. EOF
  15.       prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
  16.       cat << EOF
  17.     loopback loop $isofile
  18.     linux (loop)/casper/vmlinuz boot=casper console-setup/layoutcode=latam locale=es_CL.UTF-8 iso-scan/filename=$isofile quiet splash noeject noprompt --
  19.     initrd (loop)/casper/initrd.lz
  20. }
  21. EOF
  22. done
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top