How To Convert Ubuntu 19.04 Server To MikroTik Router Using Script3 min read
MikroTik is the best router so I want to share how to convert Ubuntu 19.04 server to the MikroTik router using script. MikroTik router easy manages from winbox client soft.
★ How To Add Windows Host In Zabbix Server
★ Monitor mysql Service In My Zabbix Server
MikroTik chr version : 6.44.6
Ubuntu version : 19.04
MikroTik default user : admin
MikroTik default password : don’t needed
Step #01: Check my ubuntu server like version & ip using below command.
[email protected]:~# lsb_release -a
No LSB modules are available.
Distributer ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
Step #02: Open script file and copy my provided script
vi script.sh
#!/bin/bash wget https://download.mikrotik.com/routeros/6.44.6/chr-6.44.6.img.zip -O chr.img.zip && \ gunzip -c chr.img.zip > chr.img && \ mount -o loop,offset=512 chr.img /mnt && \ ADDRESS=`ip addr show eth1 | grep global | cut -d' ' -f 6 | head -n 1` && \ GATEWAY=`ip route list | grep default | cut -d' ' -f 3` && \ echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1] /ip route add gateway=$GATEWAY /ip service disable telnet /user set 0 name=root password=xxxxxx " > /mnt/rw/autorun.scr && \ umount /mnt && \ echo u > /proc/sysrq-trigger && \ dd if=chr.img bs=1024 of=/dev/xvda && \ echo "sync disk" && \ echo s > /proc/sysrq-trigger && \ echo "Sleep 5 seconds" && \ sleep 5 && \ echo "Ok, reboot" && \ echo b > /proc/sysrq-trigger
Then press Esc :wq then press Enter for save file.
Step #03: If your server disk name xvda so not needed any change script.
Check your server disk name using below command.
[email protected]:~# lsblk
when you see disk is xvda so it is fine not change from script. But if you see another disk name so must be change it.
If you see any problem please see my YouTube channel for more details.
- How To Install ionCube Loader Wizard On Windows 10 XAMPP - December 9, 2021
- How To Install Zabbix Server 6.0 On Centos 8 - December 4, 2021
- How To Install Zabbix Server 6.0 On Ubuntu 20.04 - November 30, 2021
We really appreciate for your support for buying me a coffee.
It takes us a while to compose and upload new content, as they have to be checked to see if Properly works. We appreciate you if you help me for one cup of coffee to keep us awake and always deliver good quality content.
No contribution is small of an amount. We are grateful for any amount you support us with. Thank you!
Not conversion, overwtire the disk
Yes, You are right. Server convert and disk overwrite.
Thanks.
Im installed on ubuntu virtual server. what can access this on winbox (Remote Access)
Download winbox then connect using
server ip
username admin
password is blank.
Thanks.
Hello, I need to do the same process but with RouterOS 7
Sure, This is same process. Thanks.