partitioning using mb boundaries

Bug #521045 reported by Ralph Ulrich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GParted
New
Undecided
Unassigned
Ubuntu Manual
Invalid
Undecided
Unassigned
parted (Debian)
Fix Released
Unknown
parted (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Lucid by Ralph Ulrich
partman-auto (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Lucid by Ralph Ulrich

Bug Description

Binary package hint: partman-auto

I would like to give people a try using ubuntu
but I fear to setup some trouble for them if they use win7.
This isssue is described here:
https://answers.launchpad.net/ubuntu/+source/gparted/+question/99298
It is a MS related partitioning bug.

To get around there are 3 ways possible:

C) Most easily: You typically purchased a notebook where there are 3 primary partitions. Ubuntu Release Notes should mention that in case of dual boot you should only create one primary root partition not any more ! (no swap, no home, no further extended)

B) A more sophisticated approach: Since Vista Windows needs a megabyte free space just in front of every first primary partition and a megabyte free space in front of every first logical partition in every extended partition. Partition your disk accordingly or give Windows7 Partitioniong Tool a try to configure your harddisk appropriet for a linux install (more easy?)

C) Feature request: make linux partitioning tools feature a windows7 compatible mode.

Revision history for this message
Ralph Ulrich (eulenreich) wrote :

Please add attention to this horrible Ms bug which will crackdown the linux image seen by potential new users having Win7/Vista installed.

If you are able to follow german language discussion have a look at:
http://sidux.com/index.php?name=PNphpBB2&file=viewtopic&t=19795
for more users bad experiences...

Revision history for this message
Ralph Ulrich (eulenreich) wrote :

Debian bug of this is closed:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569998
because of libparted-2.1

Revision history for this message
Ralph Ulrich (eulenreich) wrote :

... I don't know how to get attention from ubuntu developers to this release critical issue...

Revision history for this message
Colin Watson (cjwatson) wrote :

Thank you, I am aware of this issue. There are multiple other bugs to be solved first, chiefly getting parted 2.1 into lucid.

Revision history for this message
Ralph Ulrich (eulenreich) wrote :

Thank you Colin, I aspect this is discussed further at https://bugs.launchpad.net/ubuntu/+source/parted/+bug/511075

Revision history for this message
Anzenketh (anzenketh) wrote :

Added link for Debian upstream.

Revision history for this message
Ralph Ulrich (eulenreich) wrote :

new libparted-2.2 should have solved the issue - so no extra compatibility warning in regard to Win7 is needed any more

Changed in ubuntu-manual:
status: New → Invalid
Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 521045] Re: partitioning using mb boundaries

Sort of. It still needs a change in partman to apply optimal alignment
constraints, although this is definitely going to happen for lucid.

Revision history for this message
Ralph Ulrich (eulenreich) wrote :
Download full text (4.0 KiB)

Scary different outputs on a mac mini

I have tried to align my many partition beyond the 4. partition.
But the following outputs scares me for they are totally different:
1. First Gpt fdisk from sf.net finds more available sectors
than ubuntu lucid fdisk which is powered by parted-2.2
2. fdisk -L / -G options output different sectors,
but identical Block/Size - why ?

-----------------------------------
# gptgdisk -L -l -u /dev/sda
GPT fdisk (gdisk) version 0.6.4

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.
Disk /dev/sda: 625142448 sectors, 298.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 54D72D0F-0FF8-4E0F-B995-E2B42D94F61B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 625142414
Total free space is 2354909 sectors (1.1 GiB)

Number Start (sector) End (sector) Size Code Name
   1 40 409639 200.0 MiB EF00 EFI System Partition
   2 409640 104600047 49.7 GiB AF00 Apple HFS/HFS+
   3 104862192 209052599 49.7 GiB 8301 Linux Reserved
   4 209551360 243105791 16.0 GiB 8301
   5 243367936 263208959 9.5 GiB 8200 Linux swap
   6 263208960 394813439 62.8 GiB 8301 Linux reserved
   7 395075584 427714559 15.6 GiB 8301 Linux reserved
   8 427976704 460615679 15.6 GiB 8301 Linux reserved
   9 460877824 493516799 15.6 GiB 8301 Linux reserved
  10 493778944 559319039 31.3 GiB 8301 Linux reserved
  11 559581184 625121279 31.3 GiB 0700 Linux/Windows data
