Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SaicharanKandukuri/bcde5e1eb82ec1265bebd321a7acd057 to your computer and use it in GitHub Desktop.
Save SaicharanKandukuri/bcde5e1eb82ec1265bebd321a7acd057 to your computer and use it in GitHub Desktop.
A way to boot tarballed Linux with systemd

This process requires Superuser privilages.

Step-1: Installing requirements:

we need systmd-nspawn application for doing this whole process. so we need to install it first. This pacakge is name as systemd-container in most of the linux distributions and system-nspwan in some distributions

sudo apt install -y systemd-container

if this dosent work the try this

sudo apt install -y systemd-nspawn

Step-2: Setting up rootfs for boot

Extract your in a directory of your choice. For now lets think i extracted my fs in directory called my_linux

  • Before booting we need to install systemd and init inside fs To do that use:
sudo system-nspawn -D my_linux
# then install systemd and init
apt install -y systemd init;exit

Step-3: Boot the linux

To Boot linux use -b in above command

sudo systemd-nspawn -Db my_linux

End of file

😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment