82 Part I . SUSE (Web hosting company) Linux Basics What
Tuesday, July 31st, 200782 Part I . SUSE Linux Basics What Does fdisk Really Do? 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 let s go ahead and load fdisk with /dev/hda as the disk we will be 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.) Listing 3-2: Using fdisk to Edit /dev/hda bible:~ # fdisk /dev/hda The number of cylinders for this disk is set to 31207. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/hda: 16.1 GB, 16105807872 bytes 16 heads, 63 sectors/track, 31207 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Device Boot Start End Blocks Id System /dev/hda1 1 1041 524632+ 82 Linux swap /dev/hda2 * 1042 7283 3145968 83 Linux /dev/hda3 7284 11445 2097648 83 Linux Command (m for help): As you can see in the preceding listing, fdisk presents you with a warning about the size of the disk. The warning relates to older systems and disks and is not especially relevant these days. Older operating systems used to talk to the disks in a
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.