Advertisement
dimonbb

grub config

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