隨身碟安裝Centos後拔除隨身碟無法啟動問題解決方案

來源:互聯網
上載者:User

標籤:

隨身碟安裝Centos後拔除隨身碟無法啟動問題解決方案 分類: Hadoop 2014-06-30 15:47 646人閱讀 評論(0) 收藏 舉報 今天安裝CentOS後發現把引導檔案安裝在隨身碟上了,所以不插隨身碟就無法進入CentOS系統,在網上找到這種方法成功擺脫隨身碟啟動,避免重新用隨身碟做引導盤安裝系統,簡單省事,所以發個帖,留著以後備用。

1.進入centos後開啟終端用root使用者進入grub模式
#grub   
grub>  find /grub/stage1 
Error 15: File not found
這是我的電腦出現的,再輸入
grub>find /boot/grub/stage1  find stage1 
find /boot/grub/stage1 find stage1
(hd0,7)

2.將CentOS的grub安裝到MBR

grub> root (hd0,7)
grub> setup (hd0)

這裡要和上面find裡查到的一致hd0表示第一塊硬碟 0表示第一個分區
3.重啟完成
grub> reboot

4.最後用vim修改/boot/grub/grub.conf,把所有(hd0,0)改成與前面find找到的一致,title others 改成 title windowsXP,我的是XP系統是在硬碟的第一個分區就是(hd0,0)。
#          all kernel and initrd paths are relative to /, eg.
#          root (hd1,7)
#          kernel /boot/vmlinuz-version ro root=/dev/sda8
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd0,7)/boot/grub/splash.xpm.gz
title CentOS (2.6.32-358.2.1.el6.i686)
        root (hd0,7)
        kernel /boot/vmlinuz-2.6.32-358.2.1.el6.i686 ro root=UUID=73023ee3-a312-49e7-990c-89a74f7bf89a rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet crashkernel=auto
        initrd /boot/initramfs-2.6.32-358.2.1.el6.i686.img
title CentOS (2.6.32-358.el6.i686)
        root (hd0,7)
        kernel /boot/vmlinuz-2.6.32-358.el6.i686 ro root=UUID=73023ee3-a312-49e7-990c-89a74f7bf89a rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /boot/initramfs-2.6.32-358.el6.i686.img
title windowsXP
        rootnoverify (hd0,0)
        chainloader +1
                                                              23,2-9   
然後重新啟動就可以看到啟動菜單了,從此擺脫隨身碟啟動。

隨身碟安裝Centos後拔除隨身碟無法啟動問題解決方案

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.