coreos/scripts — pull request #147 by marineam (2013-12-24 00:58:51+00:00)
Title: RFC: new approach to disk/partition handling, disk_util

Note: includes one unrelated commit from https://github.com/coreos/scripts/pull/145

For now I'm just posting this for comment, this change isn't quite complete as it doesn't actually replace/delete all of the obsoleted code yet. I'm also pondering if there is any functionality that should be pushed into 'cgpt' itself. It may make sense to try to share some code between builds and mouning/resizing filesystems in the initrd. Thought? I also need to not extend the scope of this cleanup too much since I want be able to build bootable /usr images before everyone returns in January.

This renames cgpt.py to disk_util and reworks it with the goal of replacing disk related manipulation in:

build_library/base_image_util.sh
build_library/disk_layout_util.sh
build_library/mount_gpt_util.sh
mount_gpt_image.sh
.../mount_image.sh
.../umount_image.sh

And eventually parts of:

build_library/vm_image_util.sh
.../pack_partitions.sh
.../unpack_partitions.sh

The most interesting changes is the addition of `disk_util format` and `disk_util mount` commands which make filesystem types and mount locations defined in the partition layout config file to make it more practical to support building both the current and /usr layouts during the transition. This PR does not include moving to those new commands yet, but I wanted to get something posted before wrapping up work today.