Guest User

grub.cfg Live iso booting

a guest
Jul 6th, 2016
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.81 KB | None | 0 0
  1. #
  2. # jMc
  3. #
  4. #
  5.  
  6. ### BEGIN /etc/grub.d/00_header ###
  7. if [ -s $prefix/grubenv ]; then
  8. set have_grubenv=true
  9. load_env
  10. fi
  11. if [ "${next_entry}" ] ; then
  12. set default="${next_entry}"
  13. set next_entry=
  14. save_env next_entry
  15. set boot_once=true
  16. else
  17. set default="0"
  18. fi
  19.  
  20. if [ x"${feature_menuentry_id}" = xy ]; then
  21. menuentry_id_option="--id"
  22. else
  23. menuentry_id_option=""
  24. fi
  25.  
  26. export menuentry_id_option
  27.  
  28. if [ "${prev_saved_entry}" ]; then
  29. set saved_entry="${prev_saved_entry}"
  30. save_env saved_entry
  31. set prev_saved_entry=
  32. save_env prev_saved_entry
  33. set boot_once=true
  34. fi
  35.  
  36. function savedefault {
  37. if [ -z "${boot_once}" ]; then
  38. saved_entry="${chosen}"
  39. save_env saved_entry
  40. fi
  41. }
  42. function recordfail {
  43. set recordfail=1
  44. if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
  45. }
  46. function load_video {
  47. if [ x$feature_all_video_module = xy ]; then
  48. insmod all_video
  49. else
  50. insmod efi_gop
  51. insmod efi_uga
  52. insmod ieee1275_fb
  53. insmod vbe
  54. insmod vga
  55. insmod video_bochs
  56. insmod video_cirrus
  57. fi
  58. }
  59.  
  60. if [ x$feature_default_font_path = xy ] ; then
  61. font=unicode
  62. else
  63. insmod part_msdos
  64. insmod ext2
  65. set root='hd1,msdos1'
  66. if [ x$feature_platform_search_hint = xy ]; then
  67. search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 9d301a2e-2ea5-4cbe-9f89-db25549a06c2
  68. else
  69. search --no-floppy --fs-uuid --set=root 9d301a2e-2ea5-4cbe-9f89-db25549a06c2
  70. fi
  71. font="/usr/share/grub/unicode.pf2"
  72. fi
  73.  
  74. if loadfont $font ; then
  75. set gfxmode=auto
  76. load_video
  77. insmod gfxterm
  78. set locale_dir=$prefix/locale
  79. set lang=en_US
  80. insmod gettext
  81. fi
  82. terminal_output gfxterm
  83. if [ "${recordfail}" = 1 ] ; then
  84. set timeout=30
  85. else
  86. if [ x$feature_timeout_style = xy ] ; then
  87. set timeout_style=menu
  88. set timeout=2
  89. # Fallback normal timeout code in case the timeout_style feature is
  90. # unavailable.
  91. else
  92. set timeout=2
  93. fi
  94. fi
  95. ### END /etc/grub.d/00_header ###
  96.  
  97.  
  98. ### BEGIN /etc/grub.d/05_debian_theme ###
  99. set menu_color_normal=white/black
  100. set menu_color_highlight=black/light-gray
  101. ### END /etc/grub.d/05_debian_theme ###
  102.  
  103. ### BEGIN /etc/grub.d/10_linux ###
  104. function gfxmode {
  105. set gfxpayload="${1}"
  106. if [ "${1}" = "keep" ]; then
  107. set vt_handoff=vt.handoff=7
  108. else
  109. set vt_handoff=
  110. fi
  111. }
  112. if [ "${recordfail}" != 1 ]; then
  113. if [ -e ${prefix}/gfxblacklist.txt ]; then
  114. if hwmatch ${prefix}/gfxblacklist.txt 3; then
  115. if [ ${match} = 0 ]; then
  116. set linux_gfx_mode=keep
  117. else
  118. set linux_gfx_mode=text
  119. fi
  120. else
  121. set linux_gfx_mode=text
  122. fi
  123. else
  124. set linux_gfx_mode=keep
  125. fi
  126. else
  127. set linux_gfx_mode=text
  128. fi
  129. export linux_gfx_mode
  130.  
  131.  
  132.  
  133. menuentry "PartedMagic_2012_09_12" {
  134. insmod part_gpt
  135. set isofile="/boot/PartedMagic_2012_09_12.iso"
  136. loopback loop $isofile
  137. linux (loop)/pmagic/bzImage iso_filename=$isofile edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256 vmalloc=512MiB
  138. initrd (loop)/pmagic/initrd.img
  139. }
  140.  
  141. menuentry "Super Grub Disk 1.98" {
  142. insmod part_gpt
  143. insmod memdisk
  144. linux16 /boot/memdisk raw
  145. initrd16 /boot/super_grub_disk_hybrid-1.98s1.iso
  146. }
  147.  
  148. menuentry "Acronis True Image Enterprise Server 9.5 Build 8076" {
  149. insmod part_gpt
  150. insmod memdisk
  151. linux16 /boot/memdisk iso raw
  152. initrd16 /boot/acronisbootable.iso
  153. }
  154.  
  155. menuentry "ntpasswd - Petter Nordahl-Hagen" {
  156. insmod part_gpt
  157. insmod memdisk
  158. linux16 /boot/memdisk iso
  159. initrd16 /boot/ntpasswd/cd140201.iso
  160. }
  161.  
  162. menuentry "DBAN - Darik's Boot and Nuke 2.2.8" {
  163. insmod part_gpt
  164. insmod memdisk
  165. linux16 /boot/memdisk iso
  166. initrd16 /boot/dban-2.2.8_i586.iso
  167. }
  168.  
  169. set timeout_style=menu
  170. if [ "${timeout}" = 0 ]; then
  171. set timeout=10
  172. fi
Add Comment
Please, Sign In to add comment