

I/O size (minimum/optimal): 512 bytes / 512 bytesĪs we can see from the above fdisk output the disk currently has no partitions because it is a previously unused disk.

Sector size (logical/physical): 512 bytes / 512 bytes In order to view the current partitions on the disk enter the p command:ĭisk /dev/sdb: 34.4 GB, 34359738368 bytesĢ55 heads, 63 sectors/track, 4177 cylinders Switch off the mode (command 'c') and change display units toĪs instructed, switch off DOS compatible mode and change the units to sectors by entering the c and u commands: WARNING: DOS-compatible mode is deprecated.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) This is achieved using the fdisk utility which takes as a command-line argument the device to be partitioned # fdisk /dev/sdbĭevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelīuilding a new DOS disklabel with disk identifier 0xd1082b01.Ĭhanges will remain in memory only, until you decide to write them.Īfter that, of course, the previous content won't be recoverable. The next step is to create one or more Linux partitions on the new disk drive. To perform the former continues with this article.

Currently the drive has no partitions shown (because we have yet to create any).Īt this point we have a choice of creating partitions and file systems on the new drive and mounting them for access or adding the disk as a physical volume as part of a volume group. As shown above, the new hard drive has been assigned to the device file /dev/sdb. This shows that the disk drive represented by /dev/sda is itself divided into 2 partitions, represented by /dev/sda1 and /dev/sda2. The following is the output from a system with only one physical disk drive. For example, the first device might be /dev/sda, the second /dev/sdb and so on. Typically, the disk drives in a system is assigned to a device name beginning with ‘hd’ or ‘sd’ followed by a letter to indicate the device number. In this article, we will learn how to add a new hard disk drive to Linux OS, Assuming the drive is visible to the BIOS, it should automatically be detected by the operating system.
