Mailinglist Archive: opensuse-arm (74 mails)
| < Previous | Next > |
Re: [opensuse-arm] openSUSE on Beagleboard xM
- From: Arnd Bergmann <arnd@xxxxxxxx>
- Date: Fri, 24 Feb 2012 18:57:35 +0000
- Message-id: <201202241857.35246.arnd@arndb.de>
On Friday 24 February 2012, Alexander Graf wrote:
The C/H/S numbers reported by fdisk are mostly meaningless, they
are a fiction made up by the scsi host adapter driver (e.g. usb-storage)
and/or the partition layout and do not relate to the data on the device.
The start sector 2048 is the only thing that matters here to some tools.
The sdcard standard requires all devices to have a single FAT32 partition
starting at sector 8192, while some ancient (broken) versions of xloader
required the first partition to start at sector 63, which is what old
versions of fdisk used to do ms-dos compatibility.
With the two partition layouts above, the first one is halfway sensible,
because it actually fits the entire drive into the C/H/S layout with 122*
62*1017 blocks. The second one is not strictly valid in some tools because
larger than 1024 cylinders should only be used together with 255 heads
and 63 sectors on devices that have more than 8GB. For a 4GB card, the
most reliable layout would be 128 heads and 32 sectors, because that lets
you align the partitions to 4 MB while also allowing fdisk to detect
the layout (which it cannot do otherwise). This trick does not work for 8GB
cards though.
What I think we do in Linaro is to always force a 255*63*xxxx layout
when creating the partitions and aligning the partitions to 4MB but not
a cylinder boundary.
Arnd
--
To unsubscribe, e-mail: opensuse-arm+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-arm+owner@xxxxxxxxxxxx
But openSUSE MLO seems to work.
Maybe the problem comes from partitions?
When MLO does not start, fdisk tells:
***********************************************************
Disk /dev/sdb: 3941 MB, 3941597184 bytes
122 heads, 62 sectors/track, 1017 cylinders, total 7698432 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: 0xf6569bc1
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 309247 153600 83 Linux
/dev/sdb2 309248 1398783 544768 8e Linux LVM
***********************************************************
When MLO starts, fdisk tells:
***********************************************************
Disk /dev/sdb: 3941 MB, 3941597184 bytes
72 heads, 16 sectors/track, 6682 cylinders, total 7698432 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: 0xa2d775df
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 7698431 3848192 83 Linux
***********************************************************
So, heads, sectors and cylinders are different... Could it be a problem?
That is very likely, Marcus, Arnd, Peter, any ideas?
The C/H/S numbers reported by fdisk are mostly meaningless, they
are a fiction made up by the scsi host adapter driver (e.g. usb-storage)
and/or the partition layout and do not relate to the data on the device.
The start sector 2048 is the only thing that matters here to some tools.
The sdcard standard requires all devices to have a single FAT32 partition
starting at sector 8192, while some ancient (broken) versions of xloader
required the first partition to start at sector 63, which is what old
versions of fdisk used to do ms-dos compatibility.
With the two partition layouts above, the first one is halfway sensible,
because it actually fits the entire drive into the C/H/S layout with 122*
62*1017 blocks. The second one is not strictly valid in some tools because
larger than 1024 cylinders should only be used together with 255 heads
and 63 sectors on devices that have more than 8GB. For a 4GB card, the
most reliable layout would be 128 heads and 32 sectors, because that lets
you align the partitions to 4 MB while also allowing fdisk to detect
the layout (which it cannot do otherwise). This trick does not work for 8GB
cards though.
What I think we do in Linaro is to always force a 255*63*xxxx layout
when creating the partitions and aligning the partitions to 4MB but not
a cylinder boundary.
Arnd
--
To unsubscribe, e-mail: opensuse-arm+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-arm+owner@xxxxxxxxxxxx
| < Previous | Next > |