[Ubuntu] Cara Mengaktifkan Partisi Swap yang Tidak Terdeteksi
Ubuntu yang saya gunakan tidak mengenali partisi swap padahal partisinya sudah tersedia. Hal ini saya ketahui setelah membuka System Monitor tab Resources seperti yang terlihat pada gambar.
Berikut cara mengatasi masalah swap :
Cek UUID dari partisi swap
1 | blkid |
Hasilnya
1 2 3 4 5 | /dev/sda1: UUID="db97fa0c-9285-4f47-8d4c-8ef8f7a94472" TYPE="swap" /dev/sda5: LABEL="data1" UUID="0ec9925e-ebb7-4b77-ad1e-3db10f917b2d" TYPE="ext4" /dev/sda6: LABEL="data2" UUID="45b1a69c-0c01-4e3d-8b4b-afc06f1851bf" TYPE="ext4" /dev/sda7: LABEL="data3" UUID="ecaf64ec-0f2c-4a4c-90cd-b6a769341b1f" TYPE="ext4" /dev/sda8: LABEL="system" UUID="605d2664-3ac5-4a6b-84ff-06d118cfa5b9" TYPE="ext4" |
sda1 merupakan partisi swap.
Copy UUID partisi swap.
Edit file fstab
1 | sudo gedit /etc/fstab |
Isi file fstab
1 2 3 4 5 6 7 8 9 10 11 12 | # /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/sda8 during installation UUID=605d2664-3ac5-4a6b-84ff-06d118cfa5b9 / ext4 errors=remount-ro 0 1 # swap was on /dev/sda1 during installation UUID=59ffa306-e71a-46c4-8094-3bac0d787314 none swap sw 0 0 |
Ganti UUID swap dengan UUID yang sudah dicopy sebelumnya
Lalu save
1 2 | # swap was on /dev/sda1 during installation UUID=db97fa0c-9285-4f47-8d4c-8ef8f7a94472 none swap sw 0 0 |
Lalu aktifkan partisi swap yang terletak pada partisi /dev/sda1
1 | sudo swapon /dev/sda1 |
Cek lagi System Monitor apakah partisi swap sudah dikenali
selamat mencoba 🙂