One would think that whatever we put on the hard drive - the BIOS should start and let us configure the system parameters. WRONG. With the new "Advanced Format" (the name (c)WDC) 4096 bytes sector technology it's no longer the truth. I tried two mobos (desktop dg33tl & a server one) with what one would name "properly aligned partitions" on WD20EARS - both ceased on booting, even entering the BIOS menu was impossible.
On one hand we want properly aligned partitions on our new tech drives: the write speed penalty for not doing so might be severe. It was 2 times slower in the quick tests I ran.
On the other hand the machine must boot, right?
A small investigation I conducted showed that the BIOS'es went wonky in particular on the first partition starting not on the "cylinder" boundary. Needless to say that those 255 heads and 63 sectors per track were artificial data these days. But saying so does not help.
Here is the solution I found. It seems to be a really good one, almost no compromises for Linux users and alike. Windows gurus will have to either utilise some GNU tools before installing their preferred environment, or be creative and use something else - please drop me a note shall you find another type of a workaround for this 4Ksector/BIOS issue.
1) Let's create the first partition that would please the BIOS. I adhere to basics, hence fdisk.
2) Then we are free to add whatever aligned partitioning we wanted. Let's start same fdisk but in the more natural sector based mode and not utilizing mystic DOS compatibility:
Below is what it gave on my drive after all calculations were done:
There was some simple math behind. Actually every partition except the first one starts on 1MiB boundary, or 2048 512-bytes sectors. That's actually today's commonly suggested practice, and it gives us alignment to 8 sectors naturally.
At the end of the day I've got BIOS that was booting happily. The first partition was not aligned to 4K sectors, but I would not care less. Because I am using it for /boot only, thus not performing much writes on it. Reading speed was still Ok, I assume due to the internal disk cache. Other partitions are all aligned well and very little of the disk space wasted.
Make sure that while formatting your partitions you use appropriate block sizes for the file system. In my case I did the following:
mkfs -t ext3 /dev/sdX1
- it's not aligned anyhow, let ext3 utility use the best at its discretion;
- here we definitely want 4096 bytes blocks to be utilized.
For the sake of completeness I must mention that the "solution" to the 4K partitions alignment being proposed widely on the Net:
- did not work for me. Not sure I am in a mood now to dig further why was that.
For the astute mind readers: there is the -b option supported by fdisk. Most probably it will work for you... once your HDD reports its physical sector size correctly.
The 4K HDD sector issues and complications are
PS. Shall you find this article talking about the things you need but not giving you the recipe you were looking for - do not hesitate and drop me a note, I'll try to be more specific then.