Fdisk for linux hard disk partitioning Tool

Source: Internet
Author: User

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, another parted tool has to be used. Linux's understanding of hard disks is based on the/dev/hd | sd (a | B | xxx) method. hd is mainly used for IDE hard disks, this has rarely seen most of the hard disks starting with sd, including stata, sas, scsi, and other interfaces, 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, [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.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.