日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

多种ubuntu引导修复方法

發(fā)布時(shí)間:2023/12/20 Ubuntu 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 多种ubuntu引导修复方法 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

引導(dǎo)異常

ubuntu經(jīng)常由于各種原因?qū)е孪到y(tǒng)引導(dǎo)異常,不能正常開機(jī),不能進(jìn)入到grub界面,或者不管選擇任何一種內(nèi)核和模式進(jìn)入都出現(xiàn)error: attempt to read or write outside of disk 'hd0’錯(cuò)誤。針對這個(gè)情況,我采取過兩種方式。

https://help.ubuntu.com/community/BootPartition

準(zhǔn)備工具:
1、具備EFI格式的ubuntu啟動盤;
2、一個(gè)不能正常引導(dǎo)的系統(tǒng)

測試環(huán)境:ubuntu16.04, nvidia 顯卡及驅(qū)動
tips:引導(dǎo)修復(fù)后如果出現(xiàn)循環(huán)登陸的問題,可以alt+ctrl+f2進(jìn)行命令行模式,對nvidia顯卡驅(qū)動進(jìn)行卸載,同時(shí)記錄自己顯卡驅(qū)動的版本,重啟后再安裝一次驅(qū)動即可。

sudo apt purge nvidia-* //remove nvidia driver sudo apt-get install nvidia-驅(qū)動型號(nvidia-384) //install nvidia driver

一 僅使用boot-repair修復(fù)(時(shí)而失敗)

  • 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.
    使用啟動盤或者光盤開機(jī)。
    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

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get updatesudo apt-get install -y boot-repairsudo boot-repair

然后按照提示進(jìn)行操作并重啟。如果正常啟動就不用看下一步了,若還是不行,則為系統(tǒng)重裝一個(gè)引導(dǎo)。

二. 在磁盤頭新建一個(gè)引導(dǎo),(也是使用boot-repair修復(fù))

step1 step2安裝以上操作僅安裝boot-repair工具,但不需要運(yùn)行。
接下來的工作為將硬盤中的所有資料全部向后移動一定大小,而后在磁盤頭新建一個(gè)free space,然后通過boot-repair在這個(gè)空的分區(qū)中新建一個(gè)引導(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).
    通過這個(gè)工具在ubuntu系統(tǒng)的磁盤頭創(chuàng)建1G的ext4分區(qū),并記住這個(gè)分區(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ū)中。這一步可能需要等待很長時(shí)間,因此需要將所有文件剪切到1G的磁盤后。所以可以在之前將不需要用的日志等冗余數(shù)據(jù)刪除或者早點(diǎn)拷貝出來。

  • 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)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。