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

[suggested fix]image with read-only filesystem won't autoexpand #227

Open
OhSoGood opened this issue Feb 3, 2022 · 0 comments
Open

[suggested fix]image with read-only filesystem won't autoexpand #227

OhSoGood opened this issue Feb 3, 2022 · 0 comments
Assignees

Comments

@OhSoGood
Copy link

OhSoGood commented Feb 3, 2022

Hi

Thank you very much for your script. It's very useful.

The image I created has its filesystem mounted as read-only. As a consequence, the /etc/rc.local created by your script won't manage to expand the filesystem on the first boot of the Pi.

A simple solution is to modify set_autoexpand in order to check if the filesystem is mounted as readonly or not, and if so to remount it. Or even to directly remount the filesystem (if it was already read/write, it changes nothing).

So a simple mount -o remount,rw / is enough
If needed, to determine if / is "ro" or "rw": mount | sed -n -e 's/^/dev/.* on / .((r[w|o])./\1/p'

Could you add it to your script?

@Drewsif Drewsif self-assigned this Apr 18, 2022
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

2 participants