Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I know a similar question has been made already (http://askubuntu.com/questions/35303/linux-swap-partition-is-in-extended-drive) but I have a similar problem with a partition alignment warning.

I installed Ubuntu 10.04 on a 640 GB disk using the full-disk/auto-partitioning option. Ubiquity created the following schema:

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       76353   613297152   83  Linux
/dev/sda2           76353       77826    11832321    5  Esteso
Partition 2 does not start on physical sector boundary.
/dev/sda5           76353       77826    11832320   82  Linux swap / Solaris

as you can see from the fdisk output, second partition (extended) is misaligned with the physical sector boundary. Disk Manager says: "WARNING: the partition is misaligned by 1024 bytes. This may result in very poor performance. Repartitioning is suggested".

Question 1a: why is the swap partition (sda5) inside the extended one (sda2)? 1b) Is it necessary?

Question 2: removing both sda5 and sda2, and subsequently create a new swap partition, will solve the alignment problem?

Thank you. Dave

share|improve this question
    
Can you edit your answer to show the full output of fdisk -lu? –  psusi Dec 29 '11 at 15:52
add comment

1 Answer

Placing the swap partition inside an extended partition is not necessary, it is just something that the installer always does. Yes, you can remove both the swap partition and the extended partition that contains it and recreate the swap partition as a primary partition. This probably will result in a properly aligned partition.

share|improve this answer
    
After removing sda5 and sda2 I create again the swap partition as primary. Now sda5 is misaligned by 3584 bytes :-/ –  David Dec 29 '11 at 20:12
    
By the way, since the PC mount 4 GB RAM, there has been no access to swap area since I bought it... so I suppose I don't have to worry to much about performance issue due to swap misalignment. Do I ? –  David Dec 29 '11 at 20:19
    
@David, if you deleted sda5, it can't be misaligned. –  psusi Dec 30 '11 at 2:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.