@@ -397,21 +397,21 @@ def get_boot_path(self, target='disk'):
397397 # according to the mount path.
398398 bootpath = '/'
399399
400- if target == 'disk' :
401- if not need_boot_partition :
402- filesystem = self .xml_state .build_type .get_filesystem ()
403- volumes = self .xml_state .get_volumes ()
404- if filesystem == 'btrfs' and volumes :
405- # grub boot data paths must not be in a subvolume
406- # otherwise grub won't be able to find its config file
407- grub2_boot_data_paths = ['boot' , 'boot/grub' , 'boot/grub2' ]
408- for volume in volumes :
409- if volume .name in grub2_boot_data_paths :
410- raise KiwiBootLoaderTargetError (
411- '{0} must not be a subvolume' .format (
412- volume .name
413- )
414- )
400+ # if target == 'disk':
401+ # if not need_boot_partition:
402+ # filesystem = self.xml_state.build_type.get_filesystem()
403+ # volumes = self.xml_state.get_volumes()
404+ # if filesystem == 'btrfs' and volumes:
405+ # # grub boot data paths must not be in a subvolume
406+ # # otherwise grub won't be able to find its config file
407+ # grub2_boot_data_paths = ['boot', 'boot/grub', 'boot/grub2']
408+ # for volume in volumes:
409+ # if volume.name in grub2_boot_data_paths:
410+ # raise KiwiBootLoaderTargetError(
411+ # '{0} must not be a subvolume'.format(
412+ # volume.name
413+ # )
414+ # )
415415
416416 if target == 'iso' :
417417 bootpath = '/boot/' + self .arch + '/loader'
@@ -541,9 +541,6 @@ def _mount_system(
541541 if not self .root_mount .device == self .boot_mount .device :
542542 self .boot_mount .mount ()
543543
544- if efi_device :
545- self .efi_mount .mount ()
546-
547544 if volumes :
548545 for volume_path in Path .sort_by_hierarchy (
549546 sorted (volumes .keys ())
@@ -557,6 +554,9 @@ def _mount_system(
557554 options = [volumes [volume_path ]['volume_options' ]]
558555 )
559556
557+ if efi_device :
558+ self .efi_mount .mount ()
559+
560560 if self .root_filesystem_is_overlay :
561561 # In case of an overlay root system all parts of the rootfs
562562 # are read-only. However tools like grub's mkconfig creates
@@ -600,6 +600,10 @@ def _umount_system(self):
600600 setup = SystemSetup (self .xml_state , self .root_mount .mountpoint )
601601 setup .setup_selinux_file_contexts ()
602602 # Umount system
603+ if self .efi_mount :
604+ self .efi_mount .umount ()
605+ if self .boot_mount :
606+ self .boot_mount .umount ()
603607 for volume_mount in reversed (self .volumes_mount ):
604608 volume_mount .umount ()
605609 if self .device_mount :
@@ -608,14 +612,10 @@ def _umount_system(self):
608612 self .proc_mount .umount ()
609613 if self .sys_mount :
610614 self .sys_mount .umount ()
611- if self .efi_mount :
612- self .efi_mount .umount ()
613615 if self .tmp_mount :
614616 self .tmp_mount .umount ()
615617 if self .etc_kernel_mount :
616618 self .etc_kernel_mount .umount ()
617- if self .boot_mount :
618- self .boot_mount .umount ()
619619 if self .root_mount :
620620 self .root_mount .umount ()
621621 self .system_is_mounted = False
0 commit comments