The fdisk command displays and modifies the partition table, often referred to as the partition map, for one or all disk drives. The partition table is stored on disk and is just a list of the cylinders, sectors, and blocks associated with each existing partition on the disk. When you start fdisk in interactive mode, it reads your disk's partition table into memory and enables you to make changes to that in-memory copy. Changes to the partition table are not actually written back to the disk until you explicitly use the w (write) command to do so. Do not issue the w command unless you are absolutely sure that you want to update a disk's partition map.
So go ahead and load fdisk with /dev/sda as the disk you are working with (see Listing 3-2). (We're using a different disk in the following examples from the one we used in Listing 3-1, so don't worry about the discrepancy between this listing and the previous fdisk -l example.)
Was this article helpful?