grub2将windows设为默认启动项
修改/etc/default/grub
GRUB_DEFAULT=0
改为:
GRUB_DEFAULT="WindowsVista(loader)(on/dev/sdc1)"
然后update-grub即可。
sudoupdate-grub
其中用到的字符串可以在/boot/grub/grub.cfg中找到。
user@YourComputer:~$grepmenuentry/boot/grub/grub.cfg
menuentry'Ubuntu,withLinux2.6.35-31-generic'--classubuntu--classgnu-linux--classgnu--classos{
menuentry'Ubuntu,withLinux2.6.35-31-generic(recoverymode)'--classubuntu--classgnu-linux--classgnu--classos{
menuentry'Ubuntu,withLinux2.6.35-30-generic'--classubuntu--classgnu-linux--classgnu--classos{
menuentry'Ubuntu,withLinux2.6.35-30-generic(recoverymode)'--classubuntu--classgnu-linux--classgnu--classos{
menuentry"Memorytest(memtest86+)"{
menuentry"Memorytest(memtest86+,serialconsole115200)"{
menuentry"WindowsNT/2000/XP(loader)(on/dev/sda1)"{
menuentry"Ubuntu,withLinux2.6.32-34-generic(on/dev/sdb1)"{
menuentry"Ubuntu,withLinux2.6.32-34-generic(recoverymode)(on/dev/sdb1)"{
menuentry"Ubuntu,withLinux2.6.32-33-generic(on/dev/sdb1)"{
menuentry"Ubuntu,withLinux2.6.32-33-generic(recoverymode)(on/dev/sdb1)"{
menuentry"WindowsVista(loader)(on/dev/sdc1)"{