Community discussions

 
stroebs
just joined
Topic Author
Posts: 19
Joined: Sat Mar 22, 2014 9:46 pm
Location: Cape Town, ZA

Changing autorun.scr no longer works

Sat Aug 31, 2019 8:13 am

Hi all,

Since MikroTik changed the way raw disk images work, autorun.scr no longer works. This is since 6.43.10 stable.
The second partition was removed from the raw image and autorun.scr was disabled. There is no significance in the changelog as to why this happened.

I am trying to create a simple modification script of the CHR image to install an IP, route and set the default admin user's password, in order to update a script which converts a VPS into a MikroTik CHR. Found here: https://gist.github.com/stroebs/54fc097 ... 3434f117df
This version is currently working with v6.37 but I want to install a new version by default to take advantage of disk auto-resizing.

My script, very basic:
Screenshot 2019-08-31 at 15.08.14.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
eworm
Member
Member
Posts: 392
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Changing autorun.scr no longer works

Sat Aug 31, 2019 10:47 am

The file extension should be "rsc", no?
Manage RouterOS scripts and extend your devices' functionality: RouterOS Scripts
 
stroebs
just joined
Topic Author
Posts: 19
Joined: Sat Mar 22, 2014 9:46 pm
Location: Cape Town, ZA

Re: Changing autorun.scr no longer works

Sat Aug 31, 2019 1:07 pm

The file extension should be "rsc", no?
Well, the previous image method had an autorun.scr file in the second partition in the /rw/ folder. This worked flawlessly.
The current image method still has /rw/autorun.scr, so I can only assume that because the file exists, that is the file that we're supposed to be using. I've tried naming it autorun.rsc, which doesn't work either.

There's also zero documentation on this as I'm assuming it's something that's purely intended for resellers/distributors for branding or regulatory limit control. Doesn't make sense to remove this functionality or reserve it for them in the case of CHR though.
 
User avatar
SiB
Member Candidate
Member Candidate
Posts: 171
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: Changing autorun.scr no longer works

Sat Aug 31, 2019 8:21 pm

After reading title I just think about https://wiki.mikrotik.com/wiki/Manual:C ... tic_Import with script_name.auto.rsc but on this chroot-ed type of installation the autor of script or MikroTik support can give you proper feedback. We know the /import name.rsc and this topic is not normal script for ROS.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL | WebChat: Tokonda
WinBox Tip: F6 works as ALT+TAB | Gliffy.com - free network schematic | prnt.sc - free ScreenShot software
 
stroebs
just joined
Topic Author
Posts: 19
Joined: Sat Mar 22, 2014 9:46 pm
Location: Cape Town, ZA

Re: Changing autorun.scr no longer works

Tue Sep 03, 2019 4:05 am

Do I need to jump up and down for an official answer from MikroTik for this, or have I simply posted in the incorrect forum?
 
joegoldman
Member
Member
Posts: 492
Joined: Mon May 27, 2013 2:05 am

Re: Changing autorun.scr no longer works

Tue Sep 03, 2019 7:39 am

This is a user forum - so yes wrong way to get an official answer. Email their support staff, support@mikrotik.com I believe is still the current one.
 
stroebs
just joined
Topic Author
Posts: 19
Joined: Sat Mar 22, 2014 9:46 pm
Location: Cape Town, ZA

Re: Changing autorun.scr no longer works

Tue Sep 03, 2019 7:51 am

This is a user forum
Sure, I get that, but there are official MikroTik people who frequent this forum who _can_ reply to posts like this to educate the wider community about previous methods which used to work but have been deprecated or removed because of "xyz".

There is a huge open source community who are hacking on MikroTiks and having a public response from MikroTik about this to educate us would be incredibly helpful.

In any case, I will email their support and bother a support representative about it.

FWIW, I am at *point 3*, per the support@mikrotik.com auto-responder... So it's not unwarranted to ask for support here too:
We will try to help you as soon as possible (reply might take up to 3 business days).
For a faster resolution with configuration:

1) If you have purchased your MikroTik product from a Dealer or Reseller,
please, contact them for support.
2) Check your configuration against examples in our manual, try to reset your configuration and start from the beginning:
https://wiki.mikrotik.com
3) Search or ask in our forum for your problem solution:
https://forum.mikrotik.com
4) You may contact and hire MikroTik certified consultant:
https://mikrotik.com/consultants
 
User avatar
krisjanisj
MikroTik Support
MikroTik Support
Posts: 54
Joined: Wed Feb 20, 2019 2:53 pm
Contact:

Re: Changing autorun.scr no longer works

Wed Sep 04, 2019 11:27 am

For security reasons file modification using this method is no longer allowed.

For info how to provision CHR depending on Your Hypervisor, please see our wiki article about this.
* Wager of "The Holy War" against users who don't paste their config/export/print into [code][/code] blocks
* Avid coffee consumer
* Provider of stupid solutions for simple problems

Who is online

Users browsing this forum: No registered users and 9 guests