---
title: "grub2更改启动顺序"
author: "smallsmile"
date: "2012-12-29T10:23:01Z"
tags: []
categories: ["操作系统"]
slug: "grub2"
draft: false
lastmod: "2012-12-29T10:23:01Z"
id: 1756819
url: "https://smallsmile.iteye.com/blog/1756819"
---

grub2是通过/etc/grub.d/目录下的文件顺序来决定启动项顺序的 

$cd /etc/grub.d 

$ls -l 

-rwxr-xr-x 1 root  root  3296 2009-10-24 08:44 00\_header 

-rwxr-xr-x 1 root  root  1154 2009-10-24 08:31 05\_debian\_theme 

-rwxr-xr-x 1 root  root  3778 2009-10-24 08:44 10\_linux 

-rwxr-xr-x 1 root  root   772 2009-10-24 00:11 20\_memtest86+ 

-rwxr-xr-x1 shawn shawn 5467 2010-04-17 23:52 30\_os-prober 

-rwxr-xr-x 1 root  root   214 2009-10-24 08:44 40\_custom 

-rw-r–r– 1 root  root   483 2009-10-24 08:44 README 

 

可以新建和改变文件的顺序来配置gurb2的启动顺序。 

我们只要把30\_os-prober的顺序设置到10\_linux之前就可以让[windows](http://www.2cto.com/os/windows/)的选项在linux之前。 

把30\_os-prober复制一份并且重命名为09\_os-prober。 

然后去掉30\_os-prober的可执行权限。 

执行update-grub，DONE。