-------------------------------------
# fdisk -L -l -u /dev/sda
GNU Fdisk 1.2.4
Copyright (C) ....

Disk /dev/sda: 320 GB, 320070320640 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625137345 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 * 40 409639 208813 83 Linux
Warning: Partition 1 does not end on cylinder boundary.
/dev/sda2 409640 104600047 52098795 83 Linux
Warning: Partition 2 does not end on cylinder boundary.
/dev/sda3 104862192 209052599 52090762 83 Linux
Warning: Partition 3 does not end on cylinder boundary.
/dev/sda4 209551360 243105791 16779892 83 Linux
Warning: Partition 4 does not end on cylinder boundary.
/dev/sda5 243367936 263208959 9920137 82 Linux Swap / Solaris
/dev/sda6 263208960 394813439 65794207 83 Linux
/dev/sda7 395075584 427714559 16314007 83 Linux
/dev/sda8 427976704 460615679 16314007 83 Linux
/dev/sda9 460877824 493516799 16314007 83 Linux
/dev/sda10 493778944 559319039 32764567 83 Linux
/dev/sda11 559581184 625121279 32764567 83 Linux
-------------------------------------
# fdisk -G -l -u /dev/sda
GNU Fdisk 1.2.4
Copyright (C) ....

Disk /dev/sda: 320 GB, 320070320640 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625137345 sectors
Unit...

Read more...

Revision history for this message
Ralph Ulrich (eulenreich) wrote :

A new idea for partitioning a new disk Megebyte aligned.
Using a different CHS config to get MiB alignments:

Now it is
1 cylinder = 255 heads * 63 sectors * 512 bytes

If you change fdisk config to
1 cylinder = 32 head * 64 sectors * 512 bytes
this should align a partition for parallel us with Win7 ?

I don't trust my idea for I don't know if something can go wrong
using different CHS values...
What is CHS good for, we are using LBA anyway. Is CHS just a software calculation with no hardware implications?

Revision history for this message
RachaelB (8-launchpad-rlb-me) wrote : Re: [Ubuntu-manual] [Bug 521045] Re: partitioning using mb boundaries
Download full text (3.4 KiB)

How complicated an answer do you want to this question?

The default Linux geometry is 255 heads with 63 sectors per track.

Windows 7 uses a geometry of 240 heads with 63 sectors per track to accommodate solid state drives.

According to Ted Tso the ideal geometry (which I use) is 224 heads with 56 sectors per track since for a solid state drive to work efficiently the partitions need to be aligned on 128k boundaries.

It should also be noted that the start of the first partition (or the start of data within it) should be offset to 1024k to take account mis-allignment due to the MBR.

This is all vital for correct functioning of solid state drives :)

Please also note my launchpad bug #415888. Using ext4 for installation on a solid state drive will cause the install to fail or not work correctly if the drive has an indilinx controller (most do). I think this is because indilinx is not 100% sata compliant. So its best in these circumstances to install using ext3.

Rachael
-----Original Message-----
From: Ralph Ulrich <email address hidden>
Date: Wed, 17 Mar 2010 18:39:00
To: <email address hidden>
Subject: [Ubuntu-manual] [Bug 521045] Re: partitioning using mb boundaries

A new idea for partitioning a new disk Megebyte aligned.
Using a different CHS config to get MiB alignments:

Now it is
1 cylinder = 255 heads * 63 sectors * 512 bytes

If you change fdisk config to
1 cylinder = 32 head * 64 sectors * 512 bytes
this should align a partition for parallel us with Win7 ?

I don't trust my idea for I don't know if something can go wrong
using different CHS values...
What is CHS good for, we are using LBA anyway. Is CHS just a software calculation with no hardware implications?

--
partitioning using mb boundaries
https://bugs.launchpad.net/bugs/521045
You received this bug notification because you are a member of Ubuntu
Manual Team, which is subscribed to Ubuntu Manual.

Status in Gnome Partition Editor: New
Status in Ubuntu Manual: Invalid
Status in “parted” package in Ubuntu: New
Status in “partman-auto” package in Ubuntu: New
Status in “parted” package in Debian: Unknown

