After starting the Virtual Machine Software VMWare, click the VM menu and select setting. Then, select the Add command in the pop-up menu to add the hard disk. Start the VM.
1. Create a partition # Fdisk
-L view disk partitions. At this time, you will find that the last line of/dev/hda is: Disk/dev/hda doesn't contain
Valid partition table. (In addition, I added an IDE hard disk. If you add a SCSI hard disk, it will display:/dev/sdb)
# Fdisk/dev/hda prompt:
Command (M for help): n press enter (here typing M is help, typing N is to create a partition, we select n to create a partition)
Command action
E extended (create an extended partition)
P primary partition (1-4) (create primary partition)
E (enter e and press Enter)
Partition Number (1-4): 1 (number of partitions, set according to your actual needs .)
First cylinder (1-6241, default1)
Last cylinder or...: Enter the default value. (Number of ended cylinders)
WQ is saved and exited.
Fdisk
-L view partition information: two more lines are added; first behavior: Device boot start end blocks ID system
The corresponding second line is/dev/hda1 1 6241 valid 3145423 + extended (the number varies depending on the size of your own hard disk)
# Fdisk/dev/hda
Command (M for help): n press enter (here typing M is help, typing N is to create a partition, we select n to create a partition)
Command action
L logical (5 or over) (create a logical partition. in Linux, the logical partition is a number after 5)
P primary partition (1-4) (create primary partition)
L (small L creates logical partitions)
If multiple logical partitions are created for the same extended partition, the last cylinder or... is used to enter a specific value, and the next logical partition is followed by the last cylindrical extension)
WQ save and exit
Fdisk-l view partition information (I divided two logical partitions, including/dev/hda5/dev/hda6)
2. format the partition: mkfs-T ext2/dev/hda5 (hda6) (you can select different partition formats based on the actual situation) 3. Mount the partition: # mkdir/mnt/hda5 (hda6) # Mount/dev/hda5/mnt/hda5 (same as hda6) 4. Mount the hard disk at startup VI/etc/fstab
/Dev/hda5/mnt/hda5 ext2 defaults 0 0
/Dev/hda6/mnt/hda6 ext2 defaults 0 0
The preceding operations enable the system to automatically mount the two partitions at startup.
5. Use DF-lH to view partition usage.
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.