diskimage-builder/diskimage_builder/elements
Ian Wienand 6c394f5746 Pass all blockdevices to bootloader
Currently we only export "image-block-device" which is the loopback
device (/dev/loopX) for the underlying image.  This is the device we
install grub to (from inside the chroot ...)

This is ok for x86, but is insufficient for some platforms like PPC
which have a separate boot partition.  They do not want to install to
the loop device, but do things like dd special ELF files into special
boot partitions.

The first problem seems to be that in level1/partitioning.py we have a
whole bunch of different paths that either call partprobe on the loop
device, or kpartx.  We have _all_part_devices_exist() that gates the
kpartx for unknown reasons.  We have detach_loopback() that does not
seem to remove losetup created devices.  I don't think this does
cleanup if it uses kpartx correctly.  It is extremley unclear what's
going to be mapped where.

This moves to us *only* using kpartx to map the partitions of the loop
device.  We will *not* call partprobe and create the /dev/loopXpN
devices and will only have the devicemapper nodes kpartx creates.
This seems to be best.  Cleanup happens inside partitioning.py.
practice.  Deeper thinking about this, and more cleanup of the
variables will be welcome.

This adds "image-block-devices" (note the extra "s") which exports all
the block devices with name and path.  This is in a string format that
can be eval'd to an array (you can't export arrays).

This is then used in a follow-on
(I0918e8df8797d6dbabf7af618989ab7f79ee9580) to pick the right
partition on PPC.

