Installing Mikrotik RouterOS

in mikrotik •  7 years ago 

Take a fresh Ubuntu 16.04 or centos,debian,run this command
wget http://download2.mikrotik.com/routeros/6.36.4/chr-6.36.4.img.zip -O chr.img.zip &&
gunzip -c chr.img.zip > chr.img &&
mount -o loop,offset=33554944 chr.img /mnt &&
ADDRESS=ip addr show eth0 | 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
" > /mnt/rw/autorun.scr &&
umount /mnt &&
echo u > /proc/sysrq-trigger &&
dd if=chr.img bs=1024 of=/dev/vda &&
reboot

For default root password = "xxxxxx"

wget http://download2.mikrotik.com/routeros/6.36.4/chr-6.36.4.img.zip -O chr.img.zip &&
gunzip -c chr.img.zip > chr.img &&
mount -o loop,offset=33554944 chr.img /mnt &&
ADDRESS=ip addr show eth0 | 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/vda &&
echo "sync disk" &&
echo s > /proc/sysrq-trigger &&
echo "Sleep 5 seconds" &&
sleep 5 &&
echo "Ok, reboot" &&
echo b > /proc/sysrq-trigger

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @serverz! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @serverz! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!