Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Linux/filesystem experts? Extending img partition



  • I want to make a RetroPi image with my settings, roms, etc. ready to go. I start with a copy of the latest img (call it custom.img), then using dd

    dd if=/dev/zero bs=1M count=4644 >> ./custom.img

    this adds 4.5G to the total file size. Then I open the image in parted and expand the main partition

    parted custom.img
    (parted) resizepart 2
    End? 6681

    When I print the new filesystem as viewed in parted, it looks perfect. Unfortunately, mounting custom.img shows the original partition size rather than my new partition size. Does anyone know why?

    sudo mkdir /mnt/tmp
    sudo mount -o loop,offset=63963136 custom.img /mnt/tmp


  • Banned

    Looks like you are doing it wrong. Try it a different way, one that works



Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.