Announcement

Collapse
No announcement yet.

Partitioning Linux the way I like to

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Partitioning Linux the way I like to

    Hi,

    First of all PLEASE don't assume I'm a rebel Windows user trying to use Linux on a Windows way.

    I just want to be on control and use the partitions the way I consider the smartest (conceptually at least).

    My target:

    One partition to O.S., drivers and all related stuff.
    A second partition to all installed programs.
    A third partition to my personal data, things I download or create.

    Here my current partitioning option:

    /dev/sda1 - Linux
    /dev/sda2 - Extended
    /dev/sda5 - Linux swap
    /dev/sda6 - Linux
    /dev/sda7 - Linux

    I would like to have O.S. and related stuff on sda1.
    I would like to have a way to force all programs to be installed on sda6.
    I would like to get all my personal data on sda7.

    According with I have read so far, I need to associate file systems this way:

    "/" goes on sda1 -> O.S. and related stuff.
    "/home" goes on sda7 -> my personal data.

    OK, but what about to force programs to be installed on sda6 ?

    As I know by now, Linux programs spread their files on many File systems like: "/usr", "/lib", "/opt" and even "/home" which would be in a separate partition at this point.

    Is there a way to get this done?

    --
    MarcRic
    www.marcric.com
    http://marcricblog.blogspot.com/
    http://www.traineronrails.com/
    http://groups.google.com.br/group/riorubyrails


    #2
    Re: Partitioning Linux the way I like to

    Originally posted by marcric

    OK, but what about to force programs to be installed on sda6 ?

    As I know by now, Linux programs spread their files on many File systems like: "/usr", "/lib", "/opt" and even "/home" which would be in a separate partition at this point.

    Is there a way to get this done?
    I think you have answered your own question.

    Linux does not use a single directory, or even a fixed list of directories, to install software packages. For Debian and *buntu, /opt is not normally used, but third party packages might use it. You could install /lib, /opt, and /usr on your partition, but there's no assurance that something that you think of as "software" won't be in /sbin, for example.

    What do you hope to accomplish by this separation of software packages?

    If your objective is to have control over the list of installed packages, you might want to look at something like apt-on-cd.

    Comment


      #3
      Re: Partitioning Linux the way I like to

      to continue, /etc usually holds program settings and configurations and so on.

      Really, it might be more accurate to describe the "OS" as only the kernel - which is in /boot and /sys.

      In this sense, how linux works is not too different than windows does. Windows programs usually install to C:/Programs and Settings, but usually also drop a .dll or two into C:/Windows/System32 (or something like that) and may also keep some data in the users directory as well, and lets not forget the edits made to the infamous registry file.

      Granted, with linux the file distribution is more wide-spread and there's no "secret" edits to any registry file.

      The closest you could easily get to your desire would be a separate /boot, /sys, /home and finally / but I am totally unclear as to what this would accomplish. Linux already separates it's files as it requires into it subdirectory structure. The location of a particular subdirectory on any given partition is of no consequence to the system itself and serves no purpose. In other words; typing "ls -l /usr" into a terminal window will give the same results whether /usr is on a different drive or partition or not.

      In the "old" days when hard drives were painfully slow and small, there was an advantage to spreading your directories across multiple drives, but that no longer applies. The only other time this is done in modern linux installations is as a way to easily expand available hard drive space to an install without going through re-partitioning or re-installing.

      There are some clear dis-advantages to your objective, such as the potential waste of hard drive space because a partition is too large for what it contains or even worse; your system becomes unusable because a particular partition has filled to capacity.

      I also ask the question: What do you hope to accomplish?

      Please accept that I am not criticizing your intent, rather I believe the method you've chosen may be more painful than productive.

      I usually recommend this partition structure to advanced users with a single drive:

      part1 swap
      part2 /boot (to allow booting to RAID partitions and to keep GRUB data separate)
      part3 [extended]
      part5 /
      part6 /home
      part7 /tmp

      And if you have the space:

      part8 home backup
      part9 OS backup
      part10 addition OS (to play with or test a new OS or upgrade)

      I would make a few changes if you had multiple drives and the sizes of the above would vary depending on your needs. I would also say parts 2,7-10 are optional. Generally: swap performs better as the first partition and the most accessed partition (usually /home) should be in the middle of the drive.

      Whatever you decide - good luck!

      Please Read Me

      Comment


        #4
        Re: Partitioning Linux the way I like to

        OK folks,

        I think I need a rethink of my strategy...

        Just to give feed back on why that "strange" desire comes up, here it is.

        I'm a dinosaur user since MS-DOS to be honest , and in Windows World for many many years, and with this kind of separation, I could:

        Change from O.S. version to a new one keeping some programs and my personal data safe to use in the next.

        In this primary objective let me say that in Windows, programs that can be reused without a new install are a minority. I was counting that this could be much more effective now since software is not "installed" in Linux, it is just unzipped or some thing like that.

        Suppose for any reason I decide to change from Kubuntu to any other "compatible" distribution.

        I will have to list and perform all the apt-get I have done before again?

        In fact I think I should avoid apt-get, I think the right way to accomplish this is to download the tar unzip and install it manually.

        Is it a misunderstanding or if I change my Linux distribution I will necessary need to download and re-install everything using internet?

        That is the point. If I know and control where everything is, I can update exactly what I need and reuse what I already have downloaded.

        Thanks.

        Comment


          #5
          Re: Partitioning Linux the way I like to

          In a nut-shell, and to be frankly blunt, yes, your statements below are incorrect.

          Programs in Linux are installed. Your thought that they are just 'unzipped' is incorrect.

          Programs installed in one Linux OS are not necessarily compatible with another Linux OS should you decide to switch. One Linux does not fit all.

          Once a particular Linux distribution is installed (Kubuntu here), then normal upgrades to the running OS (the 'kernel') as well as upgrades to installed programs, happen with a very high degree of precission and normally without any problems what so ever.
          Using Kubuntu Linux since March 23, 2007
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Re: Partitioning Linux the way I like to

            Warning: a lot of speculation here.
            I think the OP is wanting a static link (vs. the normal dynamic link) of some programs. If you download the source code to a program and all of it's dependencies and it's dependencies, dependencies..... and so on, then build with static linking for each tier of the hierarchy until the final program, you might have something that works across various distros. Would it be worth it?... I can't imagine a scenario where it would. I think there might be some license issues with static linking also. In short, apt-get is your friend.

            being able to string together packages to a single apt-get command(at least for debian based systems), makes software installation on a new system a snap. I keep a one line shell script to install software on a new load.

            sudo apt-get install kaffeine vlc digikam ..............

            I have wondered if it would be worth it to have KDE manage a list of favorite software. Have a couple of menu entries on the default kde app menu to add or remove from favorites list. This list could be kept in the home folder and accessible after a new load to install your favorite software. Basically the same I do with my script only having it integrated with the program gui itself.
            FKA: tanderson

            Comment


              #7
              Re: Partitioning Linux the way I like to

              As a DOS3.1 thru Windows7 experienced dinosaur myself, In my opinion what you're suffering from is lack of understanding some of the benefits of linux and also some of the new tools that are available to you. Sorry if that sounds overly blunt or rude - not my intention.

              Some examples of what I mean:

              With a reasonable (dsl or faster) internet connection, you can install any version of almost any linux distribution and update all it's packages in an hour or so. If your .iso is a reasonably recent release, maybe even in 20 minutes. Windows XP might take 3 or 4 hours, not including installing drivers. Remember also: no serial number to enter and no "Windows Genuine Advantage" (an oxymoron if I've ever heard one). One way you can prove this point is a basic winxp install is around 20-25gb's and kubuntu will only take 3-4gb and deliver most if not more of the same functionality.

              With a few commands, you can create a list of installed packages on a system, save it, copy it to a new install, run it with one command, and install everything you had on the previous install. This, combined with a backup of your /home can - in literally minutes - have you right back where you were before in less than an hour. There will likely be some configuration files you'll want to save and restore as well. This would apply to almost any distro that uses apt-get.

              Statically linked program installs are usually reserved for proprietary or vastly outdated and no longer supported software. The difficulty of doing this for only a few programs would greatly outweigh the benefits of moving to linux in the first place.

              How to mirror apt-get installs.
              Code:
              Primary System "dpkg --get-selections > installed-software" "scp installed-software $targetsystem:."
              
              Target System "dpkg --set-selections < installed-software" "dselect"
              done.

              If your concern is internet time, it's easy enough to create a backup of your install once you're satisfied or even "re-spin" your own install .iso to include the packages you deem critical.

              Some final thoughts: You'll have an better linux experience at this early stage if you just "let-go" of your preconceived ideas about how it should be done. Try this distro and pick one, two or three others. Install them all and play with them - for days or even months. If you're interested: try PCLinuxOS, openSuse, and LinuxMint along with Kubuntu and see what you likeand don't like. Most of us have been through many other distros. Once you've gotten your hands dirty for a while, return to your early ideas in this post and see if most of them haven't been resolved or simply vanished.


              Please Read Me

              Comment


                #8
                Re: Partitioning Linux the way I like to

                I've been a long time DOS user as well - and still am. I can certainly understand the need to keep things organized. It's the DOS way. After some years of using Linux I now mostly just make a separate /home partition and leave it at that. On one home server I also added a /var as a separate drive - but that's another story.

                Trying to control Linux the way I control DOS turns out to be futile - at least for my limited amount of waking hours and brain cells. Perhaps some day I will tackle Linux From Scratch and put all files where I would like to see them. In the meanwhile I find that the package manager takes care of it quite well and things don't seem nearly as much of a mess now that I'm used to it.

                What I have ended up doing is using DOS and Linux both. My main DOS machine is a state of the art P1 (lol) and it just flies! It is also very neatly organized, right down to the point of having directories neatly named with matching number of letters in basic directories - and using all 26 drive letters. It is used for information organization and writing since I have yet to find an OS which can compete for those tasks. Now, my main Linux machine is used for all the latest stuff like watching Youtube, listening to radio, viewing and edition photographs, and so on. Each machine has it's own purpose.

                Comment

                Working...
                X