原来多出来的是Ubuntu安装程序自动创建的扩展分区sda2和交换分区sda5。
我们用fdisk /dev/sdb看看新硬盘的分区情况:
Disk /dev/sdb: 8589 MB, 8589934592 bytes
heads, 63 sectors/track, 1044 cylinders, total 16777216 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 identifier: 0x25a3446b
Device Boot Start End Blocks Id System
分区表是空的,说明还没有分区存在。
3. 用fdisk将sdb硬盘分成两个区:3G和5G。
Disk /dev/sdb: 8589 MB, 8589934592 bytes
heads, 1 sectors/track, 195083 cylinders, total 16777216 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 identifier: 0x25a3446b
Device Boot Start End Blocks Id System
/dev/sdb1 2048 16777215 8387584 5 Extended
/dev/sdb5 4096 6295551 3145728 83 Linux
/dev/sdb6 6297600 16777215 5239808 83 Linux
分区完毕,使用ls /dev/sdb*命令就可以在/dev目录下找到我们的新分区了。