ubuntu修復swap分區

How to repair the swap partition in Ubuntu

There are situations when, after you just installed Ubuntu and properly configured the partitions, the swap is not recognized, meaning the system doesn't "see" it, so, you can't use that swap partition (the system will not perform as good as it should).

How can we repair it?
first, install GParted

sudo apt-get install gparted

open GParted, and search your swap (it should be named linux-swap or unknown) or choose a different partitions (like, for instance, you just observe a new unused 1/2/3 GB partition)

format the chosen partition (right-click on it-->Format to-->linux-swap)

and Apply All Operations

after this operation is completed, right-click on the new linux-swap-->Information--> and copy the text of the UUID and close GParted


open the terminal and type

sudo gedit /etc/fstab

and paste the copied text next to UUID=, then save


after that, make sure UUID= doesn't have # in front of it

Finally, restart your computer.


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章