Page 1 of 1

Changing autorun.scr no longer works

Posted: Sat Aug 31, 2019 8:13 am
by stroebs
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

Re: Changing autorun.scr no longer works

Posted: Sat Aug 31, 2019 10:47 am
by eworm
The file extension should be "rsc", no?

Re: Changing autorun.scr no longer works

Posted: Sat Aug 31, 2019 1:07 pm
by stroebs
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.

Re: Changing autorun.scr no longer works

Posted: Sat Aug 31, 2019 8:21 pm
by SiB
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.

Re: Changing autorun.scr no longer works

Posted: Tue Sep 03, 2019 4:05 am
by stroebs
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?

Re: Changing autorun.scr no longer works

Posted: Tue Sep 03, 2019 7:39 am
by joegoldman
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.

Re: Changing autorun.scr no longer works

Posted: Tue Sep 03, 2019 7:51 am
by stroebs
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

Re: Changing autorun.scr no longer works

Posted: Wed Sep 04, 2019 11:27 am
by krisjanisj
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.