Advertisement
rawfox

grub2-mkconfig

Feb 14th, 2022
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.02 KB | None | 0 0
  1. rawfox 21:11 Mon Feb 14 ~ sudo grub2-mkconfig
  2. Generating grub configuration file ...
  3. #
  4. # DO NOT EDIT THIS FILE
  5. #
  6. # It is automatically generated by grub2-mkconfig using templates
  7. # from /etc/grub.d and settings from /etc/default/grub
  8. #
  9.  
  10. ### BEGIN /etc/grub.d/00_header ###
  11. set pager=1
  12.  
  13. if [ -f ${config_directory}/grubenv ]; then
  14. load_env -f ${config_directory}/grubenv
  15. elif [ -s $prefix/grubenv ]; then
  16. load_env
  17. fi
  18. if [ "${next_entry}" ] ; then
  19. set default="${next_entry}"
  20. set next_entry=
  21. save_env next_entry
  22. set boot_once=true
  23. else
  24. set default="${saved_entry}"
  25. fi
  26.  
  27. if [ x"${feature_menuentry_id}" = xy ]; then
  28. menuentry_id_option="--id"
  29. else
  30. menuentry_id_option=""
  31. fi
  32.  
  33. export menuentry_id_option
  34.  
  35. if [ "${prev_saved_entry}" ]; then
  36. set saved_entry="${prev_saved_entry}"
  37. save_env saved_entry
  38. set prev_saved_entry=
  39. save_env prev_saved_entry
  40. set boot_once=true
  41. fi
  42.  
  43. function savedefault {
  44. if [ -z "${boot_once}" ]; then
  45. saved_entry="${chosen}"
  46. save_env saved_entry
  47. fi
  48. }
  49.  
  50. function load_video {
  51. if [ x$feature_all_video_module = xy ]; then
  52. insmod all_video
  53. else
  54. insmod efi_gop
  55. insmod efi_uga
  56. insmod ieee1275_fb
  57. insmod vbe
  58. insmod vga
  59. insmod video_bochs
  60. insmod video_cirrus
  61. fi
  62. }
  63.  
  64. terminal_output console
  65. if [ x$feature_timeout_style = xy ] ; then
  66. set timeout_style=menu
  67. set timeout=5
  68. # Fallback normal timeout code in case the timeout_style feature is
  69. # unavailable.
  70. else
  71. set timeout=5
  72. fi
  73. ### END /etc/grub.d/00_header ###
  74.  
  75. ### BEGIN /etc/grub.d/01_users ###
  76. if [ -f ${prefix}/user.cfg ]; then
  77. source ${prefix}/user.cfg
  78. if [ -n "${GRUB2_PASSWORD}" ]; then
  79. set superusers="root"
  80. export superusers
  81. password_pbkdf2 root ${GRUB2_PASSWORD}
  82. fi
  83. fi
  84. ### END /etc/grub.d/01_users ###
  85.  
  86. ### BEGIN /etc/grub.d/08_fallback_counting ###
  87. insmod increment
  88. # Check if boot_counter exists and boot_success=0 to activate this behaviour.
  89. if [ -n "${boot_counter}" -a "${boot_success}" = "0" ]; then
  90. # if countdown has ended, choose to boot rollback deployment,
  91. # i.e. default=1 on OSTree-based systems.
  92. if [ "${boot_counter}" = "0" -o "${boot_counter}" = "-1" ]; then
  93. set default=1
  94. set boot_counter=-1
  95. # otherwise decrement boot_counter
  96. else
  97. decrement boot_counter
  98. fi
  99. save_env boot_counter
  100. fi
  101. ### END /etc/grub.d/08_fallback_counting ###
  102.  
  103. ### BEGIN /etc/grub.d/10_linux ###
  104. insmod part_msdos
  105. insmod ext2
  106. set root='hd0,msdos1'
  107. if [ x$feature_platform_search_hint = xy ]; then
  108. search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 1ced9c65-d113-48bf-880c-59641a4b80b4
  109. else
  110. search --no-floppy --fs-uuid --set=root 1ced9c65-d113-48bf-880c-59641a4b80b4
  111. fi
  112. insmod part_msdos
  113. insmod ext2
  114. set boot='hd0,msdos1'
  115. if [ x$feature_platform_search_hint = xy ]; then
  116. search --no-floppy --fs-uuid --set=boot --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 1ced9c65-d113-48bf-880c-59641a4b80b4
  117. else
  118. search --no-floppy --fs-uuid --set=boot 1ced9c65-d113-48bf-880c-59641a4b80b4
  119. fi
  120.  
  121. # This section was generated by a script. Do not modify the generated file - all changes
  122. # will be lost the next time file is regenerated. Instead edit the BootLoaderSpec files.
  123. #
  124. # The blscfg command parses the BootLoaderSpec files stored in /boot/loader/entries and
  125. # populates the boot menu. Please refer to the Boot Loader Specification documentation
  126. # for the files format: https://systemd.io/BOOT_LOADER_SPECIFICATION/.
  127.  
  128. # The kernelopts variable should be defined in the grubenv file. But to ensure that menu
  129. # entries populated from BootLoaderSpec files that use this variable work correctly even
  130. # without a grubenv file, define a fallback kernelopts variable if this has not been set.
  131. #
  132. # The kernelopts variable in the grubenv file can be modified using the grubby tool or by
  133. # executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX
  134. # and GRUB_CMDLINE_LINUX_DEFAULT options from /etc/default/grub file are used to set both
  135. # the kernelopts variable in the grubenv file and the fallback kernelopts variable.
  136. if [ -z "${kernelopts}" ]; then
  137. set kernelopts="root=/dev/mapper/fedora00-root ro rd.lvm.lv=fedora00/root rd.lvm.lv=fedora00/swap rhgb quiet selinux=0 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 amd_pstate.enable=1 amd_pstate.shared_mem=1 "
  138. fi
  139.  
  140. insmod blscfg
  141. blscfg
  142. ### END /etc/grub.d/10_linux ###
  143.  
  144. ### BEGIN /etc/grub.d/10_reset_boot_success ###
  145. # Hiding the menu is ok if last boot was ok or if this is a first boot attempt to boot the entry
  146. if [ "${boot_success}" = "1" -o "${boot_indeterminate}" = "1" ]; then
  147. set menu_hide_ok=1
  148. else
  149. set menu_hide_ok=0
  150. fi
  151. # Reset boot_indeterminate after a successful boot
  152. if [ "${boot_success}" = "1" ] ; then
  153. set boot_indeterminate=0
  154. # Avoid boot_indeterminate causing the menu to be hidden more than once
  155. elif [ "${boot_indeterminate}" = "1" ]; then
  156. set boot_indeterminate=2
  157. fi
  158. # Reset boot_success for current boot
  159. set boot_success=0
  160. save_env boot_success boot_indeterminate
  161. ### END /etc/grub.d/10_reset_boot_success ###
  162.  
  163. ### BEGIN /etc/grub.d/12_menu_auto_hide ###
  164. if [ x$feature_timeout_style = xy ] ; then
  165. if [ "${menu_show_once}" ]; then
  166. unset menu_show_once
  167. save_env menu_show_once
  168. set timeout_style=menu
  169. set timeout=60
  170. elif [ "${menu_auto_hide}" -a "${menu_hide_ok}" = "1" ]; then
  171. set orig_timeout_style=${timeout_style}
  172. set orig_timeout=${timeout}
  173. if [ "${fastboot}" = "1" ]; then
  174. # timeout_style=menu + timeout=0 avoids the countdown code keypress check
  175. set timeout_style=menu
  176. set timeout=0
  177. else
  178. set timeout_style=hidden
  179. set timeout=1
  180. fi
  181. fi
  182. fi
  183. ### END /etc/grub.d/12_menu_auto_hide ###
  184.  
  185. ### BEGIN /etc/grub.d/14_menu_show_once ###
  186. if [ x$feature_timeout_style = xy ]; then
  187. if [ "${menu_show_once_timeout}" ]; then
  188. set timeout_style=menu
  189. set timeout="${menu_show_once_timeout}"
  190. unset menu_show_once_timeout
  191. save_env menu_show_once_timeout
  192. fi
  193. fi
  194. ### END /etc/grub.d/14_menu_show_once ###
  195.  
  196. ### BEGIN /etc/grub.d/20_linux_xen ###
  197.  
  198. ### END /etc/grub.d/20_linux_xen ###
  199.  
  200. ### BEGIN /etc/grub.d/20_ppc_terminfo ###
  201. ### END /etc/grub.d/20_ppc_terminfo ###
  202.  
  203. ### BEGIN /etc/grub.d/30_os-prober ###
  204. Found Windows 10 on /dev/sdb1
  205. menuentry 'Windows 10 (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-76749C98749C5D25' {
  206. savedefault
  207. insmod part_msdos
  208. insmod ntfs
  209. set root='hd0,msdos1'
  210. if [ x$feature_platform_search_hint = xy ]; then
  211. search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 --hint='hd0,msdos1' 76749C98749C5D25
  212. else
  213. search --no-floppy --fs-uuid --set=root 76749C98749C5D25
  214. fi
  215. parttool ${root} hidden-
  216. drivemap -s (hd0) ${root}
  217. chainloader +1
  218. }
  219. # Other OS found, undo autohiding of menu unless menu_auto_hide=2
  220. if [ "${orig_timeout_style}" -a "${menu_auto_hide}" != "2" ]; then
  221. set timeout_style=${orig_timeout_style}
  222. set timeout=${orig_timeout}
  223. fi
  224. ### END /etc/grub.d/30_os-prober ###
  225.  
  226. ### BEGIN /etc/grub.d/30_uefi-firmware ###
  227. Adding boot menu entry for UEFI Firmware Settings ...
  228. if [ "$grub_platform" = "efi" ]; then
  229. menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
  230. fwsetup
  231. }
  232. fi
  233. ### END /etc/grub.d/30_uefi-firmware ###
  234.  
  235. ### BEGIN /etc/grub.d/35_fwupd ###
  236. ### END /etc/grub.d/35_fwupd ###
  237.  
  238. ### BEGIN /etc/grub.d/40_custom ###
  239. # This file provides an easy way to add custom menu entries. Simply type the
  240. # menu entries you want to add after this comment. Be careful not to change
  241. # the 'exec tail' line above.
  242. ### END /etc/grub.d/40_custom ###
  243.  
  244. ### BEGIN /etc/grub.d/41_custom ###
  245. if [ -f ${config_directory}/custom.cfg ]; then
  246. source ${config_directory}/custom.cfg
  247. elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
  248. source $prefix/custom.cfg
  249. fi
  250. ### END /etc/grub.d/41_custom ###
  251. done
  252.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement