Announcement

Collapse
No announcement yet.

How to partition linux properly

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

    How to partition linux properly

    I have read on the net that it is always better to have seperate mount points upon installation. What would be the best or better option. I have stopped using the default partitioning on installation.

    What I have now is the following partitions.
    / EXT3
    /swap
    /Linuxbackup EXT2 (plan is to add back-ups here...)
    /home EXT2 (in case i have to re-install)
    /WinSwap FAT32 (to share files with windows)
    /Anything EXT2 (free linux space)

    The thing is, there is points for /srv /opt and so forth. What would a good experienced linux citizen have and what would be the best file system for each? (I never new there were so many file systems...) I have no customizations yet, so I won't mind redoing the whole install if I have to.

    As a matter of fact, my harddrive is 40G, so a possible division guide would also be great. I mean I have 12G for the main fail, and 10G for /home!


    #2
    Re: How to partition linux properly

    On modern desktop linux systems, there's rarely a need for a very advanced partition scheme, problems may arise when you underestimate the space needed for a particular partition (Using LVM makes it easier to resize partitions, but can cause some problems of it's own). Also, if you plan to install more than one linux installation on your machine, it will get messy (hard to keep track what is where etc.)

    having /home on it's own partition is usually a good idea, since it's easy to keep your /home folder untouched on (possible) reinstallations.

    So is having swap (if you don't have huge amounts of ram and very little disk space)

    Also a Fat32 /winswap partition is good if you need a read/write partition common for Windows and linux.

    /backup partition is good, if you place it on another physical disk, not just on a different partition. (A lost partition is usually recoverable, but a failed harddisk is much more of a hassle, so if you do not have a second hd, I'd recommend using removable media for backups. A different partition on the same hd is better than nothing, but not very safe).

    Also I'd say you should use a journaled filesystem on all linux partitions (for example EXT3 or ReiserFS)

    I myself still use a small partition for /boot (I guess more out of habit than necessity) 50-100 Mb is usually sufficient, depending on how many kernels one has installed at the same time.

    On servers people usually use a more detailed partition system (usually with LVM) that includes a separate partition for   /var, for example, but on a desktop system the advantages are usually minimal (and may cause some extra problems)

    An exact space division among different partitions depends on individual needs (like how much swap do I need, if any, due I plan to keep my media files on /winswap, how much space do I need for programs, how many users will this computer have etc.)

    One thing I've found out is that I always underestimate the space I need in /home

    Comment


      #3
      Re: How to partition linux properly

      a HDD can have up to 4 primary partitions on it
      with that in mind i partition my 80GiB HDD thus ...

      /boot = 101MiB > primary
      / (root) = 5GiB > primary
      /swap = 512MiB > primary (same as installed ram)
      note. do not set greater then 2GiB
      /home = rest of drive > primary

      this way i can play and keep the data safe ...

      Comment


        #4
        Re: How to partition linux properly

        Originally posted by Gezzer
        a HDD can have up to 4 primary partitions on it
        You can use extended/logical partitions if you need more than 4 partitions, otherwise looks like a working scheme (with enough space for /home )

        Comment


          #5
          Re: How to partition linux properly

          I've tried using multiple partitions, separate /home and just the separate swap. I've never come across any advantage of multiple partitions, even for /home because I back up what I need. With multiple partitions I have run out of room before (and not just with the /home) also when I change distros the multiple partition route means I often end up having to type in the mount points again on the installation which is a bore.

          Bottom line - these days I just accept the installer default! I think its just a personal choice.

          Comment


            #6
            Re: How to partition linux properly

            I use the defaults when the system partitions for me during install...with one exception: home on a separate partition (separate drive actually)

            I recently replaces my primary hd and had my /home on a secondary hd. After the install of the OS and all the apps, I think ALL my configs were retained...firefox themes, gaim contacts, window decorations...everything! That beats restoring a backup imo.

            Comment


              #7
              Re: How to partition linux properly

              /backup partition is good, if you place it on another physical disk, not just on a different partition. (A lost partition is usually recoverable, but a failed harddisk is much more of a hassle, so if you do not have a second hd, I'd recommend using removable media for backups. A different partition on the same hd is better than nothing, but not very safe).
              As a matter of fact, the partition I call \LinuxBackup is on a seperate disk, and that is where I backed up my complete Ubuntu before attempting Kubuntu. The first boot, showed all my files was in this partition, but now the partition appears empty. There is a lot of files in there that I need, but I cannot get anything in there back. Any idea what went wrong?

              Also I'd say you should use a journaled filesystem on all linux partitions (for example EXT3 or ReiserFS)
              What is the difference between EXT2 EXT3 and Reiser FS? I searched on Google, but there is not much that I can understand, I came under the impression that EXT3 should only be used for the \boot or \root because it wastes more space.


              And then the last thing, what difference does it make to differentiate between logical or primary partitions? I have one primary, the rest logical. I am being stupid?

              I would rather waste a bit of hardrive space and be sure my data is safe than skimp on file systems. Just look at the first paragraph in this post and you know why. There was days of downloads from Ubuntu now missing, not to mention my a whole pile of family pictures... I miss those the most, it cannot be found on internet. (I use GPRS for internet access.) I have still not written anything to the back-up disk in the hope of recovering those files.

              Comment


                #8
                Re: How to partition linux properly

                All may not be lost. As a first step. If you can get to the disk where you have your photos but it appears empty it may just be that its not mounted. If you are looking in a filemanager (e.g. konqueror) and you see an icon for your disk. try right clicking and see if "mount" is an option in the context menu. if so, do that and see if you can read your disk. Thats just a first step. There is a long way to go before you have to give up your files for lost (unless you think you destroyed or overwrote this partition somehow)

                Comment


                  #9
                  Re: How to partition linux properly

                  Originally posted by GrootBrak
                  What is the difference between EXT2 EXT3 and Reiser FS?
                  Ext3 is EXT2 but with journaling support, reiserfs is also a file system used in linux which support journaling.

                  Difference between ext2 and ext3/reiserfs is same as FAT16/32 and NTFS.

                  Originally posted by GrootBrak
                  what difference does it make to differentiate between logical or primary partitions? I have one primary, the rest logical. I am being stupid?
                  Short answer : NO
                  Long answer : depand on your requirements.

                  In early days a HDD can have maximum of four primary partitions, this start causing trouble as HDD size start growing, to overcome this situtation, extended partitions scheme invented. An Extended partition is a primary partition which is used to hold logical drives in it.

                  So you can have 3 primary partition and one extended partition (IIRC, Linux support maximum of 63 logical drives in extented partition).

                  Some links.
                  ext2 vs. ext3
                  http://www.sccs.swarthmore.edu/users...an/node29.html

                  ext2 vs ext3 vs xfs vs reiserfs
                  http://lists.debian.org/debian-user/.../msg04901.html
                  cheers!
                  -=|From the desk of|=-
                  «•´`•.(*•.¸(`•.¸ ¸.•´)¸.•*).•´`•»
                  «•´¨*•.¸¸whoiam55.¸¸.•*¨`•»
                  «•´`•.(¸.•´(¸.•* *•.¸)`•.¸).•´`•»
                  Reg. Linux User # 400637

                  Comment


                    #10
                    Re: How to partition linux properly

                    Originally posted by GrootBrak
                    I came under the impression that EXT3 should only be used for the \boot or \root because it wastes more space.
                    It does take a bit more space and is a tad slower, but that's not usually an issue on modern machines. It does protect you from filesystem corruption on abrupt shutdowns.

                    If performance is an issue, ReiserFS should be both quicker and less space hogging (the difference is more noticeable on volumes with lots of small files). It is 'newer' technology though, there might be problems with it (though I have not run into any)

                    Anyway, you can read about the differences, and decide for yourself

                    Originally posted by GrootBrak
                    As a matter of fact, the partition I call \LinuxBackup is on a seperate disk, and that is where I backed up my complete Ubuntu before attempting Kubuntu. The first boot, showed all my files was in this partition, but now the partition appears empty. There is a lot of files in there that I need, but I cannot get anything in there back. Any idea what went wrong?
                    Since it worked on the first boot, it's safe to assume you didn't erase it during installation. As analyticalman suggested, are you sure the partition is mounted? (If it's not mounted, you only see the empty directory [mountpoint] in konqueror.)

                    Make sure your backup partition is included in /etc/fstab and mounted with the right options.

                    Comment


                      #11
                      Re: How to partition linux properly

                      1 of my mates is a Fedora Core 4 admin, and he said that when I ever install linux, use EXT3 as the main filesystem, and just mount it on / (root), with about a GiB for swap (which is the same size of my RAM), dont have any problems with it what so ever.

                      Just my 2 cents worth

                      Comment


                        #12
                        Re: How to partition linux properly

                        Great, I will look at my filesystem with better insight now.

                        Unfortunately my backup is still missing, and it is mounted as you suggested. I would love to get the data back on it. Something that spring to mind while we are discussing EXT2 or EXT3, is that my previous default was EXT3 for linux. I then backed up to an EXT2, or that was the plan, my previous posts hold the reason why I choose EXT2. Since Ubuntu did not have the desired result, I briefly tried Mandrake, which showed the partition. Then I changed to Kubuntu, but somewhere I either put the wrong value in, or the default made it wrong, because it now shows as an EXT3 partition. Darn, would that destroy my data? Is there a way of recovering it? So far, I did not write anything to the partition.

                        Comment


                          #13
                          Re: How to partition linux properly

                          I wonder if there are errors in your partition table because of what has happened. Partition Magic (a windows program) often fixes these. You could try mounting your back-up partition using a live CD (Kanotix is my favourite for this) and see if that can read it. If you definitely haven't wrote anything to your drive, a data recovery agency will be able to get it back

                          Comment


                            #14
                            Re: How to partition linux properly

                            Apologies for this long while not online. I had some more trouble and had to re-install windows with the result of grub now missing. Got a fix on the net and hopefully will have my system back up in no time. My back-up is still not working giving me the empty folder only. Shucks, but I am not prepared to try our our "recovery agencies" even if they do exist. I've tried two programs from the net, but none show any results. One of my missing files is a presentation for a business model that I want to patent. Now I don't have the original and the guy writing the software could now use it since I won't have any proof of "originality." I don't want to ask him to mail it back to me, that might just be the tip-off!!!

                            Please if anyone can help, it will be of immense value to me.
                            Regards

                            Comment


                              #15
                              Re: How to partition linux properly

                              Just a quick question related to the topic:
                              How large does the "/" partition usually need to be? if 10GB too much or will 5GB be enough? Are there any instances/situations that the / partition would reach more than 5GB?
                              Jucato's Data Core

                              Comment

                              Working...
                              X