by March 15, 2002 0 comments



Windows uses the notation A:, B:, C: for referring to drives. Linux follows a different methodology. A drive in Linux is called a device (so are monitors, keyboards and mice and almost anything else), and is treated as if it were a file. So, reading data from a drive or writing to it similar to reading from or writing to a file. 

IDE drive partitions in Linux are referred in the form: 
/dev/<IDE-device-name><partition number>

Unlike Windows, Linux differentiates between physical hard drives and logical partitions within physical drives. Hence drive naming in Linux is a two-step process. First you need to know the name of the IDE device and then determine the <number>. Depending on how your hard disk is connected to the IDE bus, the <IDE-device-name> is as follows:

Disk  Device name
Primary Master hda
Primary Slave hdb
Secondary Master  hdc
Secondary Slave hdd

Let’s take the example of a hard disk connected as Primary Master. Suppose you have a primary partition on it. It will be called C: in Windows. If you need further drives, you have to create an extended partition and logical partitions within it. Suppose you have two such logical drives. Here’s how they will be named.

In Windows  In Linux
C:  /dev/hda1
D: /dev/hda5
E:  /dev/hda6

Note that the <partition number> for logical partitions starts from 5. But why straight to 5 after 1? This is because of the following reason. Though not possible with MS Fdisk, up to four primary partitions can be created on a hard disk. It is possible to create more than one primary partition with RedHat fdisk, PDISK, Partition Magic, etc. Hence if they exist, they will be named as hda1, hda2, hda3 and hda4. 

The X Word

Once you get used to Linux, you will hear a lot about X. No, it will not be about films with that rating, or about any ‘ex’ s. What they will be talking about is the X Window system–the mechanism that provides the graphical interface for Linux. More precisely, the X server provides the barebones for Windows, like graphics and desktop environment, on Linux. It is called a server because it serves clients by giving them access to the graphics functions and graphics hardware. The clients are the desktops, like KDE and Gnome, or any other graphics applications. 
Confused? Think of the X server as similar to the GDI (Graphics Device Interface) layer in Windows, and the clients to be similar to the Windows desktop and the applications that run there. 
For the curious, the DirectX API on Windows provides direct access to the graphics hardware surpassing the GDI layer. Similarly, DRI (Direct Rendering Infrastructure) in X provides direct hardware access to the application.

Floppy drives, A: and B: in Windows, in Linux are referred to as /dev/fd0 and /dev/fd1 respectively.

Mount points
To use a partition you must assign a directory to it. This is called mounting. This is similar to assigning drive letters to partitions in Windows. Once mounted, the corresponding directory (called mount point) will contain all the directory and files on the partition or disk. 

When you create a Linux partition using disk druid (see Installing PCQLinux 7.1, page 60), you specify a mount point for it like ‘/’.

PCQLinux, by default, creates mount points for the floppy drive and CD-ROM drive in the ‘mnt’ subdirectory in the root directory (/). They are /mnt/floppy and /mnt/cdrom respectively. In case of presence of another floppy drive, its mount point will be /mnt/floppy1 and in case of another CDROM drive or a CD Writer, its mount point will be
/mnt/cdrom1.

To use a drive you must first mount it (on the mount point). Unmounting (the opposite of mount) is sometimes required, like when you want to eject a mounted CD-ROM. In PCQLinux 7.1 you can mount a CD or floppy by inserting it into the drive and clicking on its icon on the KDE desktop. To unmount (release), right click on the icon and select Unmount. 

Shekhar Govindarajan

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

<