多种ubuntu引导修复方法
引導(dǎo)異常
ubuntu經(jīng)常由于各種原因?qū)е孪到y(tǒng)引導(dǎo)異常,不能正常開機,不能進入到grub界面,或者不管選擇任何一種內(nèi)核和模式進入都出現(xiàn)error: attempt to read or write outside of disk 'hd0’錯誤。針對這個情況,我采取過兩種方式。
https://help.ubuntu.com/community/BootPartition
準備工具:
1、具備EFI格式的ubuntu啟動盤;
2、一個不能正常引導(dǎo)的系統(tǒng)
測試環(huán)境:ubuntu16.04, nvidia 顯卡及驅(qū)動
tips:引導(dǎo)修復(fù)后如果出現(xiàn)循環(huán)登陸的問題,可以alt+ctrl+f2進行命令行模式,對nvidia顯卡驅(qū)動進行卸載,同時記錄自己顯卡驅(qū)動的版本,重啟后再安裝一次驅(qū)動即可。
一 僅使用boot-repair修復(fù)(時而失敗)
- Step 1 - Boot on a liveCD or liveUSB
Boot your computer either on:
-
a Linux-Secure-Remix liveCD or liveUSB, then choose “Try Ubuntu”, then go directly to Step 3 below.
-
or a Ubuntu live-CD or live-USB, choose “Try Ubuntu”, then go to Step 2 below.
使用啟動盤或者光盤開機。
Step 2 - Install Boot-Repair in the live-session
Once in the Ubuntu live session, install Boot-Repair this way:
Connect internet
Open a terminal (Ctrl+Alt+T) and type :
打開終端輸入如下指令,安裝boot-repair
然后按照提示進行操作并重啟。如果正常啟動就不用看下一步了,若還是不行,則為系統(tǒng)重裝一個引導(dǎo)。
二. 在磁盤頭新建一個引導(dǎo),(也是使用boot-repair修復(fù))
step1 step2安裝以上操作僅安裝boot-repair工具,但不需要運行。
接下來的工作為將硬盤中的所有資料全部向后移動一定大小,而后在磁盤頭新建一個free space,然后通過boot-repair在這個空的分區(qū)中新建一個引導(dǎo)。
Step 3 - Run gParted
Launch gParted from either:
-
the Dash (Ubuntu 11.04 and next): click the Ubuntu logo in the top-left corner of the screen, then type gparted and click on the gParted icon that will appear.
-
or System->Administration->gParted menu (Ubuntu 10.04)
-
or by typing gksudo gparted in a terminal
打開工具gParted
Step 4 - Create a 1GB partition at the start of the disk
Via gParted: -
Reduce one of the first partitions of the disk in order to create 1GB (=1000MiB) of free space at the start of the disk where Ubuntu is installed. This free space must be located inside the first 100GB of the disk (its end must not be located at more than 100GB from the start of the disk). Important: to resize Windows Vista/7/8 partitions, don’t use gParted but Windows tools instead.
-
In this free space, create a 1GB partition formatted in EXT4.
-
On a paper, note the name of this new 1GB partition. This is generally something like /dev/sdXY (X is a letter, Y is a number).
通過這個工具在ubuntu系統(tǒng)的磁盤頭創(chuàng)建1G的ext4分區(qū),并記住這個分區(qū)的名字。
Step 5 - Run Boot-Repair
Launch Boot-Repair from either: -
the Dash (Ubuntu 11.04 and next): click the Ubuntu logo in the top-left corner of the screen, then type boot and click on the Boot-Repair icon that will appear.
-
or System->Administration->Boot-Repair menu (Ubuntu 10.04)
-
or by typing boot-repair in a terminal
打開boot-repair
Step 6 - Choose the right option
In Boot-Repair: -
Click on Advanced Options
-
Go to the GRUB location tab
-
Tick the “Separate /boot partition: sdXY” option (sdXY must be your 1GB partition)
選擇advanced-options,然后按照上圖將Separate /boot partition設(shè)置到剛剛新建的分區(qū)中。這一步可能需要等待很長時間,因此需要將所有文件剪切到1G的磁盤后。所以可以在之前將不需要用的日志等冗余數(shù)據(jù)刪除或者早點拷貝出來。
-
Click “Apply”
-
Note on a paper the URL (paste.ubuntu.com/XXXXXX/) that will appear.
-
Shutdown the computer
-
Remove the liveCD and/or liveUSB
-
Start the computer. You should now be able to boot into Ubuntu.
總結(jié)
以上是生活随笔為你收集整理的多种ubuntu引导修复方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: golang实现link的过程
- 下一篇: 友善地对待Netscape 4