# Installing rlxos from any other already installed Linux distribution

In this tutorial, I will show you how to install rlxos from any other Linux which is already installed into your system.

### Prerequisites

- PC with Linux installed (no any WSL shit)
- Latest rlxos ISO  [Here](https://rlxos.dev/downloads)
- An Empty Partition of size at least 5GiB

### Preparing Partition
We need to have 2 directories in the empty partition where we paste our root filesystem image and kernel file.


![Screenshot from 2021-06-29 19-27-36.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624975084371/7jcXedf2NH.png)

### Steps
- **Extract the ISO**

![Screenshot from 2021-06-29 19-20-23.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624974642066/izViRHxAz.png)

**We only require 3 files from the ISO**
- rootfs.img
- boot/vmlinuz
- boot/initrd

- Copy **rootfs.img** into **rlxos/system** and rename it with version mentioned on the ISO.


![Screenshot from 2021-06-29 19-30-32.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624975242435/nJfLZwB5H.png)


- Now copy **vmlinuz, initrd** to **boot** (boot directory of our empty partition)


![Screenshot from 2021-06-29 19-32-09.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624975349144/QCwSIznD1.png)


- Installation is completed from the rlxos side, now we need to do some hacks so that os-prober of your installed Linux system will able to detect the rlxos partition.
 - Create a directory **lib** in empty partition.
 - Create a empty file **ld-linux.so** in that directory

and your final directory hierarchy should look like this

![Screenshot from 2021-06-29 19-38-39.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624975748625/tJStjnWkB.png)

> rlxos will not use this ld-linux library but the one which is present inside the system image, so don't worry.


- Now update the grub configurations
```bash
sudo update-grub
```

and make sure either rlxos or (some unknown Linux distro)  get detected by os-prober

And a last **Complication Step**
**Now one Important thing, you need to add a flag *system=<version>* (where <version> is release version of rlxos) inside the menuentry of rlxos in /boot/grub/grub.cfg of your installed system**

or
add the flag from the grub menu during the boot, for that follow the below steps

- Reboot the system and press **E** on rlxos entry.

![Screenshot from 2021-06-29 19-43-11.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624976232129/ILqOKfJUg.png)

- And add the flags to make it look like this.

Last Second line, 
```bash
linux /boot/vmlinuz root=/dev/sd?? system=2106
```

![Screenshot from 2021-06-29 19-43-26.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624976260556/L2dmXDIdz.png)


- Press 'ctrl-x' or F10 to start rlxos.

Enjoy!



