Type(Type) 2016/7/25 20:34
Convert Extended Linux partition into Primary one (e.g 5->4)
代碼:
$ sfdisk -d /dev/sda
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= 409600, Id= 6, bootable
/dev/sda2 : start= 411648, size= 1024000, Id=83
/dev/sda3 : start= 1435648, size= 2621440, Id=82
/dev/sda4 : start= 4057088, size=1949466624, Id= 5
/dev/sda5 : start= 4059136, size= 27262976, Id=83
$ sfdisk -d /dev/sda > part.txt
$ vim part.txt
#################### edit to remove /dev/sda4
#################### rename /dev/sda5 to /dev/sda4
# partition table of /dev/sda
unit: sectors
/dev/sda1 : start= 2048, size= 409600, Id= 6, bootable
/dev/sda2 : start= 411648, size= 1024000, Id=83
/dev/sda3 : start= 1435648, size= 2621440, Id=82
/dev/sda4 : start= 4059136, size= 27262976, Id=83
$ sfdisk --force /dev/sda < part.txt
(6,517 views)
© Vovo2000.com Mobile Version 小哈手機版 2024