- Package:
- src:parted
- Source:
- parted
- Submitter:
- Steve Langasek
- Date:
- 2015-03-17 00:00:52 UTC
- Severity:
- important
If I create a partition that is one cylinder in length, parted fails with its gratuitous "Unable to satisfy all constraints on the partition" error. Presumably this is an off-by-one problem? The alpha port of debian-installer needs to be able to reserve a minimal amount of disk space at the front of the boot disk for a bootloader, which means partman must be able to handle partitions of this size. Even a one-cylinder partition leaves a lot of space unused, so a two-cylinder partition is vast overkill.
Ok, correction: the problem actually seems to be that parted can't handle partitions that start at sector 0, but this is precisely where one would expect the partition to start on a BSD disklabel. After changing the constraint to use 0 as a start point instead of 1, parted then complains that this overlaps with the metadata (partition # -1), which has a start and end of 0. Considering my boot disk appears to have sectors of 32 bytes, and the offset of the actual disk label is 64 bytes, it doesn't seem to make much sense to regard this as an overlap. However, since I now know I can route around this bit of funkiness by starting my boot partition on sector 1 instead of sector 0 (where fdisk will put it by default), I'll see if I can't come up with a workable solution for d-i this way. Thanks,
Well, this is a MBR based partition table, isn't it ? the metadata is the sector who contains the partition table, and you can't put a partition table there, obviously. Friendly, Sven Luther
In this particular case, the partition I'm creating is a dummy partition, to reserve a small amount of space for aboot. This is on an alpha, using BSD disklabels; it certainly doesn't have the concept of an MBR here, and even though I am overlapping the actual disklabel, this doesn't matter since the bootloader config tools know how to handle disklabels on their own. In general, parted is much less forgiving of disklabels than the rest of the world -- on Tru64, in fact, it's quite common to have a partition configured as "whole disk", i.e., overlapping all other partitions. Of course, the Alpha bootloader installer can't handle such a configuration either, so this is of minor consequence.
Yeah, a BSD then, still the BSD disk label is marked as metadata, and you can't reuse it. I am not entirely sure what to do here, do you have some suggestion ? Can you also tell me exactly how do you want to set the aboot space in the cylinder containing also the partition table ? The layout of it i mean. Also, maybe it would be a good idea to not 'hide' the metadata partition like it is done now, but i doubt this would be a easy fix. Friendly, Sven Luther
Well, for creating new partitions in d-i, we should be ok; this partition's only purpose in life is to prevent *other* partitions from being created at the front of the disk, so if there's a space at the front that is already protected by parted itself, this is perfectly ok. So this bug only affects the fact that d-i can't read existing BSD disklabels on systems that may have had other OSes installed on them, OSes that do allow things like partitions that overlap the disklabel. I'm not sure how big a problem this is; it probably warrants keeping this report open, IMHO, but downgrading it from "important".