How to inject files to Linux Live OS
- 1. Background
Ventoy has provided Injection Plugin to inject files to the runtime envrionment after boos the ISO file.
But for Linux distro, files are injected to the initramfs environment, not the final live system.
Here I introduce a method of how to inject files into the live system after boot the ISO file.
Take ubuntu-21.04-desktop-amd64.iso for example, you can inject files to the desktop after boot into the Live system.
Attention: The method here must be used with Ventoy-1.0.53+
- 2. Usage
1. Download the .tar.gz file from https://github.com/ventoy/LiveInjection/releases (use the latest release) and decompress it.
2. Put all your files under sysroot
directory
3. Run sh pack.sh
in Linux or just double-click pack.bat
in Windows. A live_injection.tar.gz
file will be created.
Finally, set the ventoy.json according to Injection Plugin as follows:
{ "injection": [ { "image": "/ISO/ubuntu-21.04-desktop-amd64.iso", "archive": "/live_injection.tar.gz" } ] }
- 3. Supported Distros
Tested distros as follows: (Updating)
Distro | Tested ISO |
---|---|
Ubuntu | ubuntu-21.04-desktop-amd64.iso |
Mint | linuxmint-20-xfce-64bit.iso |
MX | MX-19.2_x64.iso |
Manjaro | manjaro-xfce-21.0.4-210506-linux510.iso |
Fedora | Fedora-Workstation-Live-x86_64-34-1.2.iso |
Debian | debian-live-10.7.0-amd64-xfce.iso |
Kali | kali-linux-2020.2-live-amd64.iso |
Arch | archlinux-2021.05.01-x86_64.iso |
openSUSE | openSUSE-Tumbleweed-GNOME-Live-x86_64-Snapshot20200416-Media |
- 4. Screenshot
I put a home/ubuntu/Desktop/test.txt
under sysroot as an example.
This is the result:
Of course this path is ubuntu specific. You can use for example sysroot/home/test.txt
, then the file will be under /home
directory after bot.