
增加Swap區域和RAM大小後,/dev/sda2
已成為Swap區域,並且swap的UUID發生變化。當啟動後首次出現 Ubuntu 圖示時,會出現一條長線,顯示一些 UUID 編號半秒,然後消失,就像出現錯誤一樣。但我可以存取作業系統。如何驗證是否有錯誤或檔案系統已接受新的交換區域?我已經記下了舊交換區的UUID。也可以看看:
madhu@madhu-desktop:~$ cat /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>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID= (Is same) ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID= (Starts in 7 and ends in 5) none swap sw 0 0
madhu@madhu-desktop:~$ swapon -s
Filename Type Size Used Priority
答案1
您可以從終端機使用以下命令:
swapon -s
顯示交換設備和大小
cat /proc/meminfo
顯示總交換空間,可用交換空間
cat /proc/swaps
顯示正在使用哪些交換設備
答案2
系統啟動後使用以下命令:
swapon --show
這將顯示哪些分區啟用了交換。
如果要尋找交換類型分割區的UUID:
sudo blkid | grep swap
答案3
使用以下終端命令一一驗證交換區資料。
swapon -s
cat /proc/meminfo
cat /proc/swaps
然後一一使用以下命令。
sudo blkid -c /dev/null -o list
gksudo gedit /etc/fstab
Swap區的UUID可能不同。在 gedit 中編輯交換區域的 UUID,以便安裝時的 UUID 應與新的交換區域相符。保存。
這修復了錯誤。