In linux, the hard disk partitioning tool fdiskfdisk is a hard disk partitioning tool in linux. The principle of hard disk partitioning is the same, but the tool format is different. one is the partition when the system is installed, one is the partition when the system is installed with the partition. after the system is installed, it is generally hard to modify or adjust it... in linux, fdisk is a hard disk partition tool with the same principle, but the tool format is different. one is the partition when the system is installed, one is the partition used when the system is installed in the partition. after the system is installed, it cannot be modified or adjusted. when the system is installed, the hard disk space is not partitioned, after installing the system, you can perform operations or partition loading. here, we mainly talk about this situation. one is to perform operations on unpartitioned idle hard disks, or fdisk is required for the newly added hard disk operation. However, this operation can only be performed on a hard disk of 2 TB or less. if it is larger than 2 TB, it cannot be used, we need to use another parted tool. Linux's understanding of hard disks is in the format of/dev/hd | sd (a | B | xxx ). IDE hard disks, most of which start with sd, including stata, sas, scsi, and other hard disks, for example, hda is the first hard disk, hdb is the second hard disk, sda is the first hard disk, and sdb is the second hard disk. it is also related to the interface sequence or jumper, you should know that there is a jumper in the hard disk interface, that is, a master hard disk. the fdisk usage is described below. fdisk-l is a list of all hard disks, as shown in [root @ hnwt ~]. # Fdisk-l Disk/dev/sda: 320.0 GB, 320071851520 bytes255 heads, 63 sectors/track, 38913 cylindersUnits = cylinders of 16065*512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sda1 * 1 13 104391 83 Linux/dev/sda2 14 38913 312464250 8e Linux LVM fdisk/ dev/sda indicates operating the hard disk, after running this operation, the interaction status of fdisk is displayed, as shown in [root @ hnwt ~]. # Fdisk/dev/sda The number of cylinders for this disk is set to 38913. there is nothing wrong with that, but this is larger than 1024, and cocould in certain setups cause problems with: 1) software that runs at boot time (e.g ., old versions of LILO) 2) booting and partitioning software from other OSs (e.g ., dos fdisk, OS/2 FDISK) Command (m for help): the following prompt is displayed: Press m to prompt a help, such as 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 delete partition l list known partition types list all supported partition types m print this menu is displayed in this menu, n add a new partition adds a new partition o create a new empty DOS partition table p print the partition table displays the partition information q quit without saving changes and exits without saving s create a new empty Sun disklabel t change a partition's system id change partition type u change display/entry units v verify the partition table w write table to disk and exit write to the partition table and exit x extra functionality (experts only) command (m for help): All the parameters are listed here. you can continue with the operation as prompted above, the following is a brief description of the newly added partition 1. Press n and add 2 to select the start value of primary partition/extended partition 3. by default, press enter to delete the partition size value. 1. press d2 to select the corresponding partition number, press enter to change the partition type. 1. select partitions by t2. 3. select the partition type (list all partitions and IDs by l). In linux, this operation is usually performed in a swap partition, when the preceding three operations are completed, you can press w to save and exit. if any operation is incorrect, Press q to exit.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.