Bug description:
Binary package hint: partman-auto

I would like to give people a try using ubuntu
but I fear to setup some trouble for them if they use win7.
This isssue is described here:
https://answers.launchpad.net/ubuntu/+source/gparted/+question/99298
It is a MS related partitioning bug.

To get around there are 3 ways possible:

C) Most easily: You typically purchased a notebook where there are 3 primary partitions. Ubuntu Release Notes should mention that in case of dual boot you should only create one primary root partition not any more ! (no swap, no home, no further extended)

B) A more sophisticated approach: Since Vista Windows needs a megabyte free space just in front of every first primary partition and a megabyte free space in front of every first logical partition in every extended partition. Partition your disk accordingly or give Windows7 Partitioniong Tool a try to configure your harddisk appropriet for a linux install (more easy?)

C) Feature request: make linux partitioning tools feature a windows7 compatible mode.
...

Read more...

Revision history for this message
RachaelB (8-launchpad-rlb-me) wrote :

Also forgot to mention lol...

If you're using logical volumes on a solid state drive the default space allocated for metadata is 192k which breaks the 128k multiple rule. So the metadata size needs to be defined as 256k using (bizarrely) the command "metadatasize=250k".

Finally, although I don't really think this makes much difference, the RAID stripe-width should be set to 32.

Rachael
-----Original Message-----
From: Ralph Ulrich <email address hidden>
Date: Wed, 17 Mar 2010 18:39:00
To: <email address hidden>
Subject: [Ubuntu-manual] [Bug 521045] Re: partitioning using mb boundaries

A new idea for partitioning a new disk Megebyte aligned.
Using a different CHS config to get MiB alignments:

Now it is
1 cylinder = 255 heads * 63 sectors * 512 bytes

If you change fdisk config to
1 cylinder = 32 head * 64 sectors * 512 bytes
this should align a partition for parallel us with Win7 ?

I don't trust my idea for I don't know if something can go wrong
using different CHS values...
What is CHS good for, we are using LBA anyway. Is CHS just a software calculation with no hardware implications?

--
partitioning using mb boundaries
https://bugs.launchpad.net/bugs/521045
You received this bug notification because you are a member of Ubuntu
Manual Team, which is subscribed to Ubuntu Manual.

Status in Gnome Partition Editor: New
Status in Ubuntu Manual: Invalid
Status in “parted” package in Ubuntu: New
Status in “partman-auto” package in Ubuntu: New
Status in “parted” package in Debian: Unknown

Bug description:
Binary package hint: partman-auto

I would like to give people a try using ubuntu
but I fear to setup some trouble for them if they use win7.
This isssue is described here:
https://answers.launchpad.net/ubuntu/+source/gparted/+question/99298
It is a MS related partitioning bug.

To get around there are 3 ways possible:

C) Most easily: You typically purchased a notebook where there are 3 primary partitions. Ubuntu Release Notes should mention that in case of dual boot you should only create one primary root partition not any more ! (no swap, no home, no further extended)

B) A more sophisticated approach: Since Vista Windows needs a megabyte free space just in front of every first primary partition and a megabyte free space in front of every first logical partition in every extended partition. Partition your disk accordingly or give Windows7 Partitioniong Tool a try to configure your harddisk appropriet for a linux install (more easy?)

C) Feature request: make linux partitioning tools feature a windows7 compatible mode.

_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-manual
Post to : <email address hidden>
Unsubscribe : https://launchpad.net/~ubuntu-manual
More help : https://help.launchpad.net/ListHelp

Revision history for this message
Ralph Ulrich (eulenreich) wrote :

Rachael wrote:
> Windows 7 uses a geometry of 240 heads with 63 sectors per track to accommodate solid state drives.

that is
240 * 63 * 512 = 7 MiB
alignment.
I heard about Win7 aligning at 1 MiB.

Revision history for this message
Ralph Ulrich (eulenreich) wrote :

Got it wrong...
240 * 63 * 512.0 / (1024 * 1024) = 7.3828125 MiB = 7560.0 KiB

Revision history for this message
RachaelB (8-launchpad-rlb-me) wrote :

