Skip to content

Make it possible to specify partition number #2848

@traylenator

Description

@traylenator

Currently with a partitions configuration of say:

<type image="oem" bootpartition="false" filesystem="xfs" kernelcmdline="console=ttyS0" firmware="uefi" format="qcow2">
            <size unit="G">5</size>
            <oemconfig>
                <oem-swap>true</oem-swap>
                <oem-swapsize>512</oem-swapsize>
                <oem-resize>false</oem-resize>
            </oemconfig>
            <bootloader name="grub2" console="serial" timeout="10"/>
            <partitions>
                <partition name="var" size="1G" mountpoint="/var" filesystem="ext3"/>
            </partitions>
            <systemdisk>
                <volume name="home" freespace="all"/>
            </systemdisk>
        </type>

It is not possible to end up with partition numbers other than 1, 2 , 3, ...

Someone in the past decided to make root partitions be partition 1 in our images and it is now expected.

virt-filesystems --parts -a build/10-alma/alma10.x86_64-0.0.0.raw
/dev/sda1
/dev/sda14
/dev/sda15

and

Number  Start (sector)    End (sector)  Size       Code  Name
   1         1128448        41943006   19.5 GiB    8300  
  14            2048           10239   4.0 MiB     EF02  
  15           10240         1126400   545.0 MiB   EF00  EFI System Partition

Would be good if a "number" attribute could be added to <partition name="var" size="1G" mountpoint="/var" filesystem="ext3"/>

For workaround we are currently:

sgdisk --transpose 1:14 "$disk_device"
sgdisk --transpose 2:15 "$disk_device"
sgdisk --transpose 3:1 "$disk_device" 

in an editbootconfig script which is working find but handling internally would be great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions