-
To: Hunkah, and anyone interested in how partitions, directories, subdirectories, files, and folders are related.
Some of what follows has been mentioned or alluded to earlier in this thread. When I started this reply, I wasn't intending to write a book. Anyway, I hope there is some info here that helps you see things more clearly.
A PARTITION is a physically defined space on the hard drive. This space must be FORMATTED (ie. have a base file system installed) in order to be used by the operating system. This is true for DOS, MSWindows and all variations of Linux. A hard drive can have multiple partitions, and each can be formatted and used independently of the other.
In MSWindows, you can have two physical partitions -- PRIMARY and EXTENDED. If the entire drive is set up and formatted as one large partition, this will be drive "C:". If you want more partitions in MSWindows, the first part of the hard drive will be defined as the PRIMARY partition (C:), and the rest of the drive (or part of it -- however you choose to set things up) will be an EXTENDED partition, and drives D:, E:, etc. will be created as LOGICAL (or VIRTUAL) partitions within this EXTENDED partition. The tool to create partitions for MSWindows is Microsoft FDISK.
Linux systems use a different (though similar) scheme. You can have as many as four PRIMARY partitions. If you want more than four, one of these must be an EXTENDED partition, and additional partitions will be created within this space. The naming convention is logical. The first hard drive is "hda", the second hard drive is "hdb". The first partition of "hda" is hda1, the second partition is hda2, etc. The partitions can be set up and formatted as different types -- for example: swap, ext2, ext3, reiserfs, xfs, etc. The tool to create these partitions is Linux FDISK, or CFDISK. The Linux partitioning tools will also create partitions for MSWindows if you have both MSWindows and Linux on the same hard drive.
When installing the Linux filesystem, the base of it all is "/", which we call "root", as in the root of the file system "tree". And as a tree has roots, and branches, and branches have branches, and branches have leaves, so the file system has "root", and "directories, and subdirectories, and files.
A DIRECTORY is a part of the file system. In Linux, the main directories are "/bin", "/boot", "/dev", "/etc", "/home", on thru "/var". These contain branch directories which are sometimes called subdirectories. "/etc" is where most configuration files are located. "/home" is where all users and user data is kept. "/root" is where the files of the Master User (system administrator, if you prefer) are kept.
Microsoft used a directory tree naming convention until Win95, when they decided to make the file system analogous to a file cabinet instead of a tree. Thus you have the cabinet, drawers, folders, and the documents in the folders. From this you can see that "directory" and "folder" are roughly the same thing.
Now here is where it gets interesting. In Linux a DIRECTORY can simply be a part of the file system. When Knoppix is installed on a hard drive, it is set up this way -- one PARTITION containing the entire file system. But a DIRECTORY can also be placed on a separate PARTITION that is linked to the filesystem, and thru this link functions as an integral part of the filesystem.
Example: Let's say you installed Knoppix on a hard drive in partition "hda1", and that "hda2" is set up as a "swap" partition. When you reformat "hda1" (to install a different version or whatever), all settings and data will be lost if they have not been backed up. If "hda3" is set up as "/home", all data and program settings in "/home" would be unaffected if you format "hda1". Granted, you will have to set this up by hand in the file system table (/etc/fstab), but this is not as complicated as it sounds.
You may never do some of the things mentioned above, but be aware of the possibilities.
-
Senior Member
registered user
Originally Posted by
kansas
But a DIRECTORY can also be placed on a separate PARTITION that is linked to the filesystem, and thru this link functions as an integral part of the filesystem.
I might nerve, but a filesystem might be on a different partition, and this might be mounted to the root-filesystem.
Code:
mount /dev/hda1/windows /mnt/windows
will not work, nor will
Code:
mount /dev/hda1 /mnt/foo
if there is no filesystem on /dev/hda1.
linking is a well defined term, when talking about linux filesystems, and should therefore not been mixed up with mounting.
When you create a link, the target must not exist, while when mounting, the target must exist.
-
I don't mean to jump the gun, but I have fedora core 1 using the apt-get stuff. freshrpms.net has a version of apt that can use rpm based repositories. The official site even provides a copy of apt that you can use. You can use either apt OR yum but not both at the same time. Here is a copy of my /etc/apt/sources.list file:
If you want apt for Fedora, just go to www.freshrpms.net and follow the links to get apt-rpm, then make your /etc/apt/sources.list look like mine, and there you go. Fully functional apt running on a RedHat product.
-
Originally Posted by
user unknown
linking is a well defined term, when talking about linux filesystems, and should therefore not been mixed up with mounting.
I used the term "linked" in its traditional English language sense meaning "to tie together". Not in the Unix sense of "to make a link". Perhaps I should have said "tied", or "tie".
I did not refer to "mount" at all because I didn't want to throw yet another term into the discussion. I did say this can be done in "/etc/fstab", which we both know will "mount" a partition in a way that is completely transparent to the user. If a directory that is part of the filesystem is on a separate partition that is mounted by /etc/fstab, then the filesystem will be intact once again. The user need not even be aware this is happening.
Similar Threads
-
Replies: 5
Last Post: 07-09-2005, 04:40 PM
-
By mark1221 in forum Hdd Install / Debian / Apt
Replies: 2
Last Post: 11-01-2003, 10:32 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Cisco SG95-16 16-Port Gigabit Switch SG95-16-KR
$47.00
Cisco Meraki MS120-48LP 48 Port Blade Ethernet Switch UNCLAIMED
$799.00
NEW Cisco Meraki MR44 802.11ax Wi-fi 6 Wireless Access Point MR44-HW UNCLAIMED
$399.98
Cisco RV320 Dual WAN VPN 4 Port Gigabit Router w/ Web Filtering RV320-WB-K9-NA
$374.00
Cisco WS-C3850-48P-L 48-Port Gigabit 3850 PoE Switch w/ 715W+ C3850-NM-4-1G Mod
$83.00
Cisco QSFP-40G-SR-BD BiDi Short-reach Transceiver, 1 Year Warranty
$17.25
Cisco C3850-NM-2-10G 2 Port Network Exp.Module for 3850
$38.99
Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module 10-2415-03
$8.00
Cisco WS-C3850-48F-S Catalyst 3850 48x 1GB PoE+ RJ-45 1x Module Switch
$185.00
Cisco WS-C3850-48P-L 48-Port Gigabit 3850 PoE Switch w/ 715W Network Switch
$41.43