昨天快下班時公司突然停電, 是整個區域無預警停電, 電來了之後一些同時安裝了Windows XP及Linux的電腦啟動之後通通由本來執行Linux的變成Windows XP. 今天就必須一台一台重新開機換成Linux. 既然Linux比較常用, 應該把他們都改成Linux default. 怎麼改呢?


必須修改一個Linux裡的檔案

[root@localhost root]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/sda5
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=20
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8smp)
root (hd0,1)
kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/
initrd /initrd-2.4.20-8smp.img
title Red Hat Linux-up (2.4.20-8)
root (hd0,1)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
title WinXP
rootnoverify (hd0,0)
chainloader +1
[root@localhost root]#

本來是default=2, 所以自動啟動WinXP, 改成0之後下次就會自動啟動Linux

arrow
arrow
    全站熱搜

    minghanh 發表在 痞客邦 留言(0) 人氣()