首頁 繪圖設計 工作閒聊 比賽活動 美術討論 標籤 圖片
Convert Extended Linux partition into Primary one (e.g 5->4)
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


(3,660 views)
[更多討論] 討論區 Windows, Linux, Perl, PHP, C/C++, Driver, Web 理論、應用、硬體、軟體

"Convert Extended Linux partition into Primary one (e.g 5->4)" 傳統頁面(電腦版)

首頁 繪圖設計 工作閒聊 比賽活動 美術討論 標籤 圖片
傳統桌面版 [ 登入/註冊 ]
© Vovo2000.com Mobile Version 小哈手機版 2024