Change-Id: If8e33106b4104da2d56d7941ce96ffcb014907bc
2017-06-08 17:14:22 +10:00
..
apt-conf Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
apt-preferences Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
apt-sources Release 1.25.2 2017-02-02 11:20:00 +11:00
architecture-emulation-binaries Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
baremetal Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
base Drop support for Ubuntu precise 2017-05-31 14:36:30 +02:00
bootloader Pass all blockdevices to bootloader 2017-06-08 17:14:22 +10:00
cache-url Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
centos Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
centos7 Merge "Run dib-run-parts out of /tmp" 2017-04-05 10:18:55 +00:00
centos-minimal Release 1.27.0 2017-02-03 11:49:45 +11:00
cleanup-kernel-initrd Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
cloud-init Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
cloud-init-datasources Drop support for Ubuntu precise 2017-05-31 14:36:30 +02:00
cloud-init-disable-resizefs Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
cloud-init-nocloud Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
debian Unify and fix doc of several Debian and Ubuntu elements 2017-04-07 05:56:50 +00:00
debian-minimal Switch debian to deb.debian.org 2017-05-19 20:10:40 +00:00
debian-systemd Semi-automatic doc generation of element dependency 2017-02-09 09:50:30 +11:00
debian-upstart Semi-automatic doc generation of element dependency 2017-02-09 09:50:30 +11:00
debootstrap Drop support for Ubuntu precise 2017-05-31 14:36:30 +02:00
deploy-baremetal Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
deploy-kexec Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
deploy-targetcli Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
deploy-tgtadm Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
devuser Release 1.25.2 2017-02-02 11:20:00 +11:00
dhcp-all-interfaces Merge "Trivial fix typos" 2017-06-05 05:54:50 +00:00
dib-init-system Fix dib-init-system for Debian Jessie and Debian Stretch 2017-03-11 14:04:13 +00:00
dib-python Drop support for Ubuntu precise 2017-05-31 14:36:30 +02:00
dib-run-parts Trivial fix typos 2017-05-31 11:17:05 +07:00
disable-selinux/post-install.d Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
dkms Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
docker Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
dpkg Semi-automatic doc generation of element dependency 2017-02-09 09:50:30 +11:00
dracut-network Remove dracut-network element 2017-05-31 08:36:56 +10:00
dracut-ramdisk drop deprecated map-services/packages from zypper element 2017-05-25 23:43:21 +02:00
dracut-regenerate Decode string to bytes in dracut-regenerate 2017-05-30 16:15:06 +01:00
dynamic-login Release 1.25.2 2017-02-02 11:20:00 +11:00
element-manifest Release 1.24.0 2017-01-31 14:14:19 +11:00
enable-serial-console Release 1.25.2 2017-02-02 11:20:00 +11:00
epel Add yum-utils as EPEL dependency 2017-04-20 17:01:00 -04:00
fedora Trivial fix typos 2017-05-31 11:17:05 +07:00
fedora-minimal Trivial fix typos 2017-05-31 11:17:05 +07:00
gentoo allow uninstalls to fail on gentoo 2017-05-29 23:46:42 -05:00
growroot Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
grub2 Fix #1627402: fix grub2 element for ubuntu xenial 2017-02-11 18:44:18 +00:00
hpdsa Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
hwburnin Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
hwdiscovery Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ilo Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
install-bin Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
install-static Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
install-types Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ironic-agent Trivial fix typos 2017-05-31 11:17:05 +07:00
iso Trivial fix typos 2017-05-31 11:17:05 +07:00
local-config Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
manifests Set manifest permissions in the image 2017-05-24 15:20:55 +10:00
mellanox Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
modprobe-blacklist Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
no-final-image Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
oat-client Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
openssh-server Release 1.21.1 2017-02-02 20:36:23 +11:00
opensuse Test openSUSE 42.2/42.3 image builds 2017-05-30 13:07:04 +02:00
opensuse-minimal Test openSUSE 42.2/42.3 image builds 2017-05-30 13:07:04 +02:00
package-installs Fix package-installs-v2 output 2017-04-07 13:48:53 +10:00
pip-and-virtualenv Merge "Trivial fix typos" 2017-06-05 05:54:50 +00:00
pip-cache Release 1.25.2 2017-02-02 11:20:00 +11:00
pkg-map Trivial fix typos 2017-05-31 11:17:05 +07:00
posix Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
proliant-tools Release 1.27.0 2017-02-03 11:49:45 +11:00
pypi Release 1.27.0 2017-02-03 11:49:45 +11:00
python-brickclient Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
ramdisk Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ramdisk-base Release 1.25.2 2017-02-02 11:20:00 +11:00
rax-nova-agent Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
redhat-common Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
rhel Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
rhel7 Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
rhel-common Remove ccache 2017-05-31 08:28:09 +10:00
rpm-distro Apply setfiles on all mountpoints 2017-05-16 07:51:48 +02:00
runtime-ssh-host-keys Release 1.21.1 2017-02-02 20:36:23 +11:00
select-boot-kernel-initrd Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
selinux-permissive Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
simple-init Have simple-init enable network.service 2017-03-28 19:28:51 +11:00
source-repositories Trivial fix typos 2017-05-31 11:17:05 +07:00
stable-interface-names Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
svc-map Release 1.27.0 2017-02-03 11:49:45 +11:00
sysctl Release 1.25.2 2017-02-02 11:20:00 +11:00
uboot Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ubuntu Unify and fix doc of several Debian and Ubuntu elements 2017-04-07 05:56:50 +00:00
ubuntu-common Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
ubuntu-core Drop support for Ubuntu precise 2017-05-31 14:36:30 +02:00
ubuntu-minimal Drop support for Ubuntu precise 2017-05-31 14:36:30 +02:00
ubuntu-signed Use sphinx warning-is-error 2017-03-14 14:49:49 +11:00
vm Move ppc block-device default to right $ARCH 2017-06-07 13:30:38 +10:00
yum Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
yum-minimal Refactor: block-device filesystem creation, mount and fstab 2017-05-12 13:52:02 +02:00
zypper Merge "drop deprecated map-services/packages from zypper element" 2017-05-31 02:11:21 +00:00
zypper-minimal Adjust package mapping for SUSE family 2017-05-31 21:09:53 +02:00