7

I plan to partition my hard drive into efi, /, /home, and swap.

If considering the beginning of my disk is faster than its end, how shall I arrange the order of my partitions?

  • Should / be as close to the front as possible, because there is the running OS?

  • Should swap also be as close to the front as possible, because swapping back and forth with main memory should be fast?

  • Does efi need to be near the front or not?

  • How about /home?

Byte Commander
  • 107,489
Tim
  • 25,177
  • IF you have a newer system with UEFI, the speed difference of hard drive will not be noticeable. UEFI suggests efi partition should be first. If you have 4GB of RAM or more you may never use swap. I keep /home inside / (root) on SSD for speed and have all data folders in a data partition on rotating drive since data is not accessed as much. And Linux caches recent activity in RAM, so hard drive is not used as much. – oldfred Mar 08 '15 at 19:54
  • (1) I have a raw hard drive. Can Ubuntu 14.04 installation program make EFI partitions on it? (2) I need swap for hyibernation. where shall it be positioned? – Tim Mar 08 '15 at 20:01
  • I have always partitioned in advance with gparted. Set to gpt before anything else in device, advanced options. How you boot installer is how it installs, UEFI or BIOS. And only with Something Else, do you get the options for more than the default / & swap. – oldfred Mar 08 '15 at 20:02
  • Do you mean if the internal hard drive of my laptop is raw, and I insert a flash drive containing 14.04 installation program into my laptop, the installation program won't run? Shall I preprocess the raw hard drive before replacing my current hard drive (with 12.04) with it, and if yes, how? – Tim Mar 08 '15 at 20:07
  • Optimizing the order of partitions on a disk used to be a big deal, but most people today are much less interested in this issue, probably because disk performance today is good enough that the time spent optimizing placement is not something you'll gain back in improved productivity. I wouldn't worry about it. As to the rest, see my answer to your other recent question. – Rod Smith Mar 08 '15 at 21:21

1 Answers1

4
  1. swap
  2. /
  3. /home
  4. efi

Why?

Indeed, the beginning of a HDD is faster than the end (SSDs are entirely different animals), and when you need to swap, you want it to be as fast as possible.

You want your applications, temp files, ... to start as fast as possible to have a nice user experience.

(For completeness: If you're running a database server, put the database log files in-between 1 and 2)

Additional free tip: Don't just buy a new internal HDD, buy 2: One extra to make back-ups on! Read this Q&A for more info! ;-)

Fabby
  • 34,259
  • Thanks. If I install GPT with my BIOS, I think I will need a BIOS-Boot partition? Does the BIOS-Boot partition need to be at the beginning of the disk, before swap? – Tim Mar 09 '15 at 00:51
  • I have installed 14.04 successfully. When i partitioned the disk, there is always a 1MB free space at the beginning of the disk. I thought the installer program would use it for BIOS-Boot partition, but later the installation program asked me to explicitly create one. I couldn't create it from the 1MB free space, because it didn't satisfy some contraint. Then I had to create a 1MB BIOS-Boot partition after the 1MB free space. I wonder what that 1MB free space is used for? – Tim Mar 09 '15 at 02:35
  • It's probably to align a partition to a physical boundary (probably sector) – Fabby Mar 09 '15 at 08:16
  • What do you think about EFI partitions? Should they always be first? Because I've read somewhere that them to be first is mandatory, but I think it's actually not, I think it's done in order to fasten the boot process, but would it really be significant / significant enough to shift the swap partition in second place? – kos May 04 '15 at 16:51
  • @kos: the (U)EFI partition can be put wherever you want it to be, as it's just a boot loader. ;-) What's important is the boot flag, not the physical sector on the disk (although it's a FAT32 partition, so don't put it on the last sector of a 5TB drive neither). Ping me in chat, or Ask a question I think it's a good one and there are better people then me that kno much more about these things... – Fabby May 04 '15 at 17:21