Community discussions

MikroTik App
 
User avatar
dlynes
newbie
Topic Author
Posts: 32
Joined: Tue Apr 12, 2016 9:08 pm
Location: Hamilton, Canada
Contact:

Suggestion: Be Able to Use a MikroTik device as the Netinstall Server

Fri Jun 11, 2021 1:10 pm

I would like to be able to use a MikroTik device as a Netinstall server for that rare occasion when a device goes into a reboot loop because it has corrupted firmware. It saves me a trip down to the client site if I can manage it all after hours, remotely.

RouterOS supports tftp. I don't know if I can just rename the npk file to a 'vmlinux' filename and have it work, or not. I finally got past all the file doesn't exist errors, and now I'm stuck at timeout errors.

I've tried changing values for allow-rollover and reading-window-size, all to no avail.

Is what I'm trying to do even currently achievable? If so, what might I be doing incorrectly?

If not, can you update RouterOS so that it is achievable?

Thank you.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Suggestion: Be Able to Use a MikroTik device as the Netinstall Server

Fri Jun 11, 2021 1:51 pm

If you make one vpn between your PC and one working remote device where routerboard is attached,
you can use netinstall between your PC and the remote device.

I sometime must do it.
 
r00t
Long time Member
Long time Member
Posts: 672
Joined: Tue Nov 28, 2017 2:14 am

Re: Suggestion: Be Able to Use a MikroTik device as the Netinstall Server

Fri Jun 11, 2021 3:50 pm

Actually this isn't that bad idea as most needed parts of the process can already be handled by ROS as it is:
1) device asks BOOTP server for address
2) device downloads netinstall kernel with ramdisk from TFTP server
3) custom netsinstall protocol is used to get information from the device and to transfer packages to it
4) device is instructed to install uploaded packages, then it reboots

Only part that's really missing is tool to do #3, but that would be a very simple console application, similar to tftp client. You tell it list of packages to send to device and it would do it, nothing fancy.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Suggestion: Be Able to Use a MikroTik device as the Netinstall Server

Fri Jun 11, 2021 4:46 pm

Actually this isn't that bad idea as most needed parts of the process can already be handled by ROS as it is:
1) device asks BOOTP server for address
2) device downloads netinstall kernel with ramdisk from TFTP server
3) custom netsinstall protocol is used to get information from the device and to transfer packages to it
4) device is instructed to install uploaded packages, then it reboots

Only part that's really missing is tool to do #3, but that would be a very simple console application, similar to tftp client. You tell it list of packages to send to device and it would do it, nothing fancy.
at least full package like v7, and after you chose what leave active
must be the option "keep previous config" or not.
 
User avatar
dlynes
newbie
Topic Author
Posts: 32
Joined: Tue Apr 12, 2016 9:08 pm
Location: Hamilton, Canada
Contact:

Re: Suggestion: Be Able to Use a MikroTik device as the Netinstall Server

Sat Jun 12, 2021 7:36 am

Based on what I've discovered of the sequence of events from doing packet captures and trial and error, I got as far as #2 (not the ramdisk part) trying to figure it out without using a tunnel. The problem I ran into was how to get the 'vmlinux' file from the .npk file. If I knew how to do that, I'd be able to try to figure it out further.
Actually this isn't that bad idea as most needed parts of the process can already be handled by ROS as it is:
1) device asks BOOTP server for address
2) device downloads netinstall kernel with ramdisk from TFTP server
3) custom netsinstall protocol is used to get information from the device and to transfer packages to it
4) device is instructed to install uploaded packages, then it reboots

Only part that's really missing is tool to do #3, but that would be a very simple console application, similar to tftp client. You tell it list of packages to send to device and it would do it, nothing fancy.
 
r00t
Long time Member
Long time Member
Posts: 672
Joined: Tue Nov 28, 2017 2:14 am

Re: Suggestion: Be Able to Use a MikroTik device as the Netinstall Server

Sat Jun 12, 2021 3:38 pm

no, netinstall kernels are stored in resources of netinstall.exe binary. They are different from regular ROS kernels and contain embedded ramdisk with netinstall binary.
Open EXE with resource editor, and save binary resources to disk. Then remove first 4 bytes and you get kernel. That's what should be on your TFTP server.

I have some more information here: https://www.r00t.cz/Misc/MikrotikNetinstallFromCF
I have put netinstall to CF card to revive RB800 with damaged ETH1 - it would not boot from ETH2/3 but could netinstall from them while booted from CF card.
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: Suggestion: Be Able to Use a MikroTik device as the Netinstall Server

Sat Jun 12, 2021 3:57 pm

I agree, this is a really good idea - not sure if MikroTik can make it work on every model but this would be an incredibly helpful feature to have.
 
nemke
Member Candidate
Member Candidate
Posts: 160
Joined: Thu Jul 31, 2014 2:52 am

Re: Suggestion: Be Able to Use a MikroTik device as the Netinstall Server

Sat Jul 17, 2021 4:40 pm

+1 for that
It would be great and helpful feature

Who is online

Users browsing this forum: bp0, GoogleOther [Bot], rplant, Victoravv and 81 guests