On Sunday 10 March 2013 19:34, J G Miller conveyed the following to
comp.os.linux.setup...
> 2) As you see fit, you then create partitions on the hard disk.
> Under the Windoze scheme, partitions on hard disks are named
> C:, D:, E:, F: etc. Under GNU/Linux they are named as
> hd{LETTER}{number} where each hard disk has a different letter,
> eg hda for the first, hdb for the second, and each partition
> has a number, 0 for the first primary, 1 for the second primary,
> 5 for the first logical, 6 for the second logical.
I apologize for engage in pedantry here, but the above is not entirely
correct, and mixes up different aspects of how the Linux kernel handles
multiple filesystems with how the GRUB bootloader does that. GRUB2 is
inconsistent in this for that matter, so I won't be getting into the
details of that now, but for the sake of the OP, I'm going to be a
little more elaborate on this subject...
In Microsoft Windows, one does indeed have the concept of drive letters,
which dates back to the time when microcomputers used floppy disks and
did not have hard disk support. Often, such machines only had a single
floppy drive, and drive letters thus facilitated the copying of files
from one floppy disk to another using only a single floppy drive.
Insofar as I know, CP/M - upon which MS-DOS was based - was the first
operating system to feature drive letters, and this practice then
propagated through DOS itself, and via OS/2 into Windows.
These drive letters are assigned so that C: is always assigned to the
active primary partition - i.e. the primary partition marked as bootable
in the MBR - on the first hard disk, and if there are multiple hard
disks in or attached to the machine, then the alphabetic sequence
continues with the active primary partitions (if present) on each of the
other hard disks, and only then (or if none were found) with the logical
partitions in the extended partition container on the first hard disk
again, then the logical partitions in an extended partition container on
any additional hard disks, and then onto removable devices - except for
floppy disks, which have drive letters A: and B: - and finally, network
storage volumes. The NT-based Windows versions - i.e. Windows NT
proper, Windows 2000, Windows XP and all later versions of Windows -
allow one to change that order.
Now, GNU/Linux has different ways of dealing with hard disks and
partitions. From the user's point of view, GNU/Linux - in being a UNIX
clone - does not present disk storage by way of distinct volumes, but
rather by way of a uniform directory hierarchy in which the different
storage volumes are transparently mounted onto existing directories.
Several of the directories may have their contents physically living on
other partitions than the root filesystem, whether it's on the same hard
disk drive, on partitions of another hard disk drive, or even somewhere
on a filesystem exported by another computer over the network, but the
main directory tree will always be the same to the user.
From the system's own point of view however, there are of course
different locations for these filesystems, represented to userspace by
the Linux kernel via an abstraction layer. This abstraction layer is
the /dev directory, which contains so-called "device special files",
each of which represents certain aspects of the hardware: disk drives,
disk partitions, input/output terminals, pointing devices, serial ports,
et al. Some of these devices are called character devices, and others
are block devices, depending on how they handle the data. In UNIX
systems like GNU/Linux, literally everything is treated by the system
itself as being a stream of data, and every such stream of data is
presented to userspace - i.e. to the user and to applications - as being
"a file". That's what /dev is for. ;-)
Disks and filesystems are all represented as block devices under /dev.
The disks themselves have traditionally always been called /dev/hda,
/dev/hdb, et al, for PATA-style devices (including optical drives and
ZIP drives) and /dev/sda, /dev/sdb, et al, for SATA, SCSI, SAS, USB and
other hard disks.
However, while the kernel does still feature support for the old ATA
code which worked this way, the newer kernels all use the libata2 code,
which designates all hard disks via the /dev/sd? block devices - optical
drives (and drives which identify themselves as such) will be /dev/sr? -
and partitions on such drives with /dev/sd1n, where "n" is a number
starting at 1. So /dev/sda is the first hard disk found in the system,
and /dev/sda1 is the first primary partition found on that hard disk.
On account of partition numbering, there are currently two mainstream
approaches. The first one is the legacy BIOS MBR partition table, and
in that case, partition numbers 1 through 4 are reserved for primary
partitions, while logical partitions in an extended partition container
- which itself is one of those four primary partitions - will always
start with number 5.
However, due to the limitations of a BIOS MBR partition table in
combination with libata2, one cannot *use* more than 15 partition
numbers per drive (including the one for the extended partition
container itself), even if more partitions exist on the same storage
device. This is why GUID partition tables (abbreviated to GPT) were
created.
GPT does away with the legacy BIOS MBR partition tables, and supports up
to 128 partitions per physical storage device, without requiring the
distinction between primary and logical partitions. The Linux kernel
does have full support for GPT, and partitioning tools such as gparted
also have support for creating such partitions.
Now, on account of the GRUB bootloader, the designation for drives and
partitions is different, because GRUB wasn't to work with GNU/Linux
specifically, but with lots of other operating systems as well.
Therefore, GRUB uses its own notation, and in GRUB speak, "(hd0)" is the
notation for the first hard disk, and "(hd0,0)" for the first primary
partition on the first hard disk. GRUB2 deviates from that by starting
the partition numbering at 1 instead of 0 (as the Linux kernel does),
but not the actual drive numbering, which still starts at 0.
As I wrote higher up already, UNIX operating systems use a uniform
directory hierarchy, without any distinction _towards the user_ between
volumes. This is because at system boot time, the various block devices
representing storage are /mounted/ into the tree. Not everything is
mounted automatically, because not everything may actually contain a
usable storage device, e.g. your optical drives, or removable storage
devices attached via USB.
The syntax is always to mount a block device _on_ a directory. Once
mounted, whatever was in that directory before the mounting is no longer
visible, and what resides on the block device - read: filesystem -
appears to be /in/ the directory it is mounted on.
As an example, say that you have created a separate partition for your
user files - documents, downloads, etc. - and that this separate
partition has the block device special file /dev/sd8. Upon boot, the
system will read the file /etc/fstab, which is a simple plain text
database of block devices and where and how they are to be mounted.
Records which have "noauto" in their mount options will be not be
mounted automatically at boot, but can be mounted into the tree at some
later point.
Not all of the directories in the root directory contain any actual
files which exist on disk. For instance, /proc and /sys are mountpoints
for two special virtual filesystems which are needed by the system, and
their contents may look like files when you look at them, but they are
virtual, i.e. they exist only in RAM, and they are interfaces with the
kernel. The contents of /tmp on the other hand may live either on the
physical root filesystem, or on another partition, or even in virtual
memory - which means that it exists in RAM but it can be swapped out -
if /tmp is set up as a mountpoint for a tmpfs filesystem.
/dev is another such filesystem. In older UNIX versions, /dev was just
a directory on the root filesystem, and the device special files were
created in there. In GNU/Linux however, starting with the Linux 2.6
kernel generation, /dev as a directory still exists on the root
filesystem - it is a mountpoint - but its contents now exist in virtual
memory, and are managed by a userspace daemon called udev. udev creates
and deletes device special files on the fly as needed by the system when
new hardware is being plugged in or removed, and it is easier and more
efficient then that these device special files are not created on or
deleted from a physical hard disk, but instead in virtual memory. This
is why the population of the /dev directory in modern GNU/Linux systems
lives in virtual memory, on a tmpfs filesystem, albeit that in even more
recent kernels, this is now a special version of a tmpfs, called
devtmpfs, which gets created by the kernel itself as the machine boots.
If you use your computer as a multi-boot machine with both GNU/Linux and
Microsoft Windows, then your Windows partition(s) will often be mounted
into the tree at /mnt/windows, /mnt/win_c, or something of the likes, so
that you have access to those files from within GNU/Linux. Likewise,
removable media are typically mounted to /media/cdrom, /media/thumb, and
similar directories.
However, as neither Microsoft Windows nor any of its supported
filesystems support UNIX/POSIX file permissions and file ownerships, the
permissions and ownerships you see on the files and directories on a
mounted Windows filesystem when looking at it from within GNU/Linux, are
in fact faked during the mounting and cannot be altered while said
Windows filesystem is mounted, nor will these permissions be saved on
the actual physical filesystem. This is because GNU/Linux is a UNIX-
family operating system, which demands the existence of such permissions
and ownerships - it is after all a genuine multi-user operating system
by design - and so it needs to have a set of permissions and ownerships
to work with, even on such non-UNIX filesystems. Ergo, it assigns fake
- or perhaps more correctly worded, "virtual" - permissions to the
contents of such a non-UNIX filesystem.
The virtual permissions and ownerships are thus applied as an overlay
onto the physical Windows volume in the virtual filesystem layer of the
Linux kernel when the volume is mounted, and /etc/fstab is one of the
places where the fake permissions and ownerships for such a Windows
volume can be defined. UNIX/POSIX-style filesystems do not require this
of course - and the mount commands for these do not even support virtual
permissions - because they have on-disk permissions and ownerships,
stored in what is called "the inode", i.e. the information node for a
filesystem entry such as a file, a device special file, a directory, a
symbolic link, a named pipe, et al.
All of the above may sound very technical and is not even complete, but
I felt it necessary to elaborate somewhat on this subject - as an
addendum to all other advice which has already been given to the OP -
because some of the information given was incorrect or misleading.