That geometry was reported by fdisk following my own clean win7 install
-----Original Message-----
From: Ralph Ulrich <email address hidden>
Date: Wed, 17 Mar 2010 21:44:22
To: <email address hidden>
Subject: [Ubuntu-manual] [Bug 521045] Re: partitioning using mb boundaries

Rachael wrote:
> Windows 7 uses a geometry of 240 heads with 63 sectors per track to accommodate solid state drives.

that is
240 * 63 * 512 = 7 MiB
alignment.
I heard about Win7 aligning at 1 MiB.

--
partitioning using mb boundaries
https://bugs.launchpad.net/bugs/521045
You received this bug notification because you are a member of Ubuntu
Manual Team, which is subscribed to Ubuntu Manual.

Status in Gnome Partition Editor: New
Status in Ubuntu Manual: Invalid
Status in “parted” package in Ubuntu: New
Status in “partman-auto” package in Ubuntu: New
Status in “parted” package in Debian: Unknown

Bug description:
Binary package hint: partman-auto

I would like to give people a try using ubuntu
but I fear to setup some trouble for them if they use win7.
This isssue is described here:
https://answers.launchpad.net/ubuntu/+source/gparted/+question/99298
It is a MS related partitioning bug.

To get around there are 3 ways possible:

C) Most easily: You typically purchased a notebook where there are 3 primary partitions. Ubuntu Release Notes should mention that in case of dual boot you should only create one primary root partition not any more ! (no swap, no home, no further extended)

B) A more sophisticated approach: Since Vista Windows needs a megabyte free space just in front of every first primary partition and a megabyte free space in front of every first logical partition in every extended partition. Partition your disk accordingly or give Windows7 Partitioniong Tool a try to configure your harddisk appropriet for a linux install (more easy?)

C) Feature request: make linux partitioning tools feature a windows7 compatible mode.

_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-manual
Post to : <email address hidden>
Unsubscribe : https://launchpad.net/~ubuntu-manual
More help : https://help.launchpad.net/ListHelp

Revision history for this message
Colin Watson (cjwatson) wrote :

Unless more specific information from the disk is available, we should be aligning to 1MiB boundaries by default in Lucid now, as of last night. I can't speak for gparted which may well get things wrong, but the installer should get this right now.

Revision history for this message
Ralph Ulrich (eulenreich) wrote :

1MiB boundaries are optimal for they also align with 128KiB and 256KiB which could be used in solid disk hardware.

Now how to do this using fdisk:
My thought of using of 32 heads and 64 sectors per cylinder doesn't work for older fdisk versions (openSUSE11.2).
Let's try the other way round:
"fdisk -L -H 64 -S 32 /dev/sdb"
I did create an new empty DOS partition table with "o". And I started the first partition at cylinder 2
This looks like:
----------------------
root@maci:/etc# fdisk -L -l /dev/sdb
GNU Fdisk 1.2.4
....
Disk /dev/sdb: 4 GB, 4127195136 bytes
64 heads, 32 sectors/track, 3936 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 2 935 957408 c FAT32 LBA
/dev/sdb2 * 936 3936 3072000 83 Linux
----------------------
Now showing with sector numbers:
----------------------
root@maci:/etc# fdisk -L -l -u /dev/sdb
GNU Fdisk 1.2.4
....
Disk /dev/sdb: 4 GB, 4127195136 bytes
64 heads, 32 sectors/track, 3936 cylinders, total 8060928 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 2048 1914879 957408 c FAT32 LBA
/dev/sdb2 * 1914880 8060927 3072000 83 Linux
----------------------
I think such a restriction when partitioning should be totally compatible with Vista/Win7 and should be performant using any of the solid state disks. ... But I don't know how to consider an offset of -1 of some of those disks :(

Revision history for this message
Ralph Ulrich (eulenreich) wrote :

And a question regarding above usage of fdisk:
It seems to me that numbering of:
sectors begin with 0 , but cylinders begin with 1 count ?

Changed in parted (Debian):
status: Unknown → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

Closing to match Debian, since we're more or less in sync. As for fdisk, well, fdisk is not parted so problems with it should be filed separately; but it looks like you've got it to work. fdisk is somewhat lower-level so I'm not surprised at it requiring a little more manual input.

Changed in parted (Ubuntu):
status: New → Fix Released
Changed in partman-auto (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.