linuxdeploy
linuxdeploy copied to clipboard
Pre-start initialization script
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).
Give me a script
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.
I could try to add that... shouldn't be too difficult! Check back in a few days :)
3 years later, does this was added?