Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Apt-get Question...

  1. #21
    Junior Member
    Join Date
    May 2004
    Posts
    5
    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.

  2. #22
    Senior Member registered user
    Join Date
    Mar 2004
    Location
    Berlin
    Posts
    436
    Quote 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.

  3. #23
    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:

    Code:
    # List of available apt repositories available from ayo.freshrpms.net.
    # This file should contain an uncommented default suitable for your system.
    #
    # See http://ayo.freshrpms.net/ for a list of other repositories and mirrors.
    #
    # $Id: sources.list.i386 378 2004-04-30 16:33:52Z dude $
    
    # Fedora Linux Development
    #rpm http://ayo.freshrpms.net fedora/linux/development/i386 core
    #rpm http://ayo.freshrpms.net fedora/linux/1/i386 freshrpms
    #rpm-src http://ayo.freshrpms.net fedora/linux/development/i386 core
    #rpm-src http://ayo.freshrpms.net fedora/linux/1/i386 freshrpms
    
    # Fedora Linux 1
    rpm http://ayo.freshrpms.net fedora/linux/1/i386 core updates freshrpms
    #rpm http://ayo.freshrpms.net fedora/linux/1/i386 tupdates
    rpm-src http://ayo.freshrpms.net fedora/linux/1/i386 core updates freshrpms
    #rpm-src http://ayo.freshrpms.net fedora/linux/1/i386 tupdates
    
    # Red Hat Linux 9
    #rpm http://ayo.freshrpms.net redhat/9/i386 os updates freshrpms
    #rpm-src http://ayo.freshrpms.net redhat/9/i386 os updates freshrpms
    
    # Red Hat Linux 8.0
    #rpm http://ayo.freshrpms.net redhat/8.0/i386 os updates freshrpms
    #rpm-src http://ayo.freshrpms.net redhat/8.0/i386 os updates freshrpms
    
    # Red Hat Linux 7.3
    #rpm http://ayo.freshrpms.net redhat/7.3/i386 os updates freshrpms
    #rpm-src http://ayo.freshrpms.net redhat/7.3/i386 os updates freshrpms
    
    # Red Hat Linux 7.2
    #rpm http://ayo.freshrpms.net redhat/7.2/i386 os updates freshrpms
    #rpm-src http://ayo.freshrpms.net redhat/7.2/i386 os updates freshrpms
    
    # Red Hat Linux 7.1
    #rpm http://ayo.freshrpms.net redhat/7.1/i386 os updates freshrpms
    #rpm http://ayo.freshrpms.net redhat/7.1/i386 powertools dma
    #rpm-src http://ayo.freshrpms.net redhat/7.1/i386 os updates freshrpms
    #rpm-src http://ayo.freshrpms.net redhat/7.1/i386 powertools dma
    
    # Red Hat Linux 7.0
    #rpm http://ayo.freshrpms.net redhat/7.0/i386 os updates freshrpms
    #rpm http://ayo.freshrpms.net redhat/7.0/i386 powertools dma
    #rpm-src http://ayo.freshrpms.net redhat/7.0/i386 os updates freshrpms
    #rpm-src http://ayo.freshrpms.net redhat/7.0/i386 powertools dma
    
    # Red Hat Linux 6.2
    #rpm http://ayo.freshrpms.net redhat/6.2/i386 os updates freshrpms
    #rpm http://ayo.freshrpms.net redhat/6.2/i386 powertools
    #rpm-src http://ayo.freshrpms.net redhat/6.2/i386 os updates freshrpms
    #rpm-src http://ayo.freshrpms.net redhat/6.2/i386 powertools
    
    # DAG
    rpm http://apt.sw.be redhat/fc1/en/i386 dag
    
    # NewRPMS
    rpm http://newrpms.sunsite.dk/apt/ redhat/en/i386/fc1 newrpms
    #rpm-src http://newrpms.sunsite.dk/apt/ redhat/en/i386/fc1 newrpms
    
    # ATrpms
    rpm http://apt.physik.fu-berlin.de fedora/1/en/i386 at-testing
    #rpm-src http://apt.physik.fu-berlin.de fedora/1/en/i386 at-testing
    
    # Dries
    rpm http://dries.studentenweb.org apt/fedora/fc1/i386 dries
    #rpm-src http://dries.studentenweb.org apt/fedora/fc1/i386 dries
    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.

  4. #24
    Junior Member
    Join Date
    May 2004
    Posts
    5
    Quote 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.

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 5
    Last Post: 07-09-2005, 04:40 PM
  2. Grub settings, quick question... really my last question :p
    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
  •