Tag/tag.png

Content Cleanup Required
This article should be cleaned-up to follow the content standards in the Wiki Guide. More info...

Introduction

The Linux installation will be spread over several directories, comparable to Windows. Basically, Linux requires one partition named “/” and a small partition as swap space. In some user forums you can find recommendations to place certain Linux directories in separate partitions, often without any argument why this should be advantageous.

I strongly recommend: don't use any additional partition without a clear reason why you do it and what is the advantage for you!

Below some remarks about partitioning, and why not use more then the two basic partitions (“/” and swap) for Linux:

  • a partition has a fixed size, contrary to a directory. It can happen, that your Linux become blocked or even messed up, if one partition is full, even though there is plenty of free space on your hard-disc. That this never will happen, you have to include a safety margin in any partition, which is a kind of wasted space. If there are several directories in one partition, they all will share the total empty space.
  • For “/home” you can find the argument: that there are the private user data like text, photos, ... and if this is in an extra partition, you could reinstall your Linux Distro without loosing your data files. But this is not the full truth: in the “/home” directory Linux will also store many of your private system set-up files. Therefore, a clean new install is not possible: it will be difficult to get rid of your old set-up, if you messed it. But even if you are upgrading your Distro, some of these set-up data may become incompatible, and if you like to switch to another Distro, the set-up files will create problems for sure.
  • sometimes it is recommended to have a special partition to exchange data with windows. But today r/w access from Linux to ntfs is well established, and for Windows there are excellent drivers for ext3 in Linux, therefore there is no need for this partition.
  • partitioning is reversible in principle. But keep in mind: it is not an every day task, and a small mistake can end up in a disaster!

I recommend to create one additional independent partition (excluded from Linux/Windows administration) for your private data only (and nothing system related). The files can be easy accessed by Office- or Photo software. And it offers any option for a clean install, or fresh install of any different Linux distribution: your data-files remain save in there own partition, and even Win data could be stored there as backup. The “/home” now is only used for temporary purposes (beside system needs).

Normally, Windows (or whatever) is placed in a primary partition. For some reason, the maximal number of primary partition is limited to four.

Example to use only primary partitions:

Windows+ yourData+ Linux+ Swap

–-> this would absolutely be possible, if the disc is quite short of space, and any further extension is excluded.

I recommend to put all Linux stuff in an extended partition, which has not this limit to four and offers more flexibility: it would easy be possible to install more then one distribution to play with.

Example with extended pertition:

primary: Windows+ extended Partition+ not used+ not used

extended: yourData+ Linux1+ Linux2+ ...+ Swap

Linux is easy and fast to install, and there are many reasons to try more then one distribution:

  • Desktop: Gnome, KDE, Xfce, ...
  • Packet-management: deb, rpm, ...
  • Performance, speed, Eye candy, ...

Realisation

If required, you should first install your Windows. Think about how much of disc space you like to assign to Windows.

new Windows: you create a partition (C:) with the size of your choice for the installation, and an empty D: partition (for the extended stuff later). Windows already installed: first make a defragmentation of the Win drive, just for safety reasons.

Now you use a live CD of Linux, which contains the program Gparted: an excellent tool to tweak the partitions. If there is a problem to find Gparted, please use the link below: http://www.puppylinux.com/download/downpage.htm

This is a small and fast Linux Distro, which includes Gparted, and is perfect suited for system maintenance. A more detailed Gparted description you can find below in chapter “4.1.3 Creating partitions”: http://www.puppy-linux.info/en/manual/puppy301/main.html

In the free disc space you need to allocate:

  • “swap”: 0.5 ... 2 GB, but I think 1 GB is ok, if there is enough disc-space available.
  • “/” for Linux: space depends on the size of the distribution, the number/size of your programs, and eventually your data (and a safety margin!): 3 ... 15 GB
  • if you like: “/” for any other Distro, see above.
  • “yourData” all the remaining: size only depending on your needs for text, photo, ...

Start the Gparted program: (with Puppy: "Menu | System | Gparted partition manager")

Keep in mind: Gparted will store any of the elementary steps “Delete”, “New”, "Resize/Move", and everything is reversible or can even be canceled.

BUT(!!!) if you select the button "Edit | Apply All Operations" the commands will irreversible and mercilessly be executed!

Don't store too many steps, rather execute a compact set of one to three of them.

  • if needed, shrink your Windows partition to the proper size: select the partition and then click the "Resize/Move" button. Put a 0 for “free space preceding” to keep it aligned to the 'left' (low address) side: this will create an unallocated space on the 'right' side.
  • or if there is (an empty) D: drive, select and click “Delete” to create an unallocated space on the “right” side.
  • select the unallocated space and click “New” then in “Create as” select “Extended partition” and click "Add".
  • select the unallocated space (extended partition), click the "New" button, select “Linux-swap” from the "File system" box, enter the swap size and a 0 for “free space following” ('right' adjust) and click "Add".
  • select the unallocated space, click the "New" button, select ext3 from the "File system" box, enter the size for “/” and a 0 for “free space following” ('right' adjust) and click "Add".
  • for more Linux partitions: repeat item above (only one swap required!).
  • select the remaining unallocated space, click the "New" button, select ext3 from the "File system" box, and click "Add" to create the “yourData” partition.

That's it: please note on paper, how your disc is partitioned. Example:

  • /dev/sda1/ Windows, NTFS /dev/sda2/ Extended Partition /dev/sda5/ reserved for yourData /dev/sda6/ for Linux “/” /dev/sda7/ for linux “swap”

Insert the installation CD and restart the computer. During installation you will be asked about how to do partitioning: you choose manually. The map of your HD will be presented: now you only have to define, where to place “/” and “swap”, and the show goes on.

Cosmetics

Perhaps sda5 (or D:) are mnemonically not the best names, and you would like to chance this. In Linux the partitions (and other drives) are mounted and mapped to a directory, where they can be accessed as any directory in the usual way. During startup, the partitions are mounted according to the instructions in the file: /etc/fstab

There you may find a line like below:

/dev/sda5 /media/sda5 ext3 defaults 0 2

instead of “/dev/sda5” you may find “UUID=b7dcc54d-8690-4358-8213-ecfcc9154673“

but this is only a different method to identify the partition.

This means: the partition “/dev/sda5” will be mapped to a directory “/media/sda5” In this directory you will find anything, files and directories of this partition.

If you prefer the name “myData” you do

  • edit the file “/etc/fstab” (as superuser!) and change the line to /dev/sda5 /media/myData ext3 defaults 0 2
  • in the directory “/media” you create the new directory “/media/myData” (as superuser!)
  • after reboot, you will find your datafiles in “/media/myData” while “/media/sda5” is an empty directory, which (only in this case!) can be removed.


getready_for_linux (last edited 2009-04-29 14:55:24 by cpc2-hart3-0-0-cust757)