Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions build-tests/x86/tumbleweed/test-image-lvm/appliance.kiwi
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- OBS-Profiles: @BUILD_FLAVOR@ -->
<image schemaversion="7.5" name="kiwi-test-image-lvm">
<description type="system">
<author>Marcus Schäfer</author>
<contact>ms@suse.com</contact>
<specification>Disk test build using LVM</specification>
</description>
<profiles>
<profile name="DOS" description="MBR(DOS) disk"/>
<profile name="GPT" description="GPT disk"/>
</profiles>
<preferences>
<version>1.42.1</version>
<packagemanager>zypper</packagemanager>
Expand All @@ -16,6 +20,8 @@
<rpm-check-signatures>false</rpm-check-signatures>
<bootsplash-theme>breeze</bootsplash-theme>
<bootloader-theme>openSUSE</bootloader-theme>
</preferences>
<preferences profiles="GPT">
<type image="oem" filesystem="ext3" kernelcmdline="console=ttyS0" firmware="uefi" format="vmdk">
<oemconfig>
<oem-swap>true</oem-swap>
Expand All @@ -27,6 +33,18 @@
</systemdisk>
</type>
</preferences>
<preferences profiles="DOS">
<type image="oem" filesystem="ext3" kernelcmdline="console=ttyS0" firmware="bios" format="vmdk">
<oemconfig>
<oem-swap>true</oem-swap>
<oem-swapsize>512</oem-swapsize>
</oemconfig>
<bootloader name="grub2" console="serial" timeout="10"/>
<systemdisk>
<volume name="home" size="2G"/>
</systemdisk>
</type>
</preferences>
<users>
<user password="$1$wYJUgpM5$RXMMeASDc035eX.NbYWFl0" home="/root" name="root" groups="root"/>
</users>
Expand All @@ -43,7 +61,6 @@
<package name="iputils"/>
<package name="vim"/>
<package name="grub2"/>
<package name="grub2-x86_64-efi" arch="x86_64"/>
<package name="grub2-i386-pc"/>
<package name="lvm2"/>
<package name="plymouth"/>
Expand All @@ -62,6 +79,9 @@
<package name="timezone"/>
<package name="dracut-kiwi-oem-repart"/>
</packages>
<packages type="image" profiles="GPT">
<package name="grub2-x86_64-efi" arch="x86_64"/>
</packages>
<packages type="bootstrap">
<package name="gawk"/>
<package name="grep"/>
Expand Down
11 changes: 11 additions & 0 deletions kiwi/partitioner/dasd.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ def set_uuid(self, partition_id: int, uuid: str) -> None:
"""
pass # pragma: nocover

def set_flag(self, partition_id: int, flag_name: str):
"""
Set partition flag

Nothing to be done here for DASD devices

:param int partition_id: unused
:param string flag_name: unused
"""
pass # pragma: nocover

def resize_table(self, entries: int = None) -> None:
"""
Resize partition table
Expand Down
1 change: 1 addition & 0 deletions kiwi/partitioner/msdos.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def set_flag(self, partition_id: int, flag_name: str) -> None:
:param int partition_id: partition number
:param string flag_name: name from flag map
"""
partition_id = partition_id if partition_id else self.partition_id
if flag_name not in self.flag_map:
raise KiwiPartitionerMsDosFlagError(
f'Unknown partition flag {flag_name}'
Expand Down
7 changes: 7 additions & 0 deletions kiwi/storage/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ def create_custom_partitions(
self.partitioner.set_uuid(
self.partition_id_map[map_name], part_uuid
)
self.partitioner.set_flag(
entry.partition_id, entry.partition_type
)

def create_root_partition(
self, mbsize: str, clone: int = 0, partition_id: Optional[int] = None
Expand Down Expand Up @@ -250,6 +253,7 @@ def create_root_lvm_partition(
self.partitioner.set_uuid(
self.partition_id_map['root'], root_uuid
)
self.partitioner.set_flag(partition_id, 't.lvm')

def create_root_raid_partition(
self, mbsize: str, clone: int = 0, partition_id: Optional[int] = None
Expand Down Expand Up @@ -287,6 +291,7 @@ def create_root_raid_partition(
self.partitioner.set_uuid(
self.partition_id_map['root'], root_uuid
)
self.partitioner.set_flag(partition_id, 't.raid')

def create_root_readonly_partition(
self, mbsize: str, clone: int = 0, partition_id: Optional[int] = None
Expand Down Expand Up @@ -432,6 +437,7 @@ def create_swap_partition(
self.partitioner.set_uuid(
self.partition_id_map['swap'], swap_uuid
)
self.partitioner.set_flag(partition_id, 't.swap')

def create_efi_csm_partition(
self, mbsize: str, partition_id: Optional[int] = None
Expand Down Expand Up @@ -483,6 +489,7 @@ def create_efi_partition(
self.partitioner.set_uuid(
self.partition_id_map['efi'], esp_uuid
)
self.partitioner.set_flag(partition_id, 't.efi')

def activate_boot_partition(self):
"""
Expand Down
Loading