Saya sedang dalam proses menyiapkan serangan. sda
digunakan selama instalasi dan saya hanya menyalin tabel partisi dari sda
ke sdb
suka begitu:
$ sudo sfdisk -dL /dev/sda > partition_table_sda
$ sudo sfdisk /dev/sdb < partition_table_sda
Namun saya perhatikan bahwa sda
ada uuid untuk swapspace, tetapi sdb
tidak:
$ sudo blkid
/dev/sda5: UUID="vvvvvvvv-wwww-xxxx-yyyy-zzzzzzzzzzzz" TYPE="swap"
/dev/sda1: UUID="vvvvvvvv-wwww-xxxx-yyyy-zzzzzzzzzzzz" TYPE="ext4"
/dev/sdb1: UUID="vvvvvvvv-wwww-xxxx-yyyy-zzzzzzzzzzzz" TYPE="ext4"
Partisi terlihat benar, hanya saja uuid yang hilang:
$ sudo fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xzzzzzzzz
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 960002047 480000000 83 Linux
/dev/sda2 960004094 976771071 8383489 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5 960004096 976771071 8383488 82 Linux swap / Solaris
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xzzzzzzzz
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 960002047 480000000 83 Linux
/dev/sdb2 960004094 976771071 8383489 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sdb5 960004096 976771071 8383488 82 Linux swap / Solaris
Jadi bagaimana saya bisa menetapkan uuid ke swapspace sdb5
? Atau jika sudah memiliki uuid, bagaimana saya bisa mencetaknya?