Prev | Current Page 367 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"

To see what partitions are
currently set up on partitions that the Linux kernel has detected, use the fdisk command:
# /sbin/fdisk -l
Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4825 cylinders
Units = cylinders of 16065 * 512 bytes = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104 b Win95 FAT32
/dev/sda2 84 89 48195 83 Linux
/dev/sda3 90 522 3478072+ 83 Linux
/dev/sda4 523 554 257040 5 Extended
/dev/sda5 523 554 257008+ 82 Linux swap
This output shows the disk partitioning for a computer capable of running both Linux and
Microsoft Windows. You can see that the Linux partition on /dev/sda3 has most of the space
available for data. There is a Windows partition (/dev/sda1) and a Linux swap partition (/dev/sda5).
There is also a small /boot partition (46MB) on /dev/sda2. In this case, the root partition for
Linux has 3.3GB of disk space and resides on /dev/sda3. Fdisk -l uses partition information
found in /proc/partitions unless explicitly given on the command line.
Next use the mount command (with no options) to see what partitions are actually being used for
your Linux system (which available disk partitions are actually mounted and where they are mounted):
# mount
/dev/sda3 on / type ext3 (rw)
/dev/sda2 on /boot type ext3 (rw)
/dev/sda1 on /mnt/win type vfat (rw)
/dev/proc on /proc type proc (rw)
/dev/sys on /sys type sysfs (rw)
/dev/devpts on /dev/pts type devpts (rw,gid=5,mode=620)
COMING FROM
WINDOWS
163
Learning Basic Administration 4
/dev/shm on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/cdrom on /media/cdrecorder type iso9660 (ro,nosuid,nodev)
Although some of the file systems shown as mounted are for special purposes (/sys, /proc, and
others), our concern here is with disk partition (/dev/hd*, /dev/sd*, and so on).


Pages:
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379