The difference:
Code:
root@thinkpad:/home/zmk# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda8 11G 3.8G 6.2G 38% /
/dev/sda7 29G 7.9G 19G 30% /home
/dev/sda6 30G 4.2G 25G 15% /usr/local
tmpfs 252M 36K 251M 1% /tmp
tmpfs 252M 20K 251M 1% /var/run
tmpfs 252M 0 252M 0% /dev/shm
root@thinkpad:/home/zmk# fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
240 heads, 63 sectors/track, 10337 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 9753 73732648+ 5 Extended
/dev/sda2 9754 10337 4415040 12 Compaq diagnostics
/dev/sda5 1 133 1005417 82 Linux swap
/dev/sda6 134 4296 31472248+ 83 Linux
/dev/sda7 4297 8265 30005608+ 83 Linux
/dev/sda8 8266 9753 11249248+ 83 Linux
root@thinkpad:/home/zmk#
df lists the free space of all mounted partitions, fdisk will edit/list ALL partitions (even if not mounted) without listing partitions that are on different disks or only in memory (like my various tmpfs mounts). If all you need is to know the layout of partitions, or the size of your drive, fdisk will suffice. If you want to know the amount of disk space available on each partition (something else altogether), df is what you need.
As for your past experiences with fdisk:
fdisk will accept partition sizes in meg. Instead of entering an ending cylinder number, enter +somenumberM. For example, a 256 meg partition would be +256M.
Knowing that, using fdisk is pretty simple. All commands are one letter long - just type the letter, press enter, and answer the very human-readable prompts. If you don't know which command to use, type m.
If you still can't stand fdisk, there's always cfdisk. cfdisk is identical to fdisk, except that it's curses based and provides a menu-like interface rather than prompts.
Quote:
FDisk is the reason why I could never get a Slackware install because I never could understand how big I should make each partition using that format...very confusing.
|
I usually just make the swap partition first, specifying a reasonable size, followed by the root partition of between 5-10G depending on the size of the drive. I then split the rest of the disk relatively evenly between /home and /usr/local.