vmware-ubuntu 16.04擴容

VMWare 的設置
沒有什麼能夠過多說的,徹底是圖形操做。這裏直接上圖吧:linux

1. 請注意填寫須要「擴容到」的 size, 而後就是一個稍顯漫長的等待過程。最終結果以下(我這裏是擴到了 500 GB)ide

Ubuntu 系統的分區
在虛擬機層面上作完以後,就到了操做系統啦。因爲咱們只是擴了容量,可是沒有分區,因此,默認狀況下Ubuntu系統是沒法是別的!!工具

這裏有不少種方法來操做。可是仍是推薦最簡單的方式 「Gparted」 工具。this

1. 首先是安裝,能夠選擇使用termial: 操作系統

apt-get install gparted
或者直接使用Ubuntu自帶的軟件安裝工具在線安裝。(畢竟咱們是Ubuntu啊!~~~) 安裝完成後啓動:3d

 

2. 首先刪除 「extended」分區中的「linux swap」, 而後再刪除「extened」。 這樣的目的是爲了將原分區(也就是咱們的主分區)和未分區的部分鏈接起來orm

 

3. 選擇sda1,而後右鍵 「resize/move」, 在其中填寫須要擴大到的sizeblog

 

 

注意: 這裏須要預留出一些空間爲 "Linux swap"rem

4. 建立「extended」分區,並在其中設置 "Linux swap"。 到這裏,咱們的全部步驟就都完成了。以下圖:get

 

後記 
當咱們擴容以後,發如今啓動VM的時候,出現了掛載錯誤,須要等待1分30秒。以下:

a start job is running for dev-disk-by (1min30s)

 

引發這個問題的緣由是 Linux swap 的 UUID 沒有更新。  

解決方法是:

1. 打開 GParted, 查看Swap的信息:

 

 

2. 將UUID的值,手動替換到文件 "etc/fstab" 中

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=c0c0cdac-85f8-414c-aa73-7b4cb7c0a982 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=fb866275-ba13-4971-ba82-86ece6c3e22e none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
 

3. 從新啓動VM,錯誤沒有再出現。搞定!!

相關文章
相關標籤/搜索