Currently we export the following installer framework variables:
o INSTALLERFW_PARTX_DEVNODE - device nodes for each partition, e.g.,
/dev/sdb1
This is the device node corresponding to the partition when the image is run on
the real device.
This patch also adds the following:
o INSTALLERFW_PARTX_DISK_DEVNODE - similar to INSTALLERFW_PARTX_DEVNODE, but
specifies disk the partition resides on, e.g., /dev/sdb
o INSTALLERFW_PARTX_DEVNODE_NOW - device nodes in the current environment which
can be used to access the partition from within the current chroot
environment. E.g., /dev/mapper/loop0p1.
o INSTALLERFW_PARTX_DISK_DEVNODE_NOW - similar to
INSTALLERFW_PARTX_DEVNODE_NOW, but for the whole disk, e.f., /dev/loop0
The user of these variables is an installer framework plugin which installs
extlinux. It needs to access the whole image to install MBR and the boot
partition disk image to modify the ADV (extlinux does the latter when executed
with -i).
Change-Id: I1808c48f30174f09bb32d59ff4abe26ac6739880
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
env.update(self._set_part_env(pnum, "TYPE_ID", p.part_type))
env.update(self._set_part_env(pnum, "DEVNODE",
"/dev/%s%d" % (p.disk, pnum + 1)))
+ env.update(self._set_part_env(pnum, "DISK_DEVNODE",
+ "/dev/%s" % p.disk))
pnum += 1
# Count of paritions
for p in self.__instloop.partitions:
env.update(self._set_part_env(p['ks_pnum'], "UUID", p['uuid']))
env.update(self._set_part_env(p['ks_pnum'], "PARTUUID", p['partuuid']))
+ env.update(self._set_part_env(p['ks_pnum'], "DEVNODE_NOW",
+ p['mapper_device']))
+ env.update(self._set_part_env(p['ks_pnum'], "DISK_DEVNODE_NOW",
+ self.__disks[p['disk_name']].device))
return env