国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 服務器 > Web服務器 > 正文

永久修改grub2啟動順序

2024-09-01 13:47:32
字體:
來源:轉載
供稿:網友
永久修改grub2啟動順序
 
grub2是通過/etc/grub.d/目錄下的文件順序來決定啟動項順序的:
 
[html] 
$cd /etc/grub.d  
$ls -l  
  
-rwxr-xr-x 1 root root 6743  9月 13  2012 00_header  
-rwxr-xr-x 1 root root 5522  4月 18  2012 05_debian_theme  
-rw-r--r-- 1 root root 7603  4月 18  2012 08_os-prober  
-rwxr-xr-x 1 root root 7780  1月 23  2013 10_linux  
-rwxr-xr-x 1 root root 7603  9月 20 13:48 17_os-prober  
-rwxr-xr-x 1 root root 6335  4月 18  2012 20_linux_xen  
-rwxr-xr-x 1 root root 1588 11月 27  2011 20_memtest86+  
-rwxr-xr-x 1 root root 1388  1月 23  2013 30_uefi-firmware  
-rwxr-xr-x 1 root root  214  4月 18  2012 40_custom  
-rwxr-xr-x 1 root root   95  4月 18  2012 41_custom  
-rw-r--r-- 1 root root  483  4月 18  2012 README  
 
08_os-prober是我之前為了默認啟動項為win8而改的,因為現在又改成ubuntu為默認啟動了,所以將08_os-prober的權限修改為不可執行的。該目錄下有個readme
翻譯如下:
 
該目錄下的可以執行文件的順序是按照shell擴展來排列的(就是按首字符排列的意思,用來配置grub的順序)。
 
00_開頭的文件是預留給00_header的
 
 
10_開頭的用于系統本身
 
 
20_開頭的用于第三方程序
 
可以新建和改變文件的順序來配置gurb2的啟動順序。
 
知道以上這些就好辦了。我們只要把08_os-prober的順序設置到10_linux之后就可以讓windows的選項在linux之后了。
 
運行以下命令把08_os-prober復制一份并且重命名為17_os-prober:
 
[html] 
$sudo cp 08_os-prober 17_os-prober  
[html] 
$sudo chmod 644 08_os-prober   //去掉08_os-prober的可執行權限  
$ls -l  
  
  
-rwxr-xr-x 1 root root 6743  9月 13  2012 00_header  
-rwxr-xr-x 1 root root 5522  4月 18  2012 05_debian_theme  
-rw-r--r-- 1 root root 7603  4月 18  2012 08_os-prober  
-rwxr-xr-x 1 root root 7780  1月 23  2013 10_linux  
-rwxr-xr-x 1 root root 7603  9月 20 13:48 17_os-prober  
-rwxr-xr-x 1 root root 6335  4月 18  2012 20_linux_xen  
-rwxr-xr-x 1 root root 1588 11月 27  2011 20_memtest86+  
-rwxr-xr-x 1 root root 1388  1月 23  2013 30_uefi-firmware  
-rwxr-xr-x 1 root root  214  4月 18  2012 40_custom  
-rwxr-xr-x 1 root root   95  4月 18  2012 41_custom  
-rw-r--r-- 1 root root  483  4月 18  2012 README  
 
 
然后打開/etc/default/grub文件把默認啟動項改成你要得那個:
 
[html] 
$sudo vim /etc/default/grub  
 
找到GRUB_DEFAULT=,改成9.(因為linux是從0開始計數的)
 
 
然后更新grub即可:sudo update-grub
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 陆良县| 嘉兴市| 蓬安县| 佛学| 怀安县| 宁乡县| 新营市| 玉门市| 新巴尔虎右旗| 武定县| 赤峰市| 应用必备| 车险| 外汇| 武鸣县| 上饶县| 上思县| 枞阳县| 察哈| 都江堰市| 凤山市| 肥城市| 清涧县| 徐闻县| 化州市| 麟游县| 朝阳县| 筠连县| 山阳县| 康平县| 板桥市| 丹巴县| 仁怀市| 丽水市| 长顺县| 咸宁市| 洪洞县| 四川省| 化隆| 宜阳县| 渝北区|