Creating a Partition on Fdisk
To be filled by the operating system or with other data, then ahard disk partition must be created first. For those accustomed to usingMS-DOS and MS-Windows, the partition is marked with a drive letter, such as drive C, driveD, etc..
In Linux, the partition name attached to a directory path, because it's free We callour directory. That is, could we make a separate partition on the foldersLinux system. Example, we can create a separate partition for / home, / temp, / etc,etc.. One benefit of creating a partition is, we can install as manyoperating system. Another advantage, we document files can be stored in a partitionseparately, so when the operating system is problematic and needs to be reinstalled, then the documentwe stay safe.
Partition is divided into three types, namely Primary, Extended and Logical Partition. In1 hard drive can only hold 4 primary partitions. If you want more than 4 partitions,then we need to use the extended partition. Where are we from extended partitioncan contain logical partitions with higher numbers. So in fact extended This is a container of logical partitions.To make a partition in Linux, together with the p command in MS-DOS, which is using fdisk.
Looking at what partitions already exist, use the command:
# Fdisk-lDisk / dev / hda
: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors / track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ Dev/hda1 * 1 1275 10,241,406 83 Linux
/ Dev/hda2 1276 1402 1020127 + 82 Linux swap / Solaris
/ Dev/hda3 1403 2677 10241437 + 83 Linux
/ Dev/hda4 2678 4865 17,575,110 5 Extended
/ Dev/hda5 2678 3569 7164958 + 83 Linux
Start Fdisk, can be done with fdisk command hdd.
Example:
# Fdisk / dev / hda
The number of cylinders for this disk is set to 4865.
There is nothing wrong with that, but this is larger than 1024,
and Could in Certain setups cause problems with:
1) That software runs at boot time (eg, old versions of LILO)
2) booting and partitioning software from other OSS
(E.g., DOS FDISK, OS / 2 FDISK)
Command (m for help):
Some frequently used commands areView a list of partitions
p = print the partition tablel
l= View the list of partition types supported by Linuxn
n= Creating a new partitiond
d= Deleting a partitionq
q= Quit without saving (undo)
w = Writing a new partition and exit (save).
The following steps create a new partition
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (3570-4865, default 3570):
Using default value 3570
Last cylinder or + size or + or + sizeK sizeM (3570-4865, default 4865): +500 M
Changing the partition type
Command (m for help): t
Partition number (1-6): 6
Hex code (type L to list codes): << fill in the desired partition type,press l to view the list >>
Save this partition:
Command (m for help): w
Partition has been made, but still can be used for formatting.
For that, restart your computer in order to recognize the new partition.
Then type this command
For the format type ext3 (depending on when creating the partition)
# Mkfs.ext3 / dev/hda6
To format a FAT32 type
# Mkdosfs / dev/hda6
Thus the creation of new partitions. BE CAREFUL with this partitioning, becauseYou can cause data loss when one partition.Remember, the new partition is not mounted automatically by Linux, so you be mounting with fstab to be mounted automatically.
In Linux, the partition name attached to a directory path, because it's free We callour directory. That is, could we make a separate partition on the foldersLinux system. Example, we can create a separate partition for / home, / temp, / etc,etc.. One benefit of creating a partition is, we can install as manyoperating system. Another advantage, we document files can be stored in a partitionseparately, so when the operating system is problematic and needs to be reinstalled, then the documentwe stay safe.
Partition is divided into three types, namely Primary, Extended and Logical Partition. In1 hard drive can only hold 4 primary partitions. If you want more than 4 partitions,then we need to use the extended partition. Where are we from extended partitioncan contain logical partitions with higher numbers. So in fact extended This is a container of logical partitions.To make a partition in Linux, together with the p command in MS-DOS, which is using fdisk.
Looking at what partitions already exist, use the command:
# Fdisk-lDisk / dev / hda
: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors / track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ Dev/hda1 * 1 1275 10,241,406 83 Linux
/ Dev/hda2 1276 1402 1020127 + 82 Linux swap / Solaris
/ Dev/hda3 1403 2677 10241437 + 83 Linux
/ Dev/hda4 2678 4865 17,575,110 5 Extended
/ Dev/hda5 2678 3569 7164958 + 83 Linux
Start Fdisk, can be done with fdisk command hdd.
Example:
# Fdisk / dev / hda
The number of cylinders for this disk is set to 4865.
There is nothing wrong with that, but this is larger than 1024,
and Could in Certain setups cause problems with:
1) That software runs at boot time (eg, old versions of LILO)
2) booting and partitioning software from other OSS
(E.g., DOS FDISK, OS / 2 FDISK)
Command (m for help):
Some frequently used commands areView a list of partitions
p = print the partition tablel
l= View the list of partition types supported by Linuxn
n= Creating a new partitiond
d= Deleting a partitionq
q= Quit without saving (undo)
w = Writing a new partition and exit (save).
The following steps create a new partition
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (3570-4865, default 3570):
Using default value 3570
Last cylinder or + size or + or + sizeK sizeM (3570-4865, default 4865): +500 M
Changing the partition type
Command (m for help): t
Partition number (1-6): 6
Hex code (type L to list codes): << fill in the desired partition type,press l to view the list >>
Save this partition:
Command (m for help): w
Partition has been made, but still can be used for formatting.
For that, restart your computer in order to recognize the new partition.
Then type this command
For the format type ext3 (depending on when creating the partition)
# Mkfs.ext3 / dev/hda6
To format a FAT32 type
# Mkdosfs / dev/hda6
Thus the creation of new partitions. BE CAREFUL with this partitioning, becauseYou can cause data loss when one partition.Remember, the new partition is not mounted automatically by Linux, so you be mounting with fstab to be mounted automatically.
cfdisk (create partision)
Start cfdisk
You start cfdisk from the command line with commandcfdisk / dev / sdx
where x is the SCSI hardisk letter, like a, b, c, d, etc. So if I want to partition the first hard drive on the SCSI controller, I would enter the command
cfdisk / dev / sda
How to use cfdisk
A. User interface
Once you have started cfdisk you'll get an interface where the partition table is currently listed with names and some data about each partition, and a command button at the bottom of the screen. To switch between the partitions, use the up and down arrow keys. To switch between the command, use the arrow keys left and right.
2. Deleting a partition
To remove an existing partition, highlight it with the up and down, select the Delete command to the left and right arrow keys, and press Enter.
3. Creating a new partition
To create a new partition, select the New command to the left and right arrow keys, and press enter. You will get a choice between primary and logical partitions. If you want a logical partition, the program will automatically create the extended partition for you. Then you must choose the partition size (in MB). If you can not enter a value in MB, return to the main screen with the Esc key, and select MB with the Units command.
4. Set the partition type
To set the type of partition, for bootable PReP, Linux swap or Linux ext2, highlight the actual partition, and select the command type. You will get a list of more than a different kind. Press space, and you'll get even more. Find what type you need, and enter the number at the prompt.
5. Make the partition bootable
To be able to boot from primary partitions, you need to make it bootable. Highlight the actual partition and select the Bootable command.
6. Writes the result to disk and exit
When you are satisfied with the layout of the disk, select the Write command. The partition table will be written to disk. Remember that this will destroy all data on partitions you have deleted or changed. Therefore you must be very sure that you want to do this before you actually press the Return key.
Tidak ada komentar:
Posting Komentar