5

I am trying to creat root , swap and home partition in order to install ubuntu onto my external hard drive.I use the program called Gparted.

But some people say first section must be root ,other say swap on disk..

Which one is true?

thanks

emre
  • 63
  • Why do you care!? FYI: I haver never seen / not on the 1st partition. – Rinzwind Feb 25 '13 at 19:10
  • Addition: if you believe it would matter when it comes to speed...it depends on how many discs you have and even on the brand of discs. And any given sector that you specify can physically be anywhere on the drive. – Rinzwind Feb 25 '13 at 19:18
  • It does not matter at all. – Jay _silly_evarlast_ Wren Feb 25 '13 at 19:20
  • thanks can I ask something else..Will I have to use "extended partition" for swap or home..Do they definitely have to be separate partition don't they? root - primary and ext 4 * swap primary and linux-swap file type * what will be "home " primary or extended? – emre Feb 25 '13 at 19:30
  • Home can be both:home can be primairy on a 2nd disc. Technically you can even put swap on a separate disc ... – Rinzwind Feb 25 '13 at 19:32

2 Answers2

6

There is no requirement for any order of your partitions.

Depending on the type of your hard drive, a partition on the logical start of your disk may be "quicker", because the positioning of read head is quicker here. On some other drives this may be true at the logical end of your disk. You have to benchmark your disk to detect the quickest area.

Historically, you have had the opportunity to gain some performance if you optimize your system this way a little bit.

With modern Solid State Drives this makes no sense any more.
And also on traditional Hard Disk Drives this makes no sense, if you are using LVM or RAID.

One additional note: If you use the modern GPT instead the MSDOS label, you don't have to think about primary and extended partitions.

 parted /dev/sdX mklabel gpt
  • Excellent. You can have the system find the best place with swapd but it requires you to recompile the kernel. – Rinzwind Feb 25 '13 at 19:33
  • @Rinzwind, huh? swapd is the kernel thread responsible for writing pages out to the swap device. It doesn't do any searching for the best place, but goes where you set up the swap partition. – psusi Feb 25 '13 at 22:58
  • Drives are still faster at the start, whether you are using lvm or raid or not. In fact, it used to be fairly common practice to set up raid arrays that intentionally ignored the latter, slower part of the drives. This was called destroking. Also it isn't a matter of positioning the read head, but the fact that due to geometry and the fact that the disk is spinning at a constant rpm, the outer tracks are passing under the head faster than the inner ones. – psusi Feb 25 '13 at 23:04
  • @psusi swapd can be used as a dynamic swapping daemon. http://cvs.linux.hr/swapd/ (like I said: it needs a recompile of the kernel ;) ) – Rinzwind Feb 26 '13 at 07:36
  • in my case, I put the Swap partition below Root partition because sometimes I need to change the size of the swap dynamically due to dynamic RAM changes on my system (using virtual machine). So, when Swap is at the end of the root, and I have some free space left to to extend to Swap size without touching the root partition (/) to avoid data lost. If you have swap in between, you cannot easily extend the swap size. You need to touch the root partition. That's the advantage. – MaXi32 Apr 07 '20 at 22:33
0

Typically , I have seen / as the first partition, but I guess it doesn't really matter.

BuZZ-dEE
  • 14,223
  • ok thanks can I ask something else..Will I have to use "extended partition" for swap or home..Do they definitely have to be separate partition don't they? root - primary and ext 4 * swap primary and linux-swap file type * what will be "home " primary or extended? – emre Feb 25 '13 at 19:24