Obscurious
May 8th, 2013, 10:45 PM
I need the starting offset of my partitions to be a multiple of 8. Is there a way to set this alignment during the installation process of Ubuntu Server 12.04? I have been looking into passing a boot parameter to partman but was wondering if there was a better way to do this?
Here is an example of a misaligned machine:
# fdisk -lu
Disk /dev/sda: 34.4 GB, 34359738368 bytes
255 heads, 63 sectors/track, 4177 cylinders, total 67108864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xrrrrrrrrr
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 67106815 33302529 5 Extended
/dev/sda5 501760 67106815 33302528 8e Linux LVM
Thus you can see that /dev/sda2 is the misaligned partition since 501758 is not divisible by 8. I set this installation up by selecting "use entire disk" during the partition section at installation. Is there a better option at installation time that will automatically align the partitions?
Note: I have been abstracting the system as a whole to keep things simple. Let me know if it would help to know the details of the rest of the system (cluster); it has many layers.
Here is an example of a misaligned machine:
# fdisk -lu
Disk /dev/sda: 34.4 GB, 34359738368 bytes
255 heads, 63 sectors/track, 4177 cylinders, total 67108864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xrrrrrrrrr
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 67106815 33302529 5 Extended
/dev/sda5 501760 67106815 33302528 8e Linux LVM
Thus you can see that /dev/sda2 is the misaligned partition since 501758 is not divisible by 8. I set this installation up by selecting "use entire disk" during the partition section at installation. Is there a better option at installation time that will automatically align the partitions?
Note: I have been abstracting the system as a whole to keep things simple. Let me know if it would help to know the details of the rest of the system (cluster); it has many layers.