Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Is it possible to run post DD scripts #11

Open
subbaraoganeshna opened this issue Nov 5, 2020 · 4 comments
Open

Is it possible to run post DD scripts #11

subbaraoganeshna opened this issue Nov 5, 2020 · 4 comments

Comments

@subbaraoganeshna
Copy link

subbaraoganeshna commented Nov 5, 2020

Hi @aaronnguyen ,

thanks for the project.

I wonder if I can mount each of the sdcard after DD, to change a few files inside each card.
those files would be like /etc/hosts different for each card.

I would fork and modify it, but I want to know if it's possible with the current design.

thanks.

@aaronnguyen
Copy link
Owner

Hi @subbaraoganeshna ,

You should be able to mount the cards after DD.
Try using "lsblk" to determine the connected devices and partitions and then use the "mount" command to remount them wherever you desire.

Only issue is that those are sudo commands. Currently it was hard to run the OSID as sudo (if I remember correctly). I did a work around and just created a bash script start the backend as sudo, then open chromium as the front end.

It isn't possible right now with it's current design but you're welcome to fork and modify it!
Not sure how you would plan to implement it, but you could start with the system/server.py file.
Since during the application start up (system/run_app.sh.sample), the server.py runs in sudo.

@aron7676
Copy link

I am also interested, mainly in offering the ability push an image and expand the file system. Ex I have an image from a 1gb SD and I need to push onto a 2 GB. expand the partition to the end of 2 gb.

Any tips or tricks on that?

@aaronnguyen
Copy link
Owner

There is a discussion here: https://www.raspberrypi.org/forums/viewtopic.php?t=174434

And I found this blog post, haven't tested it myself though: https://pghpunkid.com/raspberry-pi-auto-expand-file-system-shell-script/

For my own project, I just use this script here to shrink my images. https://github.com/Drewsif/PiShrink/
In the process of shrinking the image, it re-enables auto expand using it's own script.

But all these solutions are resize partition on first boot, not expand the filesystem after the cloning on the host machine.

@aron7676
Copy link

aron7676 commented Feb 23, 2021 via email

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

No branches or pull requests

3 participants