Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: option to resize partitions/filesystems on disk to fill available space #1451

Open
tkfu opened this issue May 18, 2017 · 10 comments

Comments

@tkfu
Copy link

tkfu commented May 18, 2017

  • Etcher version: All
  • Operating system and architecture: All
  • Image flashed: Raw disk images
  • Do you see any meaningful error information in the DevTools? n/a

Use case for this feature request: I have a build process whose output artefact is a raw disk image with two partitions. This image then gets flashed onto boot media of various sizes. Since the size isn't known ahead of time, the image can't be pre-sized to the boot media. That means the process for flashing looks like this, resizing the partition with parted and then the filesystem with e2fstools:

etcher my-image.img # or dd if=my-image.img of=/dev/sdX if you're feeling dangerous
parted -s /dev/sdX resizepart 2 '100%'
resize2fs /dev/sdX2

Could this be implemented as part of Etcher? For the UI, perhaps a check-box for 'Attempt to maximize partition size', and a similar command line option?

@lurch
Copy link
Contributor

lurch commented May 18, 2017

I'm fairly sure we discussed this before somewhere, but Github search isn't finding the right issue discussion for me...

Etcher simply copies the disk image byte-perfect onto the destination drive, and doesn't mess about with the partition tables at all. So I dunno if we'll be adding this feature anytime soon.
In the meantime, perhaps you could use the same workaround that Raspbian uses, where it automatically enlarges the root partition the first time it boots up?

@probonopd
Copy link

I would also be interested in seeing this.

@lurch
Copy link
Contributor

lurch commented Dec 2, 2017

I'm fairly sure we discussed this before somewhere...

Aha, here's the other place where it was being discussed: #413 (comment)

@jviotti jviotti added this to the Backlog milestone Dec 5, 2017
@GuBi34
Copy link

GuBi34 commented Oct 8, 2018

I considder this to be a usefull feature as well (and would like to see it?)

@daghemo
Copy link

daghemo commented Jan 15, 2019

Would be a(nother) possibile workaround to balena-os/balena-os#396.

@bcomnes
Copy link

bcomnes commented Feb 4, 2019

This is surprisingly a pain in the butt on macOS, etcher having this feature would be fantastic, as my SD cards rarely match the image size that comes with the image, and you can't really do it from the running image.

@scottrpaterson
Copy link

This would be an amazing feature to add!

@bcomnes
Copy link

bcomnes commented Sep 7, 2020

I ended up finding a way to set this up outside of balena by modifying images with packer.

Script that does it: https://github.com/bcomnes/raspi-packer/blob/master/resizerootfs

Lifecycle script that runs it (systemd): https://github.com/bcomnes/raspi-packer/blob/master/resizerootfs.service

@cyberb
Copy link

cyberb commented Feb 14, 2021

Syncloud project is willing to pay for this feature £100 even if it is a Linux only option, job proposal is published at upwork.com

@lowlydba
Copy link

This would be a great feature to have!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants