-->
Previous | Table of Contents | Next |
Linux and Hard Disk Names
After logging in, youll want to directly run the fdisk command (ignoring what the screen instructions say about the setup command). The fdisk command assumes that the first IDE drive is the default drive. If you plan on installing Linux on another drive, youll need to specify that on the command line. Table 2.5 lists the hard disk device names.
Name | Meaning |
---|---|
/dev/hda | First IDE hard drive |
/dev/hdb | Second IDE hard drive |
/dev/sda | First SCSI hard drive |
/dev/sdb | Second SCSI hard drive |
/dev/fd0 | First floppy drive (A:) |
/dev/fd1 | Second floppy drive (B:) |
Note the pattern in Table 2.5? In addition, Linux allows you to specify the partitions in the device names. For example, the first primary partition on the first IDE drive would be known as /dev/hda1, the second primary partition on the first IDE drive would be known as /dev/hda2, and so on. If youre installing logical partitions, the first logical partition would appear as /dev/hda5, the second logical partition would appear as /dev/hda6, and so on.
NOTE: The files representing these devices will end up in the directory /dev.
To run fdisk on the second SCSI hard drive, youd use the following command line:
# fdisk /dev/sdb
Most of you (most PCs are sold with IDE drives) will be told that Linux is using the first hard drive as the default. When you press m for a list of options, youll see the following listing:
Command action a toggle a bootable flag c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition p print the partition table q quit without saving changes 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)
There are really only three options youll ever use, unless you run into some esoteric configurations:
WARNING: Linux allows you to make your hard disk configuration (and any configuration) as complex as you want it to be. Our philosophy is to keep it as simple as possible; unless you have a real need for multiple partitions and the like, just keep to the basicsa DOS partition, a Linux partition, and perhaps a partition for an additional operating system (like OS/2) if you like.Some argue that by creating multiple Linux partitions, youll be able to recover more easily if something happens to the boot partition. (Damage to one partition doesnt automatically mean that all the partitions are damaged.) However, if youre making frequent backups of important files (mostly data and configuration files), youll have a more reliable setup. If theres damage to the PCs File Allocation Table (FAT), youll have problems with all your partitions.
If you select p, youll see the following:
Device Boot Begin Start End Blocks Id System /dev/hda1 * 1 1 63 20762+ 4 DOS 16-bit (32M)
This is the DOS partition you created in the previous sections.
Before you actually create the Linux partition, you should decide if you want to install a swap partition.
Previous | Table of Contents | Next |