LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Partitions (https://www.linuxquestions.org/questions/linux-hardware-18/partitions-822338/)

Pedroski 07-26-2010 10:04 PM

Partitions
 
I am no expert!

I want to install the newest Ubuntu. I already have a partition on my HD free. But now I think it is better to subdivide it more into:

/ (ie root)
home
boot

Is this a good idea? If so, what sizes would you recommend for / and boot? The rest can then be home.

Is it better to do this beforehand, from Fedora, using gparted?

Thanks for any tips!

vigilandy 07-26-2010 10:27 PM

The size of your partitions depends on how much disk space you have and what you plan on using your machine for. If this is for a box at home to be used for web browsing, email, games, etc, then the partition scheme you mentioned is good.

The boot partition can be as small as 200MB. The size of the root partition depends on how much software you intend to install. 20~30GB should be plenty. I'd also have a swap partition of about twice the size of your RAM to help avoid memory issues. Then put the rest in /home.

hkothari 07-26-2010 10:27 PM

My /boot partition is 100M approx, my root is around 7GB, I'm using arch linux and this seems fine for me, I haven't had problems, but I'd give your root around 10GBish.

Pedroski 07-26-2010 11:50 PM

The partition is 53 GB

I have a 7GB swap partition, 4GB RAM

So if I set 1GB boot, 20GB root, the rest home, does that sound good?

I like to try different flavours of Linux. Nowadays I use Fedora 12, but I want to try the new Ubuntu.

Is it ok to set up these partitions first in gparted? Or let/get the installer do it?

vigilandy 07-27-2010 12:16 AM

If you only have 53GB to work with, I might reduce the root partition to around 10GB and put the rest in /home. Also the boot partition only needs to be 200MB, a full GB is overkill. Other than that, it looks good.

Setting up the partitions beforehand with gparted is probably a good idea. The Ubuntu installer can do partitioning, but gparted is a more user friendly tool.

Wim Sturkenboom 07-27-2010 02:13 AM

I personally would not care about a separate boot partition; you always run the risk that a kernel update fails because there's not enough space. Also, 7GB swap is a lot; if this is a laptop, that makes sense (for hybernation), else I would limit it to 1GB.

Just my thoughts

Pedroski 07-27-2010 03:16 AM

You mean put boot under / ? No problem.

The only thing I want is to avoid, wiping my home directory on a new install. Now, if I make it a separate partition, that will not be the case, correct? All I have to do is ensure that it gets mounted at boot, which means an entry in fstab, if I am not mistaken. However, the installer will want to create a /home I think. How do I tell it not to?

Wim Sturkenboom 07-27-2010 04:02 AM

What are you trying to achieve? A dual boot or replacing Fedora by Ubuntu?

There is no problem if the Ubuntu installer wants to create a partition for /home (although I doubt it will do so without being instructed to do so) as this partition will be a different partition from the one used in Fedora.

Can you post the output of fdisk -l (that's a lower case L at the end) and df -h so we have an idea what we're looking at?

Note: sharing home directories between distributions is not always advisable because of different versions of installed applications which might result in incompatible config files.

Pedroski 07-27-2010 04:39 AM

No no! I run Fedora usually. I want to install Ubuntu on another partition, to try it out. I have an old version of Ubuntu to write over. This will destroy the home directory. The upgrade function does not work, I've tried several times. So now I want to do a new install. This time I want to create a home directory, such that, any new install won't wipe out home. That's all!

Wim Sturkenboom 07-27-2010 05:23 AM

In which case you must indeed create a partition for it (as you stated in your first post). I would let the installer do it. 20GB for / is plenty (mine grew from around 3.5 GB to around 7GB in 3 years).

PS You are aware that you can share the swap between the distros?

saikee 07-27-2010 06:17 AM

Yep 7Gb is one hell of a swap. Never use more than 1Gb swap myself.

I also favour one partition to mount / so that all others are just subdirectories to it. 20Gb is ample.

It is easier to let each distro to have its own /home which can takes a lot of work if it is shared between distros.

Pedroski 07-27-2010 07:19 AM

What I am trying to achieve is put my personal stuff in a separate directory, not under / As far as I know, on a new install, the / partition is rewritten completely. If home is in there, well, bye-bye.

What do I need to achieve this? Seems to me, I need two partitions, one for /, boot and one for home. Then adjust fstab to mount the partition home on boot. Is this the way to do it?

I have already Win Fedora and Ubuntu 9.10. But now I want to move to Ubuntu 10.04 on sda6. On this install, I would like to make home (for Ubuntu) separate, so that, should the upgrade fail again in the future, I can do a new install, and not worry about home being touched. Does that sound reasonable?

Sorry I didn't see the latest comments before posting this. But to reiterate: if home is under / it will always be wiped out on a new install, correct? I have, sadly, found that upgrades don't want to work, neither in Ubuntu, nor in Fedora. They both hang somewhere, and don't do what they are supposed to.

saikee 07-27-2010 07:54 AM

There is nothing to stop you to have a data-only partition for storing your personal data mountable in every operating system. You can mount it in any Linux /etc/fstab with any name you wish, say /My_data.


Many users have own data partitions. Mine is in ntfs so that it is accessible in every MS Windows too.

vigilandy 07-27-2010 08:14 AM

Pedroski, your completely correct that when reinstalling a distro, the root partition gets reformatted, thus destroying any data on that partition. So creating a separate partition for /home is a good idea to avoid this.

To have this automatically included in your fstab, most installers, Ubuntu included IIRC, allow you to declare the partition and set any mount point you want. Just make sure to NOT format that partition during REinstallation. No need to manually edit fstab, unless you're into that sort of thing ;). But you will need to format the /home partition during the first installation.

What saikee is saying is that you can also create another partition to share between the other OS's on your system.

johnsfine 07-27-2010 08:21 AM

I don't think it is typically effective to split either /boot or /home to a different partition. That wastes your time and effort figuring out the right sizes for the split and resizing later if space is used in unexpected places. Then there is little if any benefit to the split.

There is a lot of configuration data in /home. When you install a different distribution or even a non rolling new version of the same distribution, lots of that configuration data will be stored with different names and/or different formats.

So if you try to keep and existing /home partition across a significant change of distribution or version, you will have a mess of incompatible config data. It is easier to start each new distribution clean and then explicitly copy over any config data you think will be compatible.


All times are GMT -5. The time now is 03:11 PM.