Posts Tagged ‘blkid’

For some strange reason after I clone my Ubuntu 9.10 linux partition, my swap partition didn’t have UUID anymore and I can not view it via “blkid” and have to mount it to the device path (/dev/sda2) in /etc/fstab
After some googling I found the workaround :

1. View the UUID

cat /etc/initramfs-tools/conf.d/resume

2. Set off swap partition and apply the UUID found at no. 1

sudo su

swapoff -a
mkswap -U $(awk -F”=” ‘{print $3}’ /etc/initramfs-tools/conf.d/resume) /dev/sda2

3. Modify my /etc/fstab so the swap partition part contain the UUID

UUID=7b27ee38-6510-4cfa-9e8e-bc77a5e8ce4e none swap sw 0 0