Linux下如何用fdisk新建分区

fdisk磁盘分区工具1.首先查看硬盘信息fdisk -l 如果有硬盘有剩余空间就可以对其进行分区 [root@bogon 桌面]# fdisk -lDisk /dev/sda: 85.9 GB, 85899345920 bytes255 heads, 63 sectors/track, 10443 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000471ad Device Boot Start End Blocks Id System/dev/sda1 * 1 26 204800 83 LinuxPartition 1 does not end on cylinder boundary./dev/sda2 26 3851 30720000 83 Linux/dev/sda3 3851 4106 2048000 82 Linux swap / Solaris/dev/sda4 4106 10444 50912256 5 Extended/dev/sda5 4106 10444 50911232 83 LinuxDisk /dev/sdb: 21.5 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000#从上面看出/dev/sda空间已经用完了,/dev/sdb没有使用。下面我们对/dev/sdb 进行分区[root@bogon 桌面]# fdisk /dev/sdbDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel with disk identifier 0xfaa2aa49.Changes will remain in memory only, until you decide to write them.After that, of course, the previous content won’t be recoverable.Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)WARNING: DOS-compatible mode is deprecated. It’s strongly recommended to switch off the mode (command ‘c’) and change display units to sectors (command ‘u’).Command (m for help): mCommand action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition’s system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only)fdisk选中/dev/sdb 输入m所有基本选项都出现,输入n新建分区Command (m for help): nCommand action e extended p primary partition (1-4)

,积极的人在每一次忧患中都看到一个机会,而消极的人则在每个机会都看到某种忧患。

Linux下如何用fdisk新建分区

相关文章:

你感兴趣的文章:

标签云: