Linux: Skema Partisi di Linux

From OnnoWiki
Revision as of 05:38, 24 March 2013 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Sumber: http://www.howtogeek.com/howto/35676/how-to-choose-a-partition-scheme-for-your-linux-pc/

Apakah Partisi?

Partisi adalah pembagian dalam format hard disk. Ini adalah pembagian secara logic - bukan secara fisik , sehingga Anda dapat mengedit dan memanipulasi partisi untuk berbagai tujuan. Bayangkan membagi disk menjadi dua bagian yang berbeda konfigurasi. Partisi benar-benar berguna karena mereka bertindak sebagai bak pasir. Jika Anda memiliki drive 1 TB dipartisi menjadi partisi GB 250 dan 750 GB partisi, apa yang kita lakukan di partisi yang satu tidak akan mempengaruhi yang lain, dan sebaliknya. Kita dapat berbagi salah satu partisi pada jaringan dan tidak pernah khawatir tentang orang-orang mengakses informasi di partisi yang lain. Satu partisi bisa berisi Windows yang diinstal, penuh dengan virus dan trojan. Yang lain bisa menjalankan Linux yang sudah sangat tua yang penuh dengan lubang-lubang security. Kerdua-nya tidak akan saling mengganggu, kecuali jika kita membuat keduanya mati secara fisik.

Hal lain yang berguna adalah bahwa kita dapat memiliki beberapa partisi, masing-masing diformat dengan sistem file yang berbeda. File system adalah format disk yang dimasukan ke dalam tabel yang dapat di baca, ditafsirkan, dan di tulis oleh sistem operasi. Kita hanya memiliki satu hard drive? Tidak apa-apa, karena kita dapat menginstal beberapa sistem operasi di satu disk tersebut tanpa perlu punya disk lain secara fisik.

Sementara ada banyak sekali jenis file sistem, hanya ada tiga jenis partisi: primary, extended, dan logical. Setiap hard disk yang diberikan hanya dapat memiliki maksimal empat partisi primer. Keterbatasan ini disebabkan keterbatasan dari Master Boot Record yang memberitahu komputer akan partisi dapat di boot, oleh karenanya biasanya partisi primer disediakan untuk sistem operasi. Tapi bagaimana kalau kita ingin lebih dari empat? Di situlah partisi extended mulai berperan. Ini berfungsi sebagai wadah untuk sejumlah kecil, partisi logical. Anda dapat membuat sebanyak yang kita suka di sana, serta membuat tempat / partisi non-OS / data.

If extended partitions are so great, why not just use them? That’s because you can’t directly boot from anywhere inside an extended partition. There are ways to get around this, but the best thing to do is to plan properly beforehand with primary partitions. In addition, the way partitions are numbered by the system depends on these types. First, the machine will number based on all primary partitions, and then by logical ones. This can cause changing drive letters if you switch between OSs or add or delete partitions later.


Mount Points in Linux

Image by MethodDan

On Windows, things are pretty clearly cut: it lives on your disk, usually on one partition, and that’s that. If you have other drives, and they have a compatible file system, then it’ll read them as well. If not, it’ll usually ignore them, or offer you the ability to reformat. Linux – and anything resembling Unix, really – doesn’t quite work that way.

The way Linux works is that it puts everything onto a tree. If you have another partition or disk, it gets “mounted” as a branch in a specific folder, usually /media or /mnt. The directory that a partition gets mounted to is called a “mount point.” This method works better with Linux’s tree structure, and you can mount partitions as folders nearly anywhere. In Windows, this is not so easily done; new partitions generally show up as separate drives. In addition, Linux can work with many more types of file systems natively than Windows.

Remember how there could only be four primary partitions? If you want to boot 145 OSs like someone on the JustLinux forums did, you can set up a primary partition for /boot, which houses a boot-loader, like GRUB or LiLo, which handles initial functions and then continues booting into the extended partitions. What Scheme Should I Use?

The standard partitions scheme for most home Linux installs is as follows:

   A 12-20 GB partition for the OS, which gets mounted as / (called “root”)
   A smaller partition used to augment your RAM, mounted and referred to as swap
   A larger partition for personal use, mounted as /home

The exact size requirements change based on your needs, but in general you start with swap. If you do a lot of multimedia editing, and/or have a smaller amount of RAM, you should use a larger amount of swap. If you have plenty of memory, you can skimp on it, although some distributions of Linux have a problem going into standby or hibernating without much swap. The rule of thumb is that you choose between 1.5 to 2 times the amount of RAM as the swap space, and you put this partition in a place that is quick to reach, like at the beginning or end of the disk.

Even if you install a ton software, a maximum of 20 GB for your root partition should be enough. Most distributions of Linux use either ext3 or ext4 as their file system nowadays, which has a built-in “self-cleaning” mechanism so you don’t have to defrag. In order for this to work best, though, there should be free space for between 25-35% of the partition.

Finally, whatever else you have should go to your /home partition. This is where your personal stuff is stored. It is functionally the equivalent of the “Users” directory in Windows, housing your application settings, music, downloads, documents, etc, and those of any other users you have on your system. It’s useful to have /home in a separate partition because when you upgrade or reinstall your OS, you don’t have to backup anything in this folder! Isn’t that convenient? To top it off, most of your program- and UI-related settings are saved as well!

If you’re running a server with a lot of users and/or a lot of media, you could optimize performance by using two hard drives. A small solid state drive would be perfect for the OS to live on, maybe 32 GB at most, and you could throw the swap partition on the beginning of a 1 or 2 TB “green” drive that’s mounted on /home.

If you’re into more tinkering, you can even set up different partitions for things like the temporary directory (/tmp), for your web server’s content (/var/www), for programs (/usr), or for log files (/var/log). Specifying Mount Points During Installation

In our example, we’ll be using showing the partition setup during an Ubuntu Maverick Meerkat installation. When you get to where it says “Allocate drive space,” choose “Specify partitions manually (advanced).”

Don’t panic just because you see “advanced”; it’s really not that difficult and you’ll be getting some real rewards from the process. Click forward and you’ll see the partition table.

Click on the free space row in the table and then click on “Add…” If you don’t have free space, click on your Windows partition, hit “Change…” and shrink it to a more palatable size. This will give you some free space to work with.

Here, you can see that I’ve created a Primary partition of about 11.5-odd GB at the beginning of the disk and I’ve specified it to use root as the mount point. You will have to use a Linux-compatible file system, so I used the default ext4, although you can use ext2, ext3, ReiserFS, or whatever else. Do some research online and you’ll be able to choose the best, but if you’re in doubt, stick to the default. You can adjust yours to more space if you have it, but again, you probably won’t ever need more than 20 GB unless you’re installing/compiling a lot of software. Click “OK” and you’re set to create another partition.

This time, as you can see, I’ve chosen a logical partition (the partitioning program automatically creates an extended partition for this). Since this machine has a 512 MB of RAM, I’ve approximated 1.5 times that, and designated it as “swap area.” Also note that I’ve stuck this at the end of the disk, which will help keep disk seeking times at a minimum. Click “OK,” and let’s create another partition.

I’ve selected all of the rest of the space in the middle to be my /home partition. The compatible file system I’ve chosen is again ext4. Now here is the gray area: should it be primary or logical? I went with primary because I know that I won’t be installing another OS on here, otherwise I would have gone with logical. If you don’t plan on installing more than three OSs, you can just make it primary for simplicity’s sake.

When you’re all finished, you can resume installation. Here’s my resulting partition table:

If you get cold feet, you can quit the installation at this point without fearing any data loss. Nothing is actually done to your disk until you hit “Install Now,” so you can go back and edit things as you wish.

Referensi

Pranala Menarik