# ISO\_customize module error : "msg": "Failed to delete iso file /boot.cfg with error: Assigned an extent beyond the ISO (214605 \> 214603)"}

**URL:** <https://forum.ansible.com/t/iso-customize-module-error-msg-failed-to-delete-iso-file-boot-cfg-with-error-assigned-an-extent-beyond-the-iso-214605-214603/2009>\
**Category:** Get Help\
**Tags:** centos-stream, playbook, pycdlib, ansible-core\
**Created:** [October 28, 2023, 4:44am UTC](https://forum.ansible.com/t/iso-customize-module-error-msg-failed-to-delete-iso-file-boot-cfg-with-error-assigned-an-extent-beyond-the-iso-214605-214603/2009 "2023-10-28T04:44:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rimjith](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rimjith](https://forum.ansible.com/u/rimjith)\
**Post date:** [October 28, 2023, 4:44am UTC](https://forum.ansible.com/t/iso-customize-module-error-msg-failed-to-delete-iso-file-boot-cfg-with-error-assigned-an-extent-beyond-the-iso-214605-214603/2009/1 "2023-10-28T04:44:31Z")

</div>

I am trying to modify the iso file using below code, but getting the error “msg”: “Failed to delete iso file /boot.cfg with error: Assigned an extent beyond the ISO (214605 \> 214603)”}

unable to find any article. Can anyone help me to fix the issue?  
I am on Centos 9 Stream and Python 3.9.17  
pycdlib==1.14.0

```auto
  - name: Modify source ISO from {{ file_path }} and copy to destination
    community.general.iso_customize:
      src_iso: "{{ isosrc}}/{{ src_iso_file }}"
      dest_iso: "{{ iso_path }}/{{ item.servername }}.iso"
      delete_files:
        - "boot.cfg"
        - "EFI/BOOT/BOOT.CFG"
      add_files:
        - src_file: "{{ file_path }}/{{ item.servername }}/BOOT.CFG"
          dest_file: "BOOT.CFG"
        - src_file: "{{ file_path }}/{{ item.servername }}/BOOT.CFG"
          dest_file: "EFI/BOOT/BOOT.CFG"
    loop: "{{ hostName }}"

```

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [October 28, 2023, 8:33am UTC](https://forum.ansible.com/t/iso-customize-module-error-msg-failed-to-delete-iso-file-boot-cfg-with-error-assigned-an-extent-beyond-the-iso-214605-214603/2009/2 "2023-10-28T08:33:08Z")

</div>

Some ISO files (e.g. VMware ESXi) have an unusual path table extent structure, which is the cause of your problem.

This is already addressed in upstream `pycdlib` repository, but the fix is not released as versioned pip module yet: [Assigned an extent beyond the ISO · Issue #106 · clalancette/pycdlib · GitHub](https://github.com/clalancette/pycdlib/issues/106)

So install latest `pycdlib` from GitHub and try your playbook again:

```bash
pip install git+https://github.com/clalancette/pycdlib.git

```

---

<div class="post-metadata">

**Author:** ![rimjith](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rimjith](https://forum.ansible.com/u/rimjith)\
**Post date:** [October 28, 2023, 11:10am UTC](https://forum.ansible.com/t/iso-customize-module-error-msg-failed-to-delete-iso-file-boot-cfg-with-error-assigned-an-extent-beyond-the-iso-214605-214603/2009/3 "2023-10-28T11:10:24Z")

</div>

Thank you, it worked.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 27, 2023, 11:11am UTC](https://forum.ansible.com/t/iso-customize-module-error-msg-failed-to-delete-iso-file-boot-cfg-with-error-assigned-an-extent-beyond-the-iso-214605-214603/2009/4 "2023-11-27T11:11:23Z")

</div>

Closed on November 27, 2023, 11:11am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
