Community discussions

MikroTik App
 
AlexT
newbie
Topic Author
Posts: 30
Joined: Thu Mar 29, 2018 9:51 am

How to install Mikrotik CHR on Oracle Cloud always free instance?

Wed Aug 31, 2022 12:37 pm

Hello!
Please help installing CHR or x86 image on Oracle Cloud which no longer has the ability to create custom disks/images (30 days have passed).

After the following procedure:
  • unzip install-image-7.4.1.zip
  • dd if=install-image-7.4.1.img of=/dev/sda
  • echo 1 > /proc/sys/kernel/sysrq
  • echo b > /proc/sysrq-trigger

I am stuck at this step:
1.png
After selecting the highlighted item above (Boot Install...), the process stops on the next:
2.png

Perhaps there is another way to install on Oracle Cloud?
You do not have the required permissions to view the files attached to this post.
 
poisons
just joined
Posts: 17
Joined: Wed Sep 18, 2013 3:50 pm

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Fri Sep 09, 2022 7:49 am

I hope you download the chr image to ramdisk? If not there is a possibility that you overwrite your chr image with chr image.
 
p4t
just joined
Posts: 7
Joined: Thu Jan 21, 2016 9:46 am

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Sun May 14, 2023 10:06 am

Hi!

Custom images are not an option for Oracle Always Free tier after the trial period expires.
So you can install the image from inside the vm.
If anyone interested, here's a way to do it.

1) Create instance. Under "Image and shape" choose "Rocky Linux 9.1 - Free (x86_64)". Save Private key. Create.
2) Open puttygen, "Load" the private key, "Save private key" as mikrotik.ppk
3) Open putty, "Connection->SSH->Auth->Credentials", browse for ppk on the first and private key on the second.
Return on Session and enter rocky@(your vm's public address) on "Host Name (or IP address)" box and open.
4) Execute
sudo -i
yum install unzip
umount -l /dev/sda1
curl -L https://download.mikrotik.com/routeros/ ... .9.img.zip | funzip | dd of=/dev/sda bs=1M
sync
reboot
(you may need to force reboot it from the console)
5) Firstly check the console's firewall (Networking->Virtual cloud networks->yourvcn->Security Lists)
and the connect through the public ip and secure RouterOS from inside.
 
kovalr
just joined
Posts: 8
Joined: Wed Apr 26, 2017 9:13 pm

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Mon Jan 22, 2024 4:05 pm

Hi!

Custom images are not an option for Oracle Always Free tier after the trial period expires.
So you can install the image from inside the vm.
If anyone interested, here's a way to do it.

1) Create instance. Under "Image and shape" choose "Rocky Linux 9.1 - Free (x86_64)". Save Private key. Create.
2) Open puttygen, "Load" the private key, "Save private key" as mikrotik.ppk
3) Open putty, "Connection->SSH->Auth->Credentials", browse for ppk on the first and private key on the second.
Return on Session and enter rocky@(your vm's public address) on "Host Name (or IP address)" box and open.
4) Execute
sudo -i
yum install unzip
umount -l /dev/sda1
curl -L https://download.mikrotik.com/routeros/ ... .9.img.zip | funzip | dd of=/dev/sda bs=1M
sync
reboot
(you may need to force reboot it from the console)
5) Firstly check the console's firewall (Networking->Virtual cloud networks->yourvcn->Security Lists)
and the connect through the public ip and secure RouterOS from inside.
Has anyone tried this procedure?
 
gammy69er
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Sun May 18, 2014 3:01 am

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Tue Feb 06, 2024 3:52 pm

Has anyone tried this procedure?
I did... Failed for me.

But anything more than a Linux instance is failing for me

https://youtu.be/Wlns9J9a2K8?si=_v0IAbzl7dHz75b_

This video has a solid guide, but I was still unable to get my instances working at all.

Maybe you'll have more luck
 
p4t
just joined
Posts: 7
Joined: Thu Jan 21, 2016 9:46 am

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Sat Mar 23, 2024 9:48 am

I'm sorry that it didn't work for you.
But I've done it multiple times and it does work.

The video you are referring to, needs an account that CAN upload custom images,
but when trial expires, this is not the case.

I'm actively using them and their awesome for their free-ness.
The only downside is the 50mbps network limit,
but it's very easy to use ipsec through the console to overcome it.
 
pantigon
just joined
Posts: 4
Joined: Mon Mar 20, 2023 10:21 am

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Mon Jun 03, 2024 7:39 am

The only downside is the 50mbps network limit,
but it's very easy to use ipsec through the console to overcome it.
How do it?
 
Shon3
just joined
Posts: 9
Joined: Thu Dec 08, 2022 7:35 pm

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Mon Jul 15, 2024 9:50 am

umount -l /dev/sda1
curl -L https://download.mikrotik.com/routeros/ ... .9.img.zip | funzip | dd of=/dev/sda bs=1M
sync
reboot
Does it really work to "lazy" umount the root of a running system and overwrite the underlying block device with `dd`ing the CHR image to it?

I have tried something similar:
```
mount -f -o remount,ro /; curl -L https://download.mikrotik.com/routeros/ ... .9.img.zip | funzip | dd of=/dev/vda bs=1M; echo s > /proc/sysrq-trigger; echo b > /proc/sysrq-trigger
```
in KVM on local PC, it has never booted. (While booting the CHR raw image directly works.)
 
p4t
just joined
Posts: 7
Joined: Thu Jan 21, 2016 9:46 am

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Sat Aug 31, 2024 7:38 pm

Does it really work to "lazy" umount the root of a running system and overwrite the underlying block device with `dd`ing the CHR image to it?
Yes, although I'm no linux expert, this is the first thing I thought back then when I first tried it.
But it does work flawlessly, I've done it myriads of times by now.
I really wonder why you fail... I just made a quick proof video: https://youtu.be/NHSC-DRtDrY

The process do work also for the Ampere ARM64 CHR image and Oracle Linux 8!
Of course since current version (7.16rc4) the "Packages -> Check installation" button says that it's a bad image.
But the same error occurs in Hetzner ampere too, so my described process has nothing to do with it.
 
raimar
just joined
Posts: 2
Joined: Wed Sep 11, 2024 8:23 pm
Location: Brasil

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Wed Sep 11, 2024 8:38 pm

Hey guys. Has anyone managed to find out the reason for the error when checking the system installation? CHR ARM64 version on Oracle Cloud. I did it both ways as presented in the topics here on the forum. When I tried to use ZeroTier1, over time the system would freeze and only return after restarting the vps.
Captura de tela 2024-09-11 143050.png
You do not have the required permissions to view the files attached to this post.
 
p4t
just joined
Posts: 7
Joined: Thu Jan 21, 2016 9:46 am

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Fri Sep 13, 2024 8:24 pm

I contacted the support about the problem and they are aware of the issue:
"We are aware about this issues and look forward to fixing them on upcoming RouterOS versions, unfortunately, I cannot provide a release date now."
So we wait to do their magic, as they always do. I guess that this is not their top priority right now.

My oracle arm vm do also crash frequently, for no apparent reason and reboots by itself.
And sometimes I cannot connect to it using winbox.
But I have almost 20 docker containers running smoothly and none the less,
it's still awesome and very usable even with these issues.
 
raimar
just joined
Posts: 2
Joined: Wed Sep 11, 2024 8:23 pm
Location: Brasil

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Mon Sep 16, 2024 3:53 am

I contacted the support about the problem and they are aware of the issue:
"We are aware about this issues and look forward to fixing them on upcoming RouterOS versions, unfortunately, I cannot provide a release date now."
So we wait to do their magic, as they always do. I guess that this is not their top priority right now.

My oracle arm vm do also crash frequently, for no apparent reason and reboots by itself.
And sometimes I cannot connect to it using winbox.
But I have almost 20 docker containers running smoothly and none the less,
it's still awesome and very usable even with these issues.
P4t. Friend, how did you manage to activate the Container on this Oracle Arm64 VM? I can only use the X86 version normally, but as it only has 1GB of Ram it is very limited, can you provide me with the necessary tips so that I can use the Container resources? I would be very grateful if you could tell me step by step. I'm also experiencing the same crashing issues with this CHR image. Hug!
 
p4t
just joined
Posts: 7
Joined: Thu Jan 21, 2016 9:46 am

Re: How to install Mikrotik CHR on Oracle Cloud always free instance?

Wed Sep 18, 2024 12:13 am

Hi! Unfortunately I think I'm unable to provide a step-by-step guide, because... there are many steps! Ha!
But it's not difficult, I'll describe the general idea.

Firstly just a quick tip if you use Oracle Arm VM and it's 200GB storage limit.
The routeros boot volume will be 47GB, which is the default.
Then you can create a Volume Block that is 106GB. You can mount it and use this space for your storage needs.
But leave empty 47GB! So you can create temporary χ86 VMs for backups of containers and repairs!
Or anyway just use 153GB, leave 47GB empty so you can create temporary vms at will!
Also another tip, increase volume performance for both Boot and Block volumes,
because the bandwidth is very high for the slow default setting of the drives.

Credits for the procedure to nescafe2002 in this post viewtopic.php?p=1072366#p1072366
Beware, the following procedure is needed ONLY because of the current routeros chr arm64 cannot enable containers with the documented procedure!
When they solve this problem, the following procedure will be deprecated!

As in Oracle Cloud there is no rescue mode, the idea is to get a rosmode.msg file from an x86 chr with enabled containers
and copy it to the arm64 chr, using an intermediate x86 linux vm:
1) Create a x86 vm (vm1), install routeros and enable containers as described in the documentation.
(we do this just to get the rosmode.msg file. I'm not sure I can share it, I don't want to violate any rules.)
2) Create another x86 vm (vm2) with whatever linux.
3) Shutdown vm1 and disconnect Boot Volume.
4) Connect vm1 Boot Volume as a Block Volume in vm2.
5) SSH to vm2 and do an lsblk to find the entries, and mount the Block Volume to some directory.
6) Then use WinSCP and connect to vm2. The procedure is like putty, you put the keys and use shell "sudo su -"
(I cannot recall, if it doesn't let you connect with the ppk, then just set a password to root user with "passwd" command in the previous step)
7) Navigate to the mounted directory and copy to your local disk the file rosmode.msg.
8) Unmount the drive, disconnect the Block Volume, and you can delete vm1.
9) Create the arm64 vm (vm3) and install routeros and don't forget to install containers package too afterwards.
10) Shut it down, disconnect Boot Volume and repeat steps 4 - 6.
11) Copy the rosmode.msg you copied from vm1 file back from your local storage to the mounted volume.
It replaces the file and keeps the same permissions.
12) Unmount the drive, disconnect the Block Volume and connect it back as a Boot Volume to vm3.
13) You're done, you can delete vm2. You have a working ampere arm64 chr with containers enabled.

Hope you'll succeed, it's not that difficult and it's working flawlessly! I've even run an LLM container... in a router! Awesome!

Who is online

Users browsing this forum: No registered users and 5 guests