diff --git a/kiwi/builder/disk.py b/kiwi/builder/disk.py index a16797b8322..55a6771b4f4 100644 --- a/kiwi/builder/disk.py +++ b/kiwi/builder/disk.py @@ -374,8 +374,24 @@ def create_disk(self) -> Result: device_map, luks_root ) + # create system layout for root system + device_map = self._create_system_instance( + device_map, stack + ) # build bootable disk - self._process_build(device_map, disk) + self._build_main_system( + stack, + device_map, + disk, + self.storage_map['system'], + self.storage_map['system_boot'], + self.storage_map['system_efi'], + self.storage_map['system_spare'], + self.storage_map['system_custom_parts'] or {}, + self.storage_map['luks_root'], + self.storage_map['raid_root'], + self.storage_map['integrity_root'] + ) # store image bundle_format in result if self.bundle_format: @@ -715,51 +731,6 @@ def _map_root_filesystem( ) self.storage_map['system'] = filesystem - def _process_build(self, device_map: Dict, disk: Disk) -> None: - with ExitStack() as stack: - # create system layout for root system - device_map = self._create_system_instance(device_map, stack) - - # representing the entire image system except for the boot/ area - # which could live on another part of the disk - system: Optional[Union[FileSystemBase, VolumeManagerBase]] = \ - self.storage_map['system'] - - # an instance of a class with the sync_data capability - # representing the boot/ area of the disk if not part of - # system - system_boot: Optional[FileSystemBase] = \ - self.storage_map['system_boot'] - - # an instance of a class with the sync_data capability - # representing the boot/efi area of the disk - system_efi: Optional[FileSystemBase] = \ - self.storage_map['system_efi'] - - # an instance of a class with the sync_data capability - # representing the spare_part_mountpoint area of the disk - system_spare: Optional[FileSystemBase] = \ - self.storage_map['system_spare'] - - # a dict of instances with the sync_data capability - # representing the custom partitions area of the disk - system_custom_parts: Dict[str, FileSystemBase] = \ - self.storage_map['system_custom_parts'] or {} - - self._build_main_system( - stack, - device_map, - disk, - system, - system_boot, - system_efi, - system_spare, - system_custom_parts, - self.storage_map['luks_root'], - self.storage_map['raid_root'], - self.storage_map['integrity_root'] - ) - def _build_main_system( self, stack: ExitStack,