Advertisement
Guest User

Grub.cfg

a guest
Feb 14th, 2021
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 7.74 KB | None | 0 0
  1. #
  2. # DO NOT EDIT THIS FILE
  3. #
  4. # It is automatically generated by grub-mkconfig using templates
  5. # from /etc/grub.d and settings from /etc/default/grub
  6. #
  7.  
  8. ### BEGIN /etc/grub.d/00_header ###
  9. if [ -s $prefix/grubenv ]; then
  10.   set have_grubenv=true
  11.   load_env
  12. fi
  13. if [ "${initrdfail}" = 2 ]; then
  14.    set initrdfail=
  15. elif [ "${initrdfail}" = 1 ]; then
  16.    set next_entry="${prev_entry}"
  17.    set prev_entry=
  18.    save_env prev_entry
  19.    if [ "${next_entry}" ]; then
  20.       set initrdfail=2
  21.    fi
  22. fi
  23. if [ "${next_entry}" ] ; then
  24.    set default="${next_entry}"
  25.    set next_entry=
  26.    save_env next_entry
  27.    set boot_once=true
  28. else
  29.    set default="0"
  30. fi
  31.  
  32. if [ x"${feature_menuentry_id}" = xy ]; then
  33.   menuentry_id_option="--id"
  34. else
  35.   menuentry_id_option=""
  36. fi
  37.  
  38. export menuentry_id_option
  39.  
  40. if [ "${prev_saved_entry}" ]; then
  41.   set saved_entry="${prev_saved_entry}"
  42.   save_env saved_entry
  43.   set prev_saved_entry=
  44.   save_env prev_saved_entry
  45.   set boot_once=true
  46. fi
  47.  
  48. function savedefault {
  49.   if [ -z "${boot_once}" ]; then
  50.     saved_entry="${chosen}"
  51.     save_env saved_entry
  52.   fi
  53. }
  54. function initrdfail {
  55.     if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
  56.       if [ -z "${initrdfail}" ]; then
  57.         set initrdfail=1
  58.         if [ -n "${boot_once}" ]; then
  59.           set prev_entry="${default}"
  60.           save_env prev_entry
  61.         fi
  62.       fi
  63.       save_env initrdfail
  64.     fi; fi
  65. }
  66. function recordfail {
  67.   set recordfail=1
  68.   if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
  69. }
  70. function load_video {
  71.   if [ x$feature_all_video_module = xy ]; then
  72.     insmod all_video
  73.   else
  74.     insmod efi_gop
  75.     insmod efi_uga
  76.     insmod ieee1275_fb
  77.     insmod vbe
  78.     insmod vga
  79.     insmod video_bochs
  80.     insmod video_cirrus
  81.   fi
  82. }
  83.  
  84. if [ x$feature_default_font_path = xy ] ; then
  85.    font=unicode
  86. else
  87. insmod part_gpt
  88. insmod ext2
  89. if [ x$feature_platform_search_hint = xy ]; then
  90.   search --no-floppy --fs-uuid --set=root  a121c166-fb79-46c6-96dd-7a298964f0b7
  91. else
  92.   search --no-floppy --fs-uuid --set=root a121c166-fb79-46c6-96dd-7a298964f0b7
  93. fi
  94.     font="/usr/share/grub/unicode.pf2"
  95. fi
  96.  
  97. if loadfont $font ; then
  98.   set gfxmode=auto
  99.   load_video
  100.   insmod gfxterm
  101.   set locale_dir=$prefix/locale
  102.   set lang=en_US
  103.   insmod gettext
  104. fi
  105. terminal_output gfxterm
  106. if [ "${recordfail}" = 1 ] ; then
  107.   set timeout=30
  108. else
  109.   if [ x$feature_timeout_style = xy ] ; then
  110.     set timeout_style=menu
  111.     set timeout=10
  112.   # Fallback normal timeout code in case the timeout_style feature is
  113.   # unavailable.
  114.   else
  115.     set timeout=10
  116.   fi
  117. fi
  118. ### END /etc/grub.d/00_header ###
  119.  
  120. ### BEGIN /etc/grub.d/05_debian_theme ###
  121. set menu_color_normal=white/black
  122. set menu_color_highlight=black/light-gray
  123. ### END /etc/grub.d/05_debian_theme ###
  124.  
  125. ### BEGIN /etc/grub.d/10_linux ###
  126. function gfxmode {
  127.         set gfxpayload="${1}"
  128.         if [ "${1}" = "keep" ]; then
  129.                 set vt_handoff=vt.handoff=7
  130.         else
  131.                 set vt_handoff=
  132.         fi
  133. }
  134. if [ "${recordfail}" != 1 ]; then
  135.   if [ -e ${prefix}/gfxblacklist.txt ]; then
  136.     if hwmatch ${prefix}/gfxblacklist.txt 3; then
  137.       if [ ${match} = 0 ]; then
  138.         set linux_gfx_mode=keep
  139.       else
  140.         set linux_gfx_mode=text
  141.       fi
  142.     else
  143.       set linux_gfx_mode=text
  144.     fi
  145.   else
  146.     set linux_gfx_mode=keep
  147.   fi
  148. else
  149.   set linux_gfx_mode=text
  150. fi
  151. export linux_gfx_mode
  152. menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-a121c166-fb79-46c6-96dd-7a298964f0b7' {
  153.         recordfail
  154.         load_video
  155.         gfxmode $linux_gfx_mode
  156.         insmod gzio
  157.         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
  158.         insmod part_gpt
  159.         insmod ext2
  160.         if [ x$feature_platform_search_hint = xy ]; then
  161.           search --no-floppy --fs-uuid --set=root  a121c166-fb79-46c6-96dd-7a298964f0b7
  162.         else
  163.           search --no-floppy --fs-uuid --set=root a121c166-fb79-46c6-96dd-7a298964f0b7
  164.         fi
  165.         linux   /boot/vmlinuz-5.4.0-42-generic root=UUID=a121c166-fb79-46c6-96dd-7a298964f0b7 ro  quiet splash $vt_handoff
  166.         initrd  /boot/initrd.img-5.4.0-42-generic
  167. }
  168. submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-a121c166-fb79-46c6-96dd-7a298964f0b7' {
  169.         menuentry 'Ubuntu, with Linux 5.4.0-42-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-42-generic-advanced-a121c166-fb79-46c6-96dd-7a298964f0b7' {
  170.                 recordfail
  171.                 load_video
  172.                 gfxmode $linux_gfx_mode
  173.                 insmod gzio
  174.                 if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
  175.                 insmod part_gpt
  176.                 insmod ext2
  177.                 if [ x$feature_platform_search_hint = xy ]; then
  178.                   search --no-floppy --fs-uuid --set=root  a121c166-fb79-46c6-96dd-7a298964f0b7
  179.                 else
  180.                   search --no-floppy --fs-uuid --set=root a121c166-fb79-46c6-96dd-7a298964f0b7
  181.                 fi
  182.                 echo    'Loading Linux 5.4.0-42-generic ...'
  183.                 linux   /boot/vmlinuz-5.4.0-42-generic root=UUID=a121c166-fb79-46c6-96dd-7a298964f0b7 ro  quiet splash $vt_handoff
  184.                 echo    'Loading initial ramdisk ...'
  185.                 initrd  /boot/initrd.img-5.4.0-42-generic
  186.         }
  187.         menuentry 'Ubuntu, with Linux 5.4.0-42-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-42-generic-recovery-a121c166-fb79-46c6-96dd-7a298964f0b7' {
  188.                 recordfail
  189.                 load_video
  190.                 insmod gzio
  191.                 if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
  192.                 insmod part_gpt
  193.                 insmod ext2
  194.                 if [ x$feature_platform_search_hint = xy ]; then
  195.                   search --no-floppy --fs-uuid --set=root  a121c166-fb79-46c6-96dd-7a298964f0b7
  196.                 else
  197.                   search --no-floppy --fs-uuid --set=root a121c166-fb79-46c6-96dd-7a298964f0b7
  198.                 fi
  199.                 echo    'Loading Linux 5.4.0-42-generic ...'
  200.                 linux   /boot/vmlinuz-5.4.0-42-generic root=UUID=a121c166-fb79-46c6-96dd-7a298964f0b7 ro recovery nomodeset
  201.                 echo    'Loading initial ramdisk ...'
  202.                 initrd  /boot/initrd.img-5.4.0-42-generic
  203.         }
  204. }
  205.  
  206. ### END /etc/grub.d/10_linux ###
  207.  
  208. # Begin /boot/grub/grub.cfg
  209.  
  210. insmod ext2
  211. #set root=(hd1,2)
  212.  
  213. menuentry "GNU/Linux, Linux 5.10.13-lfs-20210206-systemd" {
  214.         linux   /boot/vmlinuz-5.10.13-lfs-20210206-systemd root=PARTUUID=8e6d6a27-16d6-420e-9cd6-9315dd37a603 ro
  215. }
  216.  
  217.  
  218. ### BEGIN /etc/grub.d/10_linux_zfs ###
  219. ### END /etc/grub.d/10_linux_zfs ###
  220.  
  221. ### BEGIN /etc/grub.d/20_linux_xen ###
  222.  
  223. ### END /etc/grub.d/20_linux_xen ###
  224.  
  225. ### BEGIN /etc/grub.d/20_memtest86+ ###
  226. ### END /etc/grub.d/20_memtest86+ ###
  227.  
  228. ### BEGIN /etc/grub.d/30_os-prober ###
  229. ### END /etc/grub.d/30_os-prober ###
  230.  
  231. ### BEGIN /etc/grub.d/30_uefi-firmware ###
  232. menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
  233.         fwsetup
  234. }
  235. ### END /etc/grub.d/30_uefi-firmware ###
  236.  
  237. ### BEGIN /etc/grub.d/40_custom ###
  238. # This file provides an easy way to add custom menu entries.  Simply type the
  239. # menu entries you want to add after this comment.  Be careful not to change
  240. # the 'exec tail' line above.
  241. ### END /etc/grub.d/40_custom ###
  242.  
  243. ### BEGIN /etc/grub.d/41_custom ###
  244. if [ -f  ${config_directory}/custom.cfg ]; then
  245.   source ${config_directory}/custom.cfg
  246. elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  247.   source $prefix/custom.cfg;
  248. fi
  249. ### END /etc/grub.d/41_custom ###
  250.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement