Discussion:
partition does not start on physical sector boundary
(too old to reply)
Adam
2014-12-31 01:32:18 UTC
Permalink
To backup my laptop HDD, I cloned it...
http://www.howtogeek.com/howto/19141/clone-a-hard-drive-using-an-ubuntu-live-cd/

However, the new "Advanced Format" HDD now shows this problem...
http://askubuntu.com/questions/156994/partition-does-not-start-on-physical-sector-boundary
due to 4096-byte sector alignment.

How best to fix/calculate how much to move the partition using GParted?


Output before and after cloning...
====================================================
***@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000768a5

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20481851 83 Linux
/dev/sda2 12661 60802 386695110 5 Extended
/dev/sda5 59829 60802 7813120 82 Linux swap / Solaris
/dev/sda6 12661 58554 368643523+ 83 Linux

Partition table entries are not in disk order

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table
***@ubuntu:~$ sudo dd if=/dev/sda of=/dev/sdb
976773168+0 records in
976773168+0 records out
500107862016 bytes (500 GB) copied, 10790 s, 46.3 MB/s
***@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000768a5

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20481851 83 Linux
/dev/sda2 12661 60802 386695110 5 Extended
/dev/sda5 59829 60802 7813120 82 Linux swap / Solaris
/dev/sda6 12661 58554 368643523+ 83 Linux

Partition table entries are not in disk order

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000768a5

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 2550 20481851 83 Linux
/dev/sdb2 12661 60802 386695110 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sdb5 59829 60802 7813120 82 Linux swap / Solaris
/dev/sdb6 12661 58554 368643523+ 83 Linux
Partition 6 does not start on physical sector boundary.

Partition table entries are not in disk order
***@ubuntu:~$
blind Pete
2015-01-01 10:01:37 UTC
Permalink
Post by Adam
To backup my laptop HDD, I cloned it...
http://www.howtogeek.com/howto/19141/clone-a-hard-drive-using-an-ubuntu-live-cd/
However, the new "Advanced Format" HDD now shows this problem...
http://askubuntu.com/questions/156994/partition-does-not-start-on-physical-sector-boundary
due to 4096-byte sector alignment.
How best to fix/calculate how much to move the partition using GParted?
[snip]

Backup important data before you think about moving partitions.

Boot from a live CD or another partition on the same hard drive.
Check that the partition that you want to change is not mounted.
Start GParted. Read all of the menu options.
--
blind Pete
Sig goes here...
Adam
2015-01-02 00:54:47 UTC
Permalink
The following excellent article...

Linux on 4 KB sector disks: Practical advice
http://www.ibm.com/developerworks/library/l-linux-on-4kb-sector-disks/index.html

explains the performance penalty of unaligned primary/logical partitions.

Advanced Format HDDs perform best when
primary/logical partitions are properly aligned on 4096-byte sectors.

Use GParted to bring up a partition's "Information" dialog box to
learn what its start and end sectors are in absolute terms.

start sector number is a multiple of 8 => "aligned" primary/logical
partition

Loading...