wffger的deepin指南-修改GRUB默认启动项
Tofloor
poster avatar
188******56
deepin
2018-06-19 06:29
Author
本帖最后由 wffger 于 2018-6-18 22:30 编辑


查看可选启动项
  1. cat /boot/grub/grub.cfg
Copy the Code
自定义启动项
  1. sudo gedit /etc/grub.d/40_custom
  2. #!/bin/sh
  3. exec tail -n +3 $0
  4. # This file provides an easy way to add custom menu entries.  Simply type the
  5. # menu entries you want to add after this comment.  Be careful not to change
  6. # the 'exec tail' line above.
  7. #自定义配置文件路径:/etc/grub.d/40_custom
  8. menuentry 'Deepin 15.6 GNU/Linux,Linux 4.15.0-21deepin-generic' --class deepin --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-21deepin-generic-advanced-f56d7e96-0b42-4b5b-905b-2591c399e54c' {
  9.         load_video
  10.         insmod gzio
  11.         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
  12.         insmod part_gpt
  13.         insmod ext2
  14.         set root='hd1,gpt2'
  15.         if [ x$feature_platform_search_hint = xy ]; then
            else
  16.           search --no-floppy --fs-uuid --set=root 3434e6de-86b0-49fd-8e33-c216f449a0e4
  17.         fi
  18.         linux        /vmlinuz-4.15.0-21deepin-generic root=UUID=f56d7e96-0b42-4b5b-905b-2591c399e54c ro  splash quiet
  19.         initrd        /initrd.img-4.15.0-21deepin-generic
  20. }
Copy the Code

修改默认启动项为第五项:
  1. cat /etc/default/grub
  2. # Written by com.deepin.daemon.Grub2
  3. GRUB_CMDLINE_LINUX_DEFAULT="splash quiet"
  4. GRUB_DEFAULT=4  #修改这里
  5. GRUB_DISABLE_RECOVERY="true"
  6. GRUB_DISTRIBUTOR="`/usr/bin/lsb_release -d -s 2>/dev/null || echo Deepin`"
  7. GRUB_GFXMODE="1920x1080"
  8. GRUB_TIMEOUT="5"
Copy the Code
更新配置
  1. sudo update-grub
Copy the Code
重启系统查看效果


Reply Favorite View the author
All Replies
avatar
与风长舞的叶
deepin
2018-06-19 18:29
#1
设置中心好像可以直接设置
Reply View the author
avatar
152******14
deepin
2018-06-19 19:10
#2
楼主 怎么默认启动4.4内核  
Reply View the author
avatar
188******56
deepin
2018-06-19 21:58
#3
https://bbs.deepin.org/post/158477
楼主 怎么默认启动4.4内核

你是嫌我写的不通俗?
Reply View the author
avatar
152******14
deepin
2018-06-19 22:17
#4
https://bbs.deepin.org/post/158477
你是嫌我写的不通俗?

我修改过这里,但是,修改的只是同一级顺序,并不是advance 里面的  不能内核的启动顺序。
Reply View the author
avatar
188******56
deepin
2018-06-20 02:35
#5
https://bbs.deepin.org/post/158477
我修改过这里,但是,修改的只是同一级顺序,并不是advance 里面的  不能内核的启动顺序。 ...

目的就是指定启动项啊,在最外层设置有何不可。你又不能同一时间启动系统两次。
Reply View the author