LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Need partitioning advice (https://www.linuxquestions.org/questions/linux-general-1/need-partitioning-advice-761065/)

Morik the Rogue 10-10-2009 09:37 PM

Need partitioning advice
 
I'm going to be doing a fresh install soon (I'm switching distros) and am looking for some advice about my partitioning.

When I installed Ubuntu I just let the installer have it's way with my hard drive but this time I'll be setting all of this up by hand.

Now, my first question is about swap. I've heard a lot of conflicting accounts about how much you need or if you even need it at all. Most say you need twice your ram. Well, I have 4gb. 8gb of swap seems a little...excessive. Of course, I'd rather have too much than not enough. So what is the upper ceiling? At what point does it just become waste? Bear in mind, this is a laptop and I intend to use suspend and hibernate. I understand those functions use swap. Hibernate does at least.

As to the other partitions, I know that at the very least I want separate / and /home partitions. But a lot of people seem to use others. I've heard of partitions for /boot, /usr, /tmp, /var, and many others. /boot and /usr in particular seem to come up alot. So, why make any of these? What are the advantages?

Assuming I just settle on / and /home, how much space should be set aside for /? It's a 250gb hard drive by the way.

Quakeboy02 10-10-2009 09:45 PM

There are numerous swap threads here on LQ. Since you're reinstalling, you should have some idea of how much memory you generally use. If you're like most people with 4GB ram you don't even use 1GB regularly. So, using 8GB of swap would be pointless. So, if you don't plan on using the suspend function, then use 1GB of swap. If you do, then search LQ for suspend.

There have also been numerous partitioning threads here on LQ. If you look at the bottom of this page, you will find links to 5 of them. There are many *right* ways, and only a few ways that are really dumb. Personally, I would just set aside 20GB for your Linux install (including /home) and put the rest in "/data". But, that's just me and I prefer to have my data in /data. Some people are very vehement that it by god belongs in /home. You pays your money and you takes your choice.

smeezekitty 10-10-2009 10:11 PM

my way of caculating swap is
<ram> + 100MB
that way suspend will work and you dont waste disk space

cola 10-10-2009 10:49 PM

swap=2xram

smeezekitty 10-10-2009 10:57 PM

Quote:

Originally Posted by cola (Post 3715028)
swap=2xram

thats outdated
it was true when people had 16-256 ram

feelin_froggy8877 10-10-2009 11:17 PM

I been playing with partitioning for a while and always had everything at /home, for a 20 gig hdd with it cut in half ubuntu & Micro%$!@ recently I decided to cut loose Windows and repartition for Ubuntu only. My root partition is 5 gigs and home is 15 gigs. I have pretty muck installed everything I would ever use (vmbox, media players, running compiz, cairo dock, screenlets, wine) just to name a few. And still have about 1.5 gigs left in /. and almost all space in /home. (I keep vmbox, just in case) All my other data goes on another hdd. As far as swap, they say to have your ram plus a bit for sleep and hibernate to work, but I never had any luck with them. So I had some partition space left on another hdd and gave 2gigs swap to see if I would have any luck, Still cant come back from either sleep nor hibernate.

lutusp 10-11-2009 12:32 AM

Quote:

Originally Posted by Morik the Rogue (Post 3714978)
I'm going to be doing a fresh install soon (I'm switching distros) and am looking for some advice about my partitioning.

When I installed Ubuntu I just let the installer have it's way with my hard drive but this time I'll be setting all of this up by hand.

Now, my first question is about swap. I've heard a lot of conflicting accounts about how much you need or if you even need it at all. Most say you need twice your ram. Well, I have 4gb. 8gb of swap seems a little...excessive. Of course, I'd rather have too much than not enough. So what is the upper ceiling? At what point does it just become waste? Bear in mind, this is a laptop and I intend to use suspend and hibernate. I understand those functions use swap. Hibernate does at least.

As to the other partitions, I know that at the very least I want separate / and /home partitions. But a lot of people seem to use others. I've heard of partitions for /boot, /usr, /tmp, /var, and many others. /boot and /usr in particular seem to come up alot. So, why make any of these? What are the advantages?

Assuming I just settle on / and /home, how much space should be set aside for /? It's a 250gb hard drive by the way.

Just set up three partitions:

1. System (/) with all the usual system directories -- as you put it: "/boot, /usr, /tmp, /var, and many others." All on the same partition. This partition should be about 20 GB.

2. Swap -- twice system RAM, at least that's the conventional wisdom.

3. The remaining partition should occupy the rest of the drive and you can use it for data. Some people elect to make the remaining partition mount as /home -- that way, you can reinstall Linux without having to restore all you personal data.

But avoid a lot of unnecessary partitions.

fasteddy110 03-12-2010 09:18 PM

can anyone tell me why I can not WRITE my changes to disk when I exit out of FDISK or CFDISK I get quit program without writing partition table?

tredegar 03-13-2010 09:26 AM

For fdisk, q quits without writing the changes and w writes the new partition table, then quits.

Please start a new thread next time you have a new question.

Welcome to LQ!


All times are GMT -5. The time now is 06:22 AM.