linuxdeploy icon indicating copy to clipboard operation
linuxdeploy copied to clipboard

Pre-start initialization script

Open ghost opened this issue 5 years ago • 4 comments

It would be nice to have a possibility of running a script initializing device environment before Linux system is started (optional mounts etc.)

Use case I have a Linux system installed on a SD card. The card has 2 partitions, FAT32 and ext4. Linux is installed in a directory on the ext4 partition.

Problem The ext4 partition needs to be mounted before Linux Deploy is started. Dealing with device's fstab and init.rc could be potentially dangerous and result in boot loops if card gets corrupted or missing.

Solution Linux Deploy could run an optional, user-specified initialization script before it attempts to start the Linux system. It could handle mounts and other necessary initialization (depending on user's needs).

ghost avatar Dec 08 '19 11:12 ghost

Give me a script

karaenga avatar Dec 29 '19 07:12 karaenga

I didn't mean any specific script. What I had in mind is an option that would allow users to run their own script before Linux is started. In my case such script would mount the partition with Linux installation (ext4 partition on SD card). So basically an option that would point to path with pre-start script (and maybe post-stop to clean up). Those scripts would be run as root.

ghost avatar Dec 29 '19 09:12 ghost

I could try to add that... shouldn't be too difficult! Check back in a few days :)

iscle avatar Jan 14 '20 21:01 iscle

3 years later, does this was added?

jaum20 avatar Apr 19 '23 21:04 jaum20