D
Size: a a a
AA
AA
fdisk -l /dev/sda4
IL
D
# fdisk -l /dev/sda4
You must set cylinders.
You can do this from the extra functions menu.
Disk /dev/sda4: 0 MB, 1024 bytes, 2 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda4p1 2048 1936111615 968054784 83 Linux
AA
sfdisk -d /dev/sda > sda.bak && cat sda.bak
D
# sfdisk -d /dev/sda > sda.bak && cat sda.bak
sfdisk: Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
# partition table of /dev/sda
unit: sectors
/dev/sda1 : start= 2048, size= 2048, Id=83
/dev/sda2 : start= 4096, size= 1024000, Id=83, bootable
/dev/sda3 : start= 1028096, size= 16384000, Id=82
/dev/sda4 : start= 17412096, size=1936111616, Id= 5
/dev/sda5 : start= 17414144, size=1936109568, Id=83
AA
AA
VS
IL
AA
VS
D
dd if=/dev/sda of=backup-sda.mbr bs=512 count=1
sfdisk -d /dev/sda > backup-sda.sfdisk
dd if=backup-sda.mbr of=/dev/sdb
sfdisk /dev/sdb < backup-sda.sfdisk
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 500M 0 part /boot
├─sda3 8:3 0 7.8G 0 part [SWAP]
├─sda4 8:4 0 1K 0 part
└─sda5 8:5 0 923.2G 0 part /
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 1M 0 part
├─sdb2 8:18 0 500M 0 part
├─sdb3 8:19 0 7.8G 0 part
├─sdb4 8:20 0 1K 0 part
└─sdb5 8:21 0 923.2G 0 part
AA
VS