marketing information is wealth: Using Linux fdisk

Monday, November 9, 2009

Using Linux fdisk

To find out what partitions exist on a computer and to modify those partitions you need to use the Linux fdisk program. To start fdisk enter the command (I again ignore the command prompt)
fdisk /dev/hda
where hda refers to the first hard disk drive on the computer. To work on the second disk drive, change this to hdb. You will receive the reply
Command (m for help):
and after typing m your screen will appear as follows:
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help):
To find out what the existing partitions are on the hard disk, press p. Your screen will appear as follows.
Command (m for help): p
Disk /dev/hda: 255 heads, 63 sectors, 789 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 382 3068383+ b Win95 FAT32
/dev/hda2 383 550 1349460 83 Linux
/dev/hda3 551 567 136552+ 82 Linux swap
/dev/hda4 568 789 1783215 83 Linux

No comments: