Announcement

Collapse
No announcement yet.

New system partitioning

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

    New system partitioning

    (notes recorded using Dragon diction)
    I have decided to run Linux full time on my home desktop. I am starting with a 500 gig hard drive which am going to use for Windows and Linux. The goal is to run XP 64-bit and Kubuntu version 11.04 on the same drive. I decided on XP 64-bit have its own and 45 gig partition(primary). I set aside another 42 gig partition(primary) right next to it, just in case I would need to expand the Windows partition. Then, I tried to figure out my partition sizes and what to allocate to them for Linux. I started to do research (see some of the links below) on how I should be doing my partition sizes. I knew I needed /BOOT partition, /(root) partition, and swap. I started with figuring out what to do about the /BOOT partition. I knew I was going to make that a primary partition and the rest of the Linux file system was going to consist of logical partitions, but what size was I going to make that /BOOT partition. I found that for future-proofing purposes that you should make it at least 512 MB. This allows for extra room if you have to upgrade or add other Linux OSs, which I would probably run on other disks if I so desire. Swap partition was an easy one. Just take your amount of RAM x 1, or no less than 1 gig partition for swap. Since I have 4 gigs of ram, it made sense to allocate 4 gigs to swap.

    Next was the hardest part figuring out what to do with the other directories in the next like /TMP, /VAR, /USR, /HOME, and of course the /(root) directory. Now what I found out was that overtime /TMP and /VAR can lead to corruption in the partition. I'm guessing this is because they are used like swap. Both are recommended to be set up as their own partitions in case they do get corrupted. That way they don't affect the /(root) or any other directory. Finding out what size to make them has been difficult because depending on how you use Linux dictates on how large those partitions should be. It was recommended for CD and DVD burning and web usage to have the /TMP partition to be anywhere from 100 MB to a few gigabytes. I stopped reading and fussing over it when I realized I could set up LVM, or logic volume management for the all of my Linux partions, excluding /BOOT. And that way I can resize partitions to be larger later on and not have to worry about repartitioning (using ext4 which support resizing).

    This is what I have planned for my first partitioning scheme based off of online forums and FAQs about partitioning for Linux/Ubuntu: (ref: http://linuxmafia.com/~karsten/Linux...partition.html, http://www.linuxsa.org.au/tips/disk-partitioning.html, http://lissot.net/partition/partition-04.html, http://www.comptechdoc.org/os/linux/...untpoints.html, )

    /BOOT = 512 MB
    Swap = 4 gigs
    /TMP = 10 gigs
    /VAR = 1 gig
    /USR = 12 gigs
    /(root) = 20 gigs
    /HOME = 100 gigs (will increase over time)

    Here are the recomended setup and permission <options> settings for the partitions:
    (All partitions are planned to be ext4 fs <type>, and I'm not going to sub divide directories beyond the first directory to different partitions. For example, I will only have one /VAR partition, not /VAR partition and a /VAR/spool/news partition)

    (http://linuxmafia.com/~karsten/Linux...partition.html)
    /etc/fstab

    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    /dev/hda3 / ext2 defaults,errors=remount-ro 0 1

    proc /proc proc defaults 0 0

    /dev/hda6 /tmp ext2 defaults,nosuid,nodev 0 2
    /dev/sda7 /var ext2 defaults,nosuid,nodev 0 2
    /dev/hda5 /var/spool/news ext2 defaults,nosuid,noexec,nodev 0 2
    /dev/sdb2 /usr ext2 defaults,rw,nodev 0 2
    /dev/sda5 /usr/local ext2 defaults,rw,nosuid,nodev 0 2
    /dev/hda7 /usr/local/data ext2 defaults,nosuid,nodev 2 2
    /dev/hda2 /home ext2 defaults,nosuid,nodev 0 2

    I'm looking for any opinions or thoughts on this before I install.

    All I ask for is PEACH (Please Examine and Criticize Honestly)
    Homemade Mid-Tower<br />CPU: Athlon 64 X2 6000+<br />RAM: 4GB<br />GPU: NVidia GeForce 7600 GT<br />2 HD: 500 GB (System)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 TB (Backup Only)<br /><br />Kubuntu:<br />11.04<br />Ubuntu:<br />11.04<br />Mythbuntu<br />10.10<br /><br />Linux user since April of 2009

    #2
    Re: New system partitioning

    You can do it that way, but it's way more than you need to do. Basic rule of thumb:

    Two partitions; one for root ( / ) and another for users home ( /home ). If you want, you can create a third partition for swap (at least equal to the amount of installed RAM in your PC). That's it.

    If you go with the simple method, you should consider a 10GB minimum partition size for root. As already stated, if you go with a swap partition, it should be equal to installed RAM at a minimum. The rest of the space would be used for the home partition.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: New system partitioning

      Here's my comments/opinions:
      • Most of the information you've drawn this from is 4 to 10 years old, and is thus way out-of-date. In fact in most cases, last year's information is out-of-date.

      • Some of the recommendations you've taken border on paranoid, i.e. I've never heard of /var being corrupted by normal use.

      • Resizing and LVM sound like a good idea, but are a bit more complicated than you might think and are an unnecessary complication at this level of use.

      • Why leave a 42g blank partition "just in case" and then also plan on resizing? Seems redundant.

      • You're going to waste a ton of hard drive space.


      I am assuming you are an average user - by that I mean you're not working on defense contracts, creating exotic linux kernels, developing new technologies, or creating full-length motion pictures from scratch, and I assume this is a desktop computer.

      My beliefs:

      With 4gbs of RAM, you'll not use swap at all unless you use "Suspend to RAM" or transcode 4 or more DVD's at a time.
      You don't need a separate /boot unless you're using an exotic file system or RAID.
      If you still insist on a separate /boot, 200mb is enough for 6-10 kernels and 6 kernels is 4 more than you'll ever need.
      You don't need a separate /usr or /var anymore - the reasons to do that have expired.
      If you insist on a separate /var, 1gb is too small.
      A /tmp isn't a bad idea but certainly isn't required. Another option is to use /tmpfs (RAM+swap) instead of /tmp.

      Personally, I think it's a bad idea to spread your install out so much for virtually no benefit. Your plan is too complicated and very wasteful (of hard drive space). LVM is great if you're running a server setup that requires flexibility and constant expansion, but overkill for a regular user.

      One thing I'm confused about is you stated you have a 500gb hard drive, but your proposed fstab contains 3 hard drives. I'm going to assume this is a mistake and there's actually only 1 hard drive.

      My recommendations: You've planned for a future of resizing and moving partitions and rearranging data. Why not plan for a nice easy and stable future instead? You can always dig in and change things later if you really need to.
      Size the windows partition somewhat larger than your 45gb idea but unlikely you need the future 87gb as planned or you'd know it. Are you a hard core gamer? If not, 60gb will be plenty.
      Unless you're planning on installing every desktop and dozens of programs that serve the same functions, you'll never reach 20gb on your / partition.

      I suggest:

      4gb= /dev/sda1 swap
      60gb= /dev/sda2 <windows>
      20gb= /dev/sda3 /
      all remaining in extended/logical partition as /home

      You can only have 4 primary partitions so /dev/sda4 should be an extended partition and all other partitions will then be logical partitions in the extended partition.

      The only other suggestions I would offer are possibly reserving 1 or 2 20gb partitions. One for a backup of your linux install and 1 to install any other linux distros you might want to try.

      This will leave 400+gb for /home.

      If you want to make /tmp truely temporary, use

      tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0


      in your fstab. This creates /tmp in memory where it automatically grows when needed to up-to half of your RAM space, then it uses swap space. This way it is cleared at each shutdown or reboot.

      Please Read Me

      Comment


        #4
        Re: New system partitioning

        Snowhog, oshunluvr, Teunis,

        Thank you very much all your advice and saving me from a lot of trouble. This is why I had to post this because I wasn't able to find any information that was relevant or recent enough. You all saved me a lot of work and headaches, and I appreciate the time and effort you put into this.


        oshunluvr,

        In regards your comment here:

        Originally posted by oshunluvr
        Here's my comments/opinions:
        • One thing I'm confused about is you stated you have a 500gb hard drive, but your proposed fstab contains 3 hard drives. I'm going to assume this is a mistake and there's actually only 1 hard drive.
        I pullled that fstab from: http://linuxmafia.com/~karsten/Linux...partition.html, and my only intention is displaying that was in regards to the partitions; like the ones you posted:

        tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

        Thank you for that tip.

        -resistanceISuseless
        Homemade Mid-Tower<br />CPU: Athlon 64 X2 6000+<br />RAM: 4GB<br />GPU: NVidia GeForce 7600 GT<br />2 HD: 500 GB (System)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 TB (Backup Only)<br /><br />Kubuntu:<br />11.04<br />Ubuntu:<br />11.04<br />Mythbuntu<br />10.10<br /><br />Linux user since April of 2009

        Comment


          #5
          Re: New system partitioning

          Originally posted by resistanceISuseless

          I pullled that fstab from: http://linuxmafia.com/~karsten/Linux...partition.html, and my only intention is displaying that was in regards to the partitions; like the ones you posted:
          Pretty much what I figured, glad we helped you out.

          Don't be afraid to come back for more help.

          Please Read Me

          Comment


            #6
            Re: New system partitioning

            I want to thank you guys again. Just so you know, I have finally installed Kubuntu on my laptop and desktop. Going forward, I didn't think I would be installing as much on my laptop as my desktop. So I choose a smaller partition for "/" directory. After installing Kubuntu, Google Chrome, Flash, Dropbox, and getting all the updates that were available, i now have very little space left in the "/" partition. Below is output for the # df

            Filesystem 1K-blocks Used Available Use% Mounted on
            /dev/mapper/Kubuntu_Volume_Group-ROOT_VOLUME
            14417392 9292808 4392220 68% /
            none 1402576 684 1401892 1% /dev
            none 1413672 4236 1409436 1% /dev/shm
            none 1413672 96 1413576 1% /var/run
            none 1413672 0 1413672 0% /var/lock
            /dev/sda6 198337 63825 124272 34% /boot
            /dev/mapper/Kubuntu_Volume_Group-HOME_VOLUME
            67239544 494684 63329208 1% /home

            I have used 68% of the space in the "/" partition. Now I went the route of LVM, and I used ext4 for "/" and "/boot" partitions. So I know I can resize the partitions. Should I be concern that I only have 32% of free space in that directory?
            Homemade Mid-Tower<br />CPU: Athlon 64 X2 6000+<br />RAM: 4GB<br />GPU: NVidia GeForce 7600 GT<br />2 HD: 500 GB (System)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 TB (Backup Only)<br /><br />Kubuntu:<br />11.04<br />Ubuntu:<br />11.04<br />Mythbuntu<br />10.10<br /><br />Linux user since April of 2009

            Comment


              #7
              Re: New system partitioning

              I have a rather "loaded" install and I'm using about 8gb for my / - you're already at 9gb. I doubt you'll find enough more things to install that you'll exceed 14gb. If you're worried about tmp files like Teunis suggested you can easily shift /tmp to another partition.

              However, I agree with Teunis's opinion that you're fine.

              I have often used only 8gb for an install - you just have to be more selective in what you install. For instance - I have three internet browsers, many video and graphic editors, Open Office, games, Wine and a few windows programs... all in 8gb.

              Please Read Me

              Comment


                #8
                Re: New system partitioning

                Teunis & oshunluvr, I'm glad you are still around.

                Teunis, I have not gone through an upgrade, but I plan on upgrading as the next 11.10 or 11.xx comes out. Not sure what is involved; I will deal with that after the release. Thank you for reassuring me and for giving me those tips for any future upgrades.

                oshunluvr, you brought up my very first thought about dealing with tmp files before an upgrade. I thought to myself, "How do I create a /tmp partition when I already have a /tmp directory on my / partition?" It's not something that I will have to do right away, but I would like to know how to do it. If you have any suggestions, I would be glad to hear it. Otherwise, I will look it up.

                Thank you both very much.

                -resistanceISuseless
                Homemade Mid-Tower<br />CPU: Athlon 64 X2 6000+<br />RAM: 4GB<br />GPU: NVidia GeForce 7600 GT<br />2 HD: 500 GB (System)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 TB (Backup Only)<br /><br />Kubuntu:<br />11.04<br />Ubuntu:<br />11.04<br />Mythbuntu<br />10.10<br /><br />Linux user since April of 2009

                Comment


                  #9
                  Re: New system partitioning

                  Originally posted by oshunluvr
                  Some of the recommendations you've taken border on paranoid, i.e. I've never heard of /var being corrupted by normal use.
                  I *always* put /var on its own partition if I'm building a server so that a runaway process doesn't bring down the root filesystem by filling it with logfiles.
                  we see things not as they are, but as we are.
                  -- anais nin

                  Comment


                    #10
                    Re: New system partitioning

                    Wizard10000, That sounds just like what I was reading before. I'm guessing that /var having it's own partition is overkill for a desktop. I do plan on using my Kubunu box (Desktop) for Torrenting, Samba sharing, and be able to SSH Tunnel into it, but I doubt that will require me to consider it a server. I could be wrong.

                    -resistanceISuseless
                    Homemade Mid-Tower<br />CPU: Athlon 64 X2 6000+<br />RAM: 4GB<br />GPU: NVidia GeForce 7600 GT<br />2 HD: 500 GB (System)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 TB (Backup Only)<br /><br />Kubuntu:<br />11.04<br />Ubuntu:<br />11.04<br />Mythbuntu<br />10.10<br /><br />Linux user since April of 2009

                    Comment


                      #11
                      Re: New system partitioning

                      There are several ways to handle /tmp. If you wish to create a separate partition for it you need to create on and put the mount line in fstab. You will also need to clear the current /tmp directory before you mount the new partition or the space being using by the files in the current /tmp will be hidden and continue to take up space.

                      If you know in advance of installing you want a separate /tmp partition you can do it at install time by using the Advanced partitioning feature.

                      I have 4 HD's and 8gb RAM so I mount /tmp in RAM. It uses up to half the available RAM and then swaps to the hard drive using my swap partitions (4gb each on 4 drives). I haven't filled it enough to swap to HD space yet.

                      IMO unless you're doing lots of video editing or something else RAM hungry I doubt you need to worry about your /tmp space.

                      Please Read Me

                      Comment


                        #12
                        Re: New system partitioning

                        Originally posted by resistanceISuseless
                        Wizard10000, That sounds just like what I was reading before. I'm guessing that /var having it's own partition is overkill for a desktop. I do plan on using my Kubunu box (Desktop) for Torrenting, Samba sharing, and be able to SSH Tunnel into it, but I doubt that will require me to consider it a server. I could be wrong.
                        You're right - not necessary for a desktop.

                        cheers -
                        we see things not as they are, but as we are.
                        -- anais nin

                        Comment


                          #13
                          Re: New system partitioning

                          oshunluvr, Wizard10000, thank you for your input and insight. I'll try not to use this post so much for questions. If I have more, I'll start a new post to bother someone else. :-D

                          -resistanceISuseless
                          Homemade Mid-Tower<br />CPU: Athlon 64 X2 6000+<br />RAM: 4GB<br />GPU: NVidia GeForce 7600 GT<br />2 HD: 500 GB (System)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 TB (Backup Only)<br /><br />Kubuntu:<br />11.04<br />Ubuntu:<br />11.04<br />Mythbuntu<br />10.10<br /><br />Linux user since April of 2009

                          Comment

                          Working...
                          X