根据磁头、扇区、柱面计算硬盘分区大小
时间:2006-11-28 来源:mishuang
msh:/usr/local/bochs # losetup /dev/loop0 c.img
msh:/usr/local/bochs # fdisk /dev/loop0
Command (m for help): x
Expert command (m for help): p
Disk /dev/loop0: 16 heads, 63 sectors, 365 cylinders
Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
1 80 1 1 0 15 63 121 63 122913 81
2 00 0 1 122 15 63 243 122976 122976 81
3 00 0 1 244 15 63 364 245952 121968 05
4 00 0 0 0 0 0 0 0 0 00
5 00 1 1 244 15 63 309 1 66527 82
6 00 1 1 310 15 63 364 1 55439 81
1) 16 * 63 * (121 - 0 + 1) - 63 = 122913
2) 16 * 63 * (243 - 122 + 1) = 122976
3) 16 * 63 * (364 - 244 + 1) = 121968
5) 16 * 63 * (309 - 244 + 1) - 1 = 66527
6) 16 * 63 * (364 - 310 + 1) - 1 = 55439
msh:/usr/local/bochs # fdisk /dev/loop0
Command (m for help): x
Expert command (m for help): p
Disk /dev/loop0: 16 heads, 63 sectors, 365 cylinders
Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
1 80 1 1 0 15 63 121 63 122913 81
2 00 0 1 122 15 63 243 122976 122976 81
3 00 0 1 244 15 63 364 245952 121968 05
4 00 0 0 0 0 0 0 0 0 00
5 00 1 1 244 15 63 309 1 66527 82
6 00 1 1 310 15 63 364 1 55439 81
1) 16 * 63 * (121 - 0 + 1) - 63 = 122913
2) 16 * 63 * (243 - 122 + 1) = 122976
3) 16 * 63 * (364 - 244 + 1) = 121968
5) 16 * 63 * (309 - 244 + 1) - 1 = 66527
6) 16 * 63 * (364 - 310 + 1) - 1 = 55439
相关阅读 更多 +