歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux引導文件被破壞解決辦法

Linux引導文件被破壞解決辦法

日期:2017/2/28 16:30:17   编辑:Linux教程

Minimal BASH-like line editing is supported. Fot the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.
grub>

grub>ls #列出分區的盤,我的安裝再F盤
grub>ls (hd0,7)/ #找出WUBI安裝的盤
grub>insmod ntfs #加載ntfs模塊,因為WUBI將Ubuntu安裝到了我分的ntfs盤上
grub>set root=(hd0,7) #這裡(hd0,7)就是我找到的ubuntu安裝的分區
grub>ls $Boot #找到我們BOOT分區的UUID,下一步要用到
grub>search --no-floppy --fs-uuid --set xxxxxxxxxxxx #這裡的UUID就是上一定找出來的那個
grub>loopback loop0 /ubuntu/disks/root.disk #設loop0,WUBI裝ubuntu安裝成了一個root.disk文件
grub>set root=(loop0) #重設root
grub>linux /boot/vmlinuzxxxxxxxxx (tab補全即可) root=/dev/sda7 loop=/ubuntu/disks/root.disk ro quiet splash #加載內核
grub>initrd /boot/initrd.imgxxxxxxxxxxxx(tab 補全即可)
gurb>boot
這樣11個步驟後就可以進入系統了。

進入系統後,打開終端,輸入以下3行:
$sudo update-grub2
$sudo apt-get install grub2
$sudo reboot
重啟後下次就不會出現黑屏問題了。

Copyright © Linux教程網 All Rights Reserved