On Thu, Jul 9, 2009 at 12:59 PM, Colin Watson<cjwat...@debian.org> wrote: >> Since partman is tightly connected with libparted, what is the >> best way to keep track of UBI devices and volumes? I.e. >> a) should partman be made to understand MTD and UBI, or >> b) is it better to keep all of this outside parted (and let the >> shell scripts create device and id related directories and files), >> or >> c) should parted_server be altered to understand and handle >> MTD and UBI? > > If in a) you meant "should parted be made ...", then I think that's > clearly the best option. Trying to get partman to handle things that > parted doesn't is problematic at various layers and best avoided. > >> When creating a loop label, it seems parted writes this to >> the device. This is not really what I want. Connecting to the >> questions above, is it possible to use the infrastructure given >> by partman/parted_server but without any of it being written >> to device. > > Not to my knowledge; you'd be best advised to arrange for libparted to > be smart enough not to do this for UBI devices, I think.
Concerning the above answers and personal correspondence with Wookey, I aim at the following procedure. * Recognize device (do we know partition scheme, proceed only if so) + Read partition table? + Otherwise? + Stop if device is not recognized, since continuing would probably be fatal. * List MTD + Make parted understand (thus report) MTD properly? * Attach MTD to UBI + Prepare - Create device files indicating it should be formatted and attached to UBI upon commit. + Commit - Format selected MTD - Attach selected MTD to UBI - Create loop label with one big partition (don't write label to MTD). - Set partition flag ubi. * Create UBI volumes + Use mtd-utils here. + Create user interface (similar to LVM/MD). * List UBI volumes + Make parted understand UBI (add ability to read UBI volume tables), alternatively, + create similar scheme as LVM (loop through LVs and add to a loop label). The former seems preferable. * Use UBI volume + Select as mountpoint basically. For now I am leaving the "Recognize device" step for later. If any suggestions or comments exist, please submit them. :-) -- Per -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org