On Wed, Dec 8, 2010 at 1:07 PM, Guilherme Salgado salgado@canonical.com wrote:
On Tue, 2010-12-07 at 15:33 +0000, Dave Martin wrote:
Hi,
On Tue, Dec 7, 2010 at 3:10 PM, Robert Nelson robertcnelson@gmail.com wrote:
Hi Guilherme,
I know you found a workaround with fdisk so you're probably no longer using parted, but I was wondering if you were able to use parted to change the geometry in the partition table to 255heads/63sectors as the boot rom seems to require?
Actually with current x-loader/u-boot the 255heads/63sectors isn't a hard requirement anymore for the boot partition, so i've dropped it..
https://github.com/RobertCNelson/omap-image-builder/blob/master/tools/setup_...
So far tested on:
Beagle B6 (oldest still booting beagle i have, any boards before that had serial-ic overheating problems and eventually die under warrente.) Beagle C2 & C4 Beagle xM A2
with angstrom's: MLO-beagleboard-1.44+r16 & u-boot-beagleboard-2010.03+r65
Panda A1
with mlo/u-boot from: http://gitorious.org/pandaboard
So right now i use parted to create the second partition. We could drop fdisk for the first, if we could figure out how to make parted create a partition starting at the first cylinder.
For example, I've tried this and it doesn't boot:
parted --script ${MMC} mkpart primary fat16 0 64
I ask because I'm working on converting our script to python and it'd be nice if I could use python-parted for that, but it doesn't seem to be able to.
What about sfdisk? This is by far the simplest tool and works well for parts of linaro-media-create: by direct consequence of its simplicity it seems to be the most controllable and has the fewest unexpected limitations and failure modes among the tools I've played with, as well as being friendly to being program-driven. For manually generating an optimal partition layout for Beagles I've also found this the best tool to use.
sfdisk works indeed, but it'd be nicer if I could use a python library since I'm converting the whole script. The python-parted API is crap and undocumented, though, so I'll stick to running sfdisk in a subprocess.
Yeah, sure. Really, the best thing would to communitywise do would be to fix libparted to work with our use case (assmuing it can't do the right thing already of course). But I'm not very familiar with it, so I don't know what this would involve.
Certainly it's horrible to have to use a different partitioner to create each partition...
Yeah, I was not planning to do that, although we currently use parted to create a fresh partition table. It'd be nice if we could use sfdisk to do that, but I don't think we can?
sfdisk won't _just_ create an empty partition table if my understanding is correct.
But if you tell sfdisk to set up partitions on a device with no partition table it will set one up.
sfdisk doesn't appear to create a disk signature at offset 0x1B8 - it's left as-is. Some other partitioners, such as fdisk, set up an ID when creating an MBR-style partition table. We might decide not to care about that...
Cheers ---Dave