# Shrink Volumio Image and expand on next boot up Script!

**URL:** <https://community.volumio.com/t/shrink-volumio-image-and-expand-on-next-boot-up-script/6610>\
**Category:** Help\
**Created:** [August 10, 2017, 11:51am UTC](https://community.volumio.com/t/shrink-volumio-image-and-expand-on-next-boot-up-script/6610 "2017-08-10T11:51:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hdellagnesi](https://community.volumio.com/letter_avatar_proxy/v4/letter/h/eb9ed0/32.png) [@hdellagnesi](https://community.volumio.com/u/hdellagnesi)\
**Post date:** [August 10, 2017, 11:51am UTC](https://community.volumio.com/t/shrink-volumio-image-and-expand-on-next-boot-up-script/6610/1 "2017-08-10T11:51:33Z")

</div>

Hi Everyone, I am newbie on linux and volumio,  
I would like to know how i can do this trick:  
I need shink volumio image, to keep a low size file and make fast the image burn process  
After burn up the image, and boot up, I need Volumio Expand automatically

Is possible do it using script?

can someone sugest me how implement this?

ThankU

---

<div class="post-metadata">

**Author:** ![ROLO](https://community.volumio.com/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@ROLO](https://community.volumio.com/u/ROLO)\
**Post date:** [August 10, 2017, 12:29pm UTC](https://community.volumio.com/t/shrink-volumio-image-and-expand-on-next-boot-up-script/6610/2 "2017-08-10T12:29:29Z")

</div>

As far as I know this is how it works already. The image you download is the minimum size and it expands to the size of the SD card you write it to after the first boot.

---

<div class="post-metadata">

**Author:** ![hdellagnesi](https://community.volumio.com/letter_avatar_proxy/v4/letter/h/eb9ed0/32.png) [@hdellagnesi](https://community.volumio.com/u/hdellagnesi)\
**Post date:** [August 24, 2017, 5:13pm UTC](https://community.volumio.com/t/shrink-volumio-image-and-expand-on-next-boot-up-script/6610/3 "2017-08-24T17:13:15Z")

</div>

Ok, but in my first execution I was using a small size micro sd card, so the system expanded about 4 Gb, I want put this modified image in a big microSdCard.  
I used a win32disk image, for backup and write the image on bigger one  
Now I have the system using just a portion of total size, I am looking for a script that expand the filesistem after a first boot…

---

<div class="post-metadata">

**Author:** ![balbuze](https://community.volumio.com/user_avatar/community.volumio.com/balbuze/32/30223_2.png) [@balbuze](https://community.volumio.com/u/balbuze)\
**Post date:** [August 24, 2017, 5:17pm UTC](https://community.volumio.com/t/shrink-volumio-image-and-expand-on-next-boot-up-script/6610/4 "2017-08-24T17:17:26Z")

</div>

Volumio just do that automatically at first boot

---

<div class="post-metadata">

**Author:** ![gkkpch](https://community.volumio.com/user_avatar/community.volumio.com/gkkpch/32/17306_2.png) [@gkkpch](https://community.volumio.com/u/gkkpch)\
**Post date:** [August 25, 2017, 2:34pm UTC](https://community.volumio.com/t/shrink-volumio-image-and-expand-on-next-boot-up-script/6610/5 "2017-08-25T14:34:17Z")

</div>

Hi,

yes, volumio does that at first boot, but when I understand @hdellagnesi post correctly, first boot already happened with the small sd card.  
After he created a backup, he flashed that to a bigger SD.

@hdellagnesi: take your new SD card and put an empty file called “resize-volumio-datapart” in the boot partition.  
This should instruct volumio to do a resize automatically.

---

<div class="post-metadata">

**Author:** ![hdellagnesi](https://community.volumio.com/letter_avatar_proxy/v4/letter/h/eb9ed0/32.png) [@hdellagnesi](https://community.volumio.com/u/hdellagnesi)\
**Post date:** [August 26, 2017, 11:46pm UTC](https://community.volumio.com/t/shrink-volumio-image-and-expand-on-next-boot-up-script/6610/6 "2017-08-26T23:46:46Z")

</div>

> [@gkkpch](#):
>
> Hi,
> 
> yes, volumio does that at first boot, but when I understand @hdellagnesi post correctly, first boot already happened with the small sd card.  
> After he created a backup, he flashed that to a bigger SD.
> 
> @hdellagnesi: take your new SD card and put an empty file called “resize-volumio-datapart” in the boot partition.  
> This should instruct volumio to do a resize automatically.

Thank You!  
That was exactly what I needed  
God bless you!
