Technology computers-hardware

How to Add a Partition With FDisk in Linux

    • 1). Log in to the computer as user "root" to acquire the privileges needed for manipulating raw storage devices. Launch a command shell, either by logging in in text mode, or by launching a terminal window from the graphical user interface.

    • 2). Invoke "fdisk" on the hard disk where you want the new partition by typing the following command into the shell:

      fdisk /dev/sdb

      Replace "/dev/sdb" with the name of that particular disk on your Linux system. Press "Enter." fdisk will start and present you with a command prompt.

    • 3). Type "p", then press "Enter" to list existing partitions. Because each partition gets listed with its starting and ending cylinder numbers, the list will allow you to decide where you want to place the new partition; it must be within a cylinder interval not yet used by an existing partition.

    • 4). Type "n", then press "Enter" to create the new partition. Type "p" to create a primary partition or "e" to create an extended partition. Enter the number of the starting cylinder, then the number of the last cylinder. List the partitions again with "p" as in Step 3 to confirm that the new one was created. At that point, your hard disk has a new partition that is ready to store data.



Leave a reply