> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Modify partition layout

This explains how to add, delete, modify, or rename partitions. For partition concepts and the Ptool workflow, see [Manage partitions in Qualcomm Linux](./manage-partitions-in-qualcomm-linux).

Configuration files that define partitions for the UFS and eMMC devices are located at:

* [https://github.com/qualcomm-linux/qcom-ptool/blob/main/platforms/qcs6490-rb3gen2/ufs/partitions.conf](https://github.com/qualcomm-linux/qcom-ptool/blob/main/platforms/qcs6490-rb3gen2/ufs/partitions.conf) (for UFS)
* [https://github.com/qualcomm-linux/qcom-ptool/blob/main/platforms/iq-615-evk/emmc/partitions.conf](https://github.com/qualcomm-linux/qcom-ptool/blob/main/platforms/iq-615-evk/emmc/partitions.conf) (for eMMC)

To add a partition, add a row entry to this file. To remove a partition, delete the corresponding entry to remove the target partition from the set of images to be flashed.

Many partitions are crucial for functionality. To understand the details of how this file plays a role in generating the partition table, see [Manage partitions in Qualcomm Linux](./manage-partitions-in-qualcomm-linux#managing-partitions-in-qualcomm-linux).

## **Add a partition**

To add a partition with name `test` in `LUN0`, add the following line to `partitions.conf` after the `LUN0`section:

```text theme={null}
--partition --lun=0 --name=test --size=4096KB --type-guid=1B81F7E6-F50D-419B-A739-2AEFF8DA3335
```

This adds a 4 MB partition test to `LUN0` and a GUID determined by you. This partition isn't flashed with any image, but it's available as a raw partition after the device boots up. Because this partition is added to `LUN0`, it shows up at either of the following options:

* `/dev/sda<N>`
* `/dev/disk/by-partlabel/test`

**Note**

To reflect the changes in `partitions.conf`, update the `QCOM_PARTITION_CONF`. For more information, see [Modify partition](./manage-partitions-in-qualcomm-linux#modify-partition).

## **Add a partition with a binary**

1. To add a partition with a binary to be flashed to the created partition with name `test1` in `LUN0`, add the following line to `partitions.conf` after the `LUN0` section:
   ```text theme={null}
   --partition --lun=0 --name=test --size=4096KB --type-guid=1B81F7E6-F50D-419B-A739-2AEFF8DA3335 --filename=test1.bin
   ```
2. Deploy the new `test1.bin` binary in `build/tmp/deploy/images/rb3gen2-core-kit/$(image_name)`.

## **Next steps**

* To customize the kernel, see [Qualcomm Linux Kernel Guide](https://dragonwingdocs.qualcomm.com/System/Kernel/modify-the-kernel).
