1. #
  2. ### BEGIN /etc/grub.d/00_header ###
  3. if [ -s $prefix/grubenv ]; then
  4. set have_grubenv=true
  5. load_env
  6. fi
  7. if [ "${next_entry}" ] ; then
  8. set default="${next_entry}"
  9. set next_entry=
  10. save_env next_entry
  11. set boot_once=true
  12. else
  13. set default="0"
  14. fi
  15. if [ x"${feature_menuentry_id}" = xy ]; then
  16. menuentry_id_option="--id"
  17. else
  18. menuentry_id_option=""
  19. fi
  20. export menuentry_id_option
  21. if [ "${prev_saved_entry}" ]; then
  22. set saved_entry="${prev_saved_entry}"
  23. save_env saved_entry
  24. set prev_saved_entry=
  25. save_env prev_saved_entry
  26. set boot_once=true
  27. fi
  28. function savedefault {
  29. if [ -z "${boot_once}" ]; then
  30. saved_entry="${chosen}"
  31. save_env saved_entry
  32. fi
  33. }
  34. function recordfail {
  35. set recordfail=1
  36. if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
  37. }
  38. function load_video {
  39. if [ x$feature_all_video_module = xy ]; then
  40. insmod all_video
  41. else
  42. insmod efi_gop
  43. insmod efi_uga
  44. insmod ieee1275_fb
  45. insmod vbe
  46. insmod vga
  47. insmod video_bochs
  48. insmod video_cirrus
  49. fi
  50. }
  51. if [ x$feature_default_font_path = xy ] ; then
  52. font=unicode
  53. else
  54. insmod part_msdos
  55. insmod lvm
  56. insmod ext2
  57. set root='lvmid/V9zudS-5zAC-EkQi-rtCv-oY9q-nmk3-A0V9gS/vrHDeT-MUIT-QTum-vfXV-Stk8-uQqh-mPEfvQ'
  58. if [ x$feature_platform_search_hint = xy ]; then
  59. search --no-floppy --fs-uuid --set=root --hint='lvmid/V9zudS-5zAC-EkQi-rtCv-oY9q-nmk3-A0V9gS/vrHDeT-MUIT-QTum-vfXV-Stk8-uQqh-mPEfvQ' fb2dcf3b-6249-4ca0-92b9-10853871b1f5
  60. else
  61. search --no-floppy --fs-uuid --set=root fb2dcf3b-6249-4ca0-92b9-10853871b1f5
  62. fi
  63. font="/usr/share/grub/unicode.pf2"
  64. fi
  65. if loadfont $font ; then
  66. set gfxmode=auto
  67. load_video
  68. insmod gfxterm
  69. set locale_dir=$prefix/locale
  70. set lang=en_GB
  71. insmod gettext
  72. fi
  73. terminal_output gfxterm
  74. if [ "${recordfail}" = 1 ] ; then
  75. set timeout=-1
  76. else
  77. if [ x$feature_timeout_style = xy ] ; then
  78. set timeout_style=hidden
  79. set timeout=100
  80. # Fallback hidden-timeout code in case the timeout_style feature is
  81. # unavailable.
  82. elif sleep --interruptible 100 ; then
  83. set timeout=0
  84. fi
  85. fi
  86. ### END /etc/grub.d/00_header ###
  87. ### BEGIN /etc/grub.d/05_debian_theme ###
  88. set menu_color_normal=white/black
  89. set menu_color_highlight=black/light-gray
  90. ### END /etc/grub.d/05_debian_theme ###
  91. ### BEGIN /etc/grub.d/10_linux ###
  92. function gfxmode {
  93. set gfxpayload="${1}"
  94. if [ "${1}" = "keep" ]; then
  95. set vt_handoff=vt.handoff=7
  96. else
  97. set vt_handoff=
  98. fi
  99. }
  100. if [ "${recordfail}" != 1 ]; then
  101. if [ -e ${prefix}/gfxblacklist.txt ]; then
  102. if hwmatch ${prefix}/gfxblacklist.txt 3; then
  103. if [ ${match} = 0 ]; then
  104. set linux_gfx_mode=keep
  105. else
  106. set linux_gfx_mode=text
  107. fi
  108. else
  109. set linux_gfx_mode=text
  110. fi
  111. else
  112. set linux_gfx_mode=keep
  113. fi
  114. else
  115. set linux_gfx_mode=text
  116. fi
  117. export linux_gfx_mode
  118. menuentry "Debian Live 7.4 amd64 GNOME Desktop" --class debian {
  119. set isoname="/boot/debian/debian-8.0.0-amd64-netinst.iso"
  120. set isofile="${isopath}/debian/${isoname}"
  121. echo "Using ${isoname}..."
  122. loopback loop $isofile
  123. linux (loop)/vmlinuz boot=(loop) findiso=${isofile} config quiet splash
  124. initrd (loop)/initrd.img
  125. }
  126. menuentry 'New Install' {
  127. recordfail
  128. load_video
  129. gfxmode $linux_gfx_mode
  130. insmod gzio
  131. insmod part_msdos
  132. insmod ext2
  133. set root='hd0,msdos1'
  134. linux /boot/debian/vmlinuz
  135. initrd /boot/debian/initrd.gz
  136. }
  137. menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-fb2dcf3b-6249-4ca0-92b9-10853871b1f5' {
  138. recordfail
  139. load_video
  140. gfxmode $linux_gfx_mode
  141. insmod gzio
  142. insmod part_msdos
  143. insmod ext2
  144. set root='hd0,msdos1'
  145. if [ x$feature_platform_search_hint = xy ]; then
  146. search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 218d9d0c-f4cd-4908-94ce-6d36eaf6c1c6
  147. else
  148. search --no-floppy --fs-uuid --set=root 218d9d0c-f4cd-4908-94ce-6d36eaf6c1c6
  149. fi
  150. linux /vmlinuz-3.13.0-53-generic root=/dev/mapper/VolGroup00-LogVol00 ro biosdevname=0 quiet splash biosdevname=0 $vt_handoff
  151. initrd /initrd.img-3.13.0-53-generic
  152. }
  153. submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-fb2dcf3b-6249-4ca0-92b9-10853871b1f5' {
  154. menuentry 'Ubuntu, with Linux 3.13.0-53-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-53-generic-advanced-fb2dcf3b-6249-4ca0-92b9-10853871b1f5' {
  155. recordfail
  156. load_video
  157. gfxmode $linux_gfx_mode
  158. insmod gzio
  159. insmod part_msdos
  160. insmod ext2
  161. set root='hd0,msdos1'
  162. if [ x$feature_platform_search_hint = xy ]; then
  163. search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 218d9d0c-f4cd-4908-94ce-6d36eaf6c1c6
  164. else
  165. search --no-floppy --fs-uuid --set=root 218d9d0c-f4cd-4908-94ce-6d36eaf6c1c6
  166. fi
  167. echo 'Loading Linux 3.13.0-53-generic ...'
  168. linux /vmlinuz-3.13.0-53-generic root=/dev/mapper/VolGroup00-LogVol00 ro biosdevname=0 quiet splash biosdevname=0 $vt_handoff
  169. echo 'Loading initial ramdisk ...'
  170. initrd /initrd.img-3.13.0-53-generic
  171. }
  172. menuentry 'Ubuntu, with Linux 3.13.0-53-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-53-generic-recovery-fb2dcf3b-6249-4ca0-92b9-10853871b1f5' {
  173. recordfail
  174. load_video
  175. insmod gzio
  176. insmod part_msdos
  177. insmod ext2
  178. set root='hd0,msdos1'
  179. if [ x$feature_platform_search_hint = xy ]; then
  180. search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 218d9d0c-f4cd-4908-94ce-6d36eaf6c1c6
  181. else
  182. search --no-floppy --fs-uuid --set=root 218d9d0c-f4cd-4908-94ce-6d36eaf6c1c6
  183. fi
  184. echo 'Loading Linux 3.13.0-53-generic ...'
  185. linux /vmlinuz-3.13.0-53-generic root=/dev/mapper/VolGroup00-LogVol00 ro recovery nomodeset biosdevname=0
  186. echo 'Loading initial ramdisk ...'
  187. initrd /initrd.img-3.13.0-53-generic
  188. }
  189. menuentry 'Ubuntu, with Linux 3.13.0-45-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-45-generic-advanced-fb2dcf3b-6249-4ca0-92b9-10853871b1f5' {
  190. recordfail
  191. load_video
  192. gfxmode $linux_gfx_mode
  193. insmod gzio
  194. insmod part_msdos
  195. insmod ext2
  196. set root='hd0,msdos1'
  197. if [ x$feature_platform_search_hint = xy ]; then
  198. search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 218d9d0c-f4cd-4908-94ce-6d36eaf6c1c6
  199. else
  200. search --no-floppy --fs-uuid --set=root 218d9d0c-f4cd-4908-94ce-6d36eaf6c1c6
  201. fi
  202. echo 'Loading Linux 3.13.0-45-generic ...'
  203. linux /vmlinuz-3.13.0-45-generic root=/dev/mapper/VolGroup00-LogVol00 ro biosdevname=0 quiet splash biosdevname=0 $vt_handoff
  204. echo 'Loading initial ramdisk ...'
  205. initrd /initrd.img-3.13.0-45-generic
  206. }
  207. menuentry 'Ubuntu, with Linux 3.13.0-45-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-45-generic-recovery-fb2dcf3b-6249-4ca0-92b9-10853871b1f5' {
  208. recordfail
  209. load_video
  210. insmod gzio
  211. insmod part_msdos
  212. insmod ext2
  213. set root='hd0,msdos1'
  214. if [ x$feature_platform_search_hint = xy ]; then
  215. search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 218d9d0c-f4cd-4908-94ce-6d36eaf6c1c6
  216. else
  217. search --no-floppy --fs-uuid --set=root 218d9d0c-f4cd-4908-94ce-6d36eaf6c1c6
  218. fi
  219. echo 'Loading Linux 3.13.0-45-generic ...'
  220. linux /vmlinuz-3.13.0-45-generic root=/dev/mapper/VolGroup00-LogVol00 ro recovery nomodeset biosdevname=0
  221. echo 'Loading initial ramdisk ...'
  222. initrd /initrd.img-3.13.0-45-generic
  223. }
  224. }
  225. ### END /etc/grub.d/10_linux ###
  226. ### BEGIN /etc/grub.d/20_linux_xen ###
  227. ### END /etc/grub.d/20_linux_xen ###
  228. ### BEGIN /etc/grub.d/30_os-prober ###
  229. ### END /etc/grub.d/30_os-prober ###
  230. ### BEGIN /etc/grub.d/30_uefi-firmware ###
  231. ### END /etc/grub.d/30_uefi-firmware ###
  232. ### BEGIN /etc/grub.d/40_custom ###
  233. # This file provides an easy way to add custom menu entries. Simply type the
  234. # menu entries you want to add after this comment. Be careful not to change
  235. # the 'exec tail' line above.
  236. ### END /etc/grub.d/40_custom ###
  237. ### BEGIN /etc/grub.d/41_custom ###
  238. if [ -f ${config_directory}/custom.cfg ]; then
  239. source ${config_directory}/custom.cfg
  240. elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
  241. source $prefix/custom.cfg;
  242. fi
  243. ### END /etc/grub.d/41_custom ###
Comments powered by Disqus