Saturday, January 7, 2012

Partitioning disk for installing Linux

Are you installing Ubuntu on a new machine and you’re not sure how much storage space the installation would need or how to partition your disk?  I have a few suggestions:
  • Create separate partitions for Linux installation (mounted at /) and data (mounted at /home).  This way, you can completely wipe and reinstall your OS or switch to a different distro without worrying about data in your home directory.
  • A typical Linux installation doesn’t need a lot of space.  I allocated 20GB for my root (/) partition purely based on some guess work, but I’m using only about 7.2GB in that partition.  If I’m starting over again, I’d go with a 12 or even a 10GB partition.  (You’re a lot more likely to eventually run out of space on your home partition than on the root partition.)
    % df -hl
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda1              19G  7.2G   11G  40% /
    udev                  2.9G  4.0K  2.9G   1% /dev
    tmpfs                 1.2G  996K  1.2G   1% /run
    none                  5.0M     0  5.0M   0% /run/lock
    none                  2.9G  2.8M  2.9G   1% /run/shm
    /dev/sda6              93G   78G   11G  89% /home

1 comment:

  1. Thanks for this tip. With this helping, I would be able to create dedicated disk space for several levels of file object.

    ReplyDelete