ubuntu修复swap分区

来源:互联网 发布:java编程书籍 编辑:程序博客网 时间:2024/05/17 07:58

How to repair the swap partition in Ubuntu

http://www.iloveubuntu.net/how-repair-swap-partition-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.


原创粉丝点击