When to partition the hard drive?
No real advantages.
If you only have one drive you do not even get a choice. You have to have something to install the OS to, and for windows that is a partition.
(For completeness sake: For almost any OS that will be a partition, though you could tell BSds etc to use the raw drive in dangerously dedicated mode. And I would not be surprised if QNX, GNU/Linux etc also supported this).
Having said that:
- Why do you even think it would influence the lifetime of a harddisk?
- Regardless of pre-OS install partitioning or post-OS install partitioning, you almost certainly want a second disk or a second partion for data. (e.g. to store
/usr/local
and/home
, or in windowsMy documents/
The big reason it's better to have a strong partition plan at install time instead of messing with it dynamically once your OS is installed is usually a matter of data preservation. Many utilities will let you truncate a partition that has data in it, which can leave the drive in a corrupted state and require reinstallation of the OS or any applications which lost files due to the change. That's the extent, however; the HDD or SSD doesn't suffer abnormal aging or stress by doing partition changes.
Mostly, it doesn't matter.
One exception is when installing legacy operating systems on modern drives.
Old OS installers tended to align partitions on "cylinder" boundaries. In particular, starting the first partition at the start of "cylinder" 1 (sector 0 was reserved for boot code and the partition table).
Modern drives would typically be viewed by the OS as having 255 "sectors" per "track" and "63" heads. So each "cylinder" would have 16065 sectors.
This was fine until "advanced format" drives came along. These drives have a physical sector size of 4KiB but a logical sector size of 512 bytes. They work much better if reads and writes (especially writes) are a multiple of 4KiB in size and aligned on a 4KiB (8 logical sectors) boundary. Unaligned writes will translate to a read-modify-write operation which risks data loss.
The result of this is if you are using an "advanced format" drive, you really want your partitions to start on a 4KiB (8 logical sectors) boundary.
You will notice that 16065 is not divisible by 8. So using an old OS tool to partition a modern drive is highly likely to result in misalignment.