• grub学习内容


    关于manjaro中的grub的一些介绍


    注意:

    • grub的全局宏在linux系统中/etc/default/grub文件中,这可谓是全局配置文件。该文件定义的是grub的全局宏,通过修改该文件,可以根据制定的逻辑生成grub配置文件,在修改了grub文件之后,使用sudo update-grub来更新该文件。

    下面是我的一些配置文件

    
    #saved选择上次启动的系统,可以是数字,那么默认数字选项
    #GRUB_DEFAULT=saved
    GRUB_DEFAULT=2
    
    #设置超时时间
    GRUB_TIMEOUT=2
    
    #如果该key值没有设置或者设置为menu,那么列出启动菜单项,等待grub_timeout时间
    #如果设置为countdown或在hidden,那么不显示,等待超过grub_timeout时间
    GRUB_TIMEOUT_STYLE=hidden
    
    #设置发行版的标识名称
    GRUB_DISTRIBUTOR='My_Manjaro'
    
    #这里不应该有#号
    #GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor resume=UUID=d92f67e2-3c17-4239-b08e-f50639e611e5 udev.log_priority=3"
    #GRUB_CMDLINE_LINUX=""
    
    # If you want to enable the save default function, uncomment the following
    # line, and set GRUB_DEFAULT to saved.
    GRUB_SAVEDEFAULT=true
    
    # Preload both GPT and MBR modules so that they are not missed
    GRUB_PRELOAD_MODULES="part_gpt part_msdos"
    
    # Uncomment to enable booting from LUKS encrypted devices
    #GRUB_ENABLE_CRYPTODISK=y
    
    # Uncomment to use basic console
    GRUB_TERMINAL_INPUT=console
    
    # Uncomment to disable graphical terminal
    #GRUB_TERMINAL_OUTPUT=console
    
    # The resolution used on graphical terminal
    # note that you can use only modes which your graphic card supports via VBE
    # you can see them in real GRUB with the command 'videoinfo'
    GRUB_GFXMODE=auto
    
    # Uncomment to allow the kernel use the same resolution used by grub
    GRUB_GFXPAYLOAD_LINUX=keep
    
    # Uncomment if you want GRUB to pass to the Linux kernel the old parameter
    # format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
    #GRUB_DISABLE_LINUX_UUID=true
    
    # Uncomment to disable generation of recovery mode menu entries
    #设置为true时,不会生成恢复模式的菜单项
    GRUB_DISABLE_RECOVERY=true
    
    # Uncomment and set to the desired menu colors.  Used by normal and wallpaper
    # modes only.  Entries specified as foreground/background.
    GRUB_COLOR_NORMAL="light-gray/black"
    GRUB_COLOR_HIGHLIGHT="green/black"
    
    # Uncomment one of them for the gfx desired, a image background or a gfxtheme
    
    #设置grub菜单的背景图片
    #GRUB_BACKGROUND="/usr/share/grub/background.png"
    #设置grub菜单的主题
    GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"
    
    # Uncomment to get a beep at GRUB start
    
    #GRUB_INIT_TUNE="480 440 1"
    
    

    其中可以看到,一些宏

    • GRUB_DEFAULT

    这是设定的默认启动项,是根据启动项列表来控制的。推荐写数字,由0开始。如果写saved则表示默认的菜单项是"GRUB_SAVEDEFAULT"或"grub-set-default"所指定的菜单项。

    • GRUB_TIMEOUT

    这三设置启动等待时间选项如果超过了该选项,自动引导启动项启动,启动项为自己所设置的启动项。key是=?,如果?= -1,那么取消倒计时

    • GRUB_TIMEOUT_STYLE
    • GRUB_DISTRIBUTOR
    • GRUB_CMDLINE_LINUX_DEFAULT
    • GRUB_CMDLINE_LINUX
    • GRUB_SAVEDEFAULT
    • GRUB_PRELOAD_MODULES
    • GRUB_ENABLE_CRYPTODISK
    • GRUB_TERMINAL_INPUT
    • GRUB_TERMINAL_OUTPUT
    • GRUB_GFXMODE
    • GRUB_GFXPAYLOAD_LINUX
    • GRUB_DISABLE_LINUX_UUID
    • GRUB_DISABLE_RECOVERY
    • GRUB_COLOR_NORMAL
    • GRUB_COLOR_HIGHLIGHT
    • GRUB_BACKGROUND
    • GRUB_THEME
    • GRUB_INIT_TUNE

    待注释......


    同时,可以根据/etc/grub.d文件夹中的引导用户手册来修改相对应的文件从而格式化自己的grub。

    待研究......


    这是小睿的博客,如果需要转载,请标注出处啦~ヾ(≧▽≦*)o谢谢。
  • 相关阅读:
    对于HTML页面中CSS, JS, HTML的加载与执行过程的简单分析
    JavaScript中call,apply,bind方法的总结
    彻底理解js中this的指向,不必硬背
    cookie
    Cookie深度解析
    cookie和localstorage
    单页面应用和多页面应用
    can't access lexical declaration `a' before initialization
    http协议
    10、Javascript——数据类型(转载)
  • 原文地址:https://www.cnblogs.com/Yunrui-blogs/p/11748694.html
Copyright © 2020-2023  润新知