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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

多种ubuntu引导修复方法

發布時間:2023/12/20 Ubuntu 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 多种ubuntu引导修复方法 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

引導異常

ubuntu經常由于各種原因導致系統引導異常,不能正常開機,不能進入到grub界面,或者不管選擇任何一種內核和模式進入都出現error: attempt to read or write outside of disk 'hd0’錯誤。針對這個情況,我采取過兩種方式。

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

準備工具:
1、具備EFI格式的ubuntu啟動盤;
2、一個不能正常引導的系統

測試環境:ubuntu16.04, nvidia 顯卡及驅動
tips:引導修復后如果出現循環登陸的問題,可以alt+ctrl+f2進行命令行模式,對nvidia顯卡驅動進行卸載,同時記錄自己顯卡驅動的版本,重啟后再安裝一次驅動即可。

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

一 僅使用boot-repair修復(時而失敗)

  • 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

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

然后按照提示進行操作并重啟。如果正常啟動就不用看下一步了,若還是不行,則為系統重裝一個引導。

二. 在磁盤頭新建一個引導,(也是使用boot-repair修復)

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

  • 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.

總結

以上是生活随笔為你收集整理的多种ubuntu引导修复方法的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。