Community discussions

MikroTik App
 
User avatar
patrikg
Member
Member
Topic Author
Posts: 350
Joined: Thu Feb 07, 2013 6:38 pm
Location: Stockholm, Sweden

Trying to unbrick my RG750GL.

Wed Mar 15, 2023 10:20 pm

Am getting.
[patrik@hp-arch-new Mikrotik]$ sudo ./netinstall-cli -r -k Y7SR-Z6EA.key -a 192.168.1.100 routeros-mipsbe-6.49.7.npk 
Version: 7.8(2023-02-24 09:43:52)
Will reset config
Interface Mask: 255.255.255.0
Using Client IP: 192.168.1.100
Using Server IP: 192.168.1.10
Starting PXE server
Waiting for RouterBOARD...
client: 00:0C:42:A3:4A:B6
client: 00:0C:42:A3:4A:B6
client: 00:0C:42:A3:4A:B6
client: 00:0C:42:A3:4A:B6
Repeating lines....
[patrik@hp-arch-new Mikrotik]$ sudo ./netinstall-cli -r -k Y7SR-Z6EA.key -a 192.168.1.100 routeros-7.8-mipsbe.npk
Version: 7.8(2023-02-24 09:43:52)
Will reset config
Interface Mask: 255.255.255.0
Using Client IP: 192.168.1.100
Using Server IP: 192.168.1.10
Starting PXE server
Waiting for RouterBOARD...
client: 00:0C:42:A3:4A:B6
client: 00:0C:42:A3:4A:B6
client: 00:0C:42:A3:4A:B6
How do i write the original image to the device.
Last edited by patrikg on Fri Jan 05, 2024 9:48 pm, edited 2 times in total.
 
User avatar
krafg
Forum Guru
Forum Guru
Posts: 1041
Joined: Sun Jun 28, 2015 7:36 pm

Re: Trying to unbrick my RG750GL.

Thu Mar 16, 2023 2:56 pm

I'm not sure if IP range affects, but I always use 192.168.88.x still having different IP range configured on RouterBoard.

The second tip is have enabled only the interface that you will use for Netinstall.

You tried using Netinstall under Windows machine?

Regards.
 
User avatar
patrikg
Member
Member
Topic Author
Posts: 350
Joined: Thu Feb 07, 2013 6:38 pm
Location: Stockholm, Sweden

Re: Trying to unbrick my RG750GL.

Thu Mar 16, 2023 9:24 pm

Thank you for answer my question, i have tried with netinstall from windows and my native Arch Linux system.
Yes I have disable all other interfaces, and disable network manager, also set the ethernet interface with no auto negotiating the speed
set to 100 full, and so on. To avoid the delay then the interface is bringing up to my computer, set the link to up fastest way.

Then using the tftp with bootp it boots the lede/owrt image, but what i think of this is there maybe some fault with the bootcode in the mtd.
And where is the key stored ??
I don't know if the device can boot without correct code in the first part of the mtd ??
I don't know when pressing the reset key when power, whats happend if there some rom somewhere else to boot from tftp and bootp from eth port 1.

And i don't know how to extract the boot code from the npk file, so i can boot from tftp boot p and write the correct bootcode again to mtd.
I don't know how ???
Sorry for more deeper questions.

But i think the only one for answer this questions is Mikrotik them self.

I want to know how this device is working then the mtd/code is broken ??
When pressing the key for upgrade the bootcode whats happens ??
Where is this code located ??
I have flashed to the latest bootcode, but where is this code located ??
Not just the system upgrade...

This is my first own question for long time in this forum.
I have supported for free lots of another users in this forum.

And for more info, it just loops with the message, tried even with some older version of netinstall from ver 6 and same problem.
Thanks in advance. :D
I think it's my time to get some good answers.
 
User avatar
patrikg
Member
Member
Topic Author
Posts: 350
Joined: Thu Feb 07, 2013 6:38 pm
Location: Stockholm, Sweden

Re: Trying to unbrick my RG750GL.

Thu Mar 23, 2023 8:41 pm

Sorry to say Bump
 
User avatar
patrikg
Member
Member
Topic Author
Posts: 350
Joined: Thu Feb 07, 2013 6:38 pm
Location: Stockholm, Sweden

Re: Trying to unbrick my RG750GL.

Fri Mar 24, 2023 7:30 am

As for today, I have to try on one more computer, it's my 3th now.
1. Linux Arch (latest ver) on HP-Elitebook (with dock) to get correct ethernet connection.
2. Windows 11 (latest ver) on Lenovo Thinkpad X1 Carbon.
3. Will be Linux Arch (latest var) on Lenovo Thinkpad X410 ?????
 
holvoetn
Forum Guru
Forum Guru
Posts: 6351
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Trying to unbrick my RG750GL.

Fri Mar 24, 2023 9:19 am

I also use Linux for netinstall.

Always this line (adjusted for platform and version)
.//netinstall-cli -a 192.168.88.3 routeros-arm64-[VERSION].npk
add -r to reset config

and my laptop is configured as 192.168.88.2
 
User avatar
patrikg
Member
Member
Topic Author
Posts: 350
Joined: Thu Feb 07, 2013 6:38 pm
Location: Stockholm, Sweden

Re: Trying to unbrick my RG750GL.

Fri Mar 24, 2023 12:41 pm

Now also tested with new Computer, with non very important thing like what ip address am setting, with the computer and so on.
Sorry to say, It doesn't work like this way and doesn't matter, from what problem I have right now.
And the loop turns around again.

And now tested with Lenovo Thinkpad T410.
Just want to know if the soc have some kind of flash ??
And when holding the reset button in switches between where it should boot from ??
 
holvoetn
Forum Guru
Forum Guru
Posts: 6351
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Trying to unbrick my RG750GL.

Fri Mar 24, 2023 1:03 pm

Keep reset button pressed at power on until it appears.
 
User avatar
patrikg
Member
Member
Topic Author
Posts: 350
Joined: Thu Feb 07, 2013 6:38 pm
Location: Stockholm, Sweden

Re: Trying to unbrick my RG750GL.

Sat Mar 25, 2023 10:48 am

Sorry to say again that's not the problem.
I am not being rude.
 
holvoetn
Forum Guru
Forum Guru
Posts: 6351
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Trying to unbrick my RG750GL.

Sat Mar 25, 2023 11:31 am

Netinstall can be pretty sensitive to have it working.
For me it works 99/100 using these parameters
Linux
Ip address of PC as indicated above.
NO other network adapters active besides ethernet
Command line as indicated above
Press reset on device and keep it pressed while powering on, until it appears in command line.

Did you follow those steps to the letter ?
If not, I suggest you do.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12692
Joined: Thu Mar 03, 2016 10:23 pm

Re: Trying to unbrick my RG750GL.

Sat Mar 25, 2023 1:12 pm

As an aide to debugging ... it is possible to run wireshark on same interface. It then shows pretty clearly if/when RB starts with etherbooting procedure (it starts emitting bootp requests whuch are initially pretty similar to DHCP client requests).

Another suggestion: connect dumbest switch you can find between RB device and netinstall machine. Many NIC drivers are a bit slow enabling NIC after the other end brings it up ... RB tries etherboot for limited duration and if PC is slow to enable NIC, it might be simply too late.
 
User avatar
krafg
Forum Guru
Forum Guru
Posts: 1041
Joined: Sun Jun 28, 2015 7:36 pm

Re: Trying to unbrick my RG750GL.

Tue Mar 28, 2023 6:33 pm

As an aide to debugging ... it is possible to run wireshark on same interface. It then shows pretty clearly if/when RB starts with etherbooting procedure (it starts emitting bootp requests whuch are initially pretty similar to DHCP client requests).
Thanks a lot for this info.

Regards.
 
User avatar
patrikg
Member
Member
Topic Author
Posts: 350
Joined: Thu Feb 07, 2013 6:38 pm
Location: Stockholm, Sweden

Re: Trying to unbrick my RG750GL.

Wed Mar 29, 2023 8:58 pm

Yes i think i have to get the ip traffic on the interface with wireshark or tcpdump to get pcap file.
And see what's going on.
But what i think of this is that this is not what needed for this problem, because the device boot's (dhcp bootp tftp) with another image.
With using dnsmasq to do the stuff. And now with some another ip addresses, that doesn't matter in this context.
So my thoughts of this is the bootcode of the device is broken in the mtd, but not knowing if there some another code somewhere
else in the device. Like the soc.
sudo systemctl stop NetworkManager
sudo ip flush dev enp0s31f6
sudo ip addr add 192.168.1.10/24 dev enp0s31f6
sudo dnsmasq \
--no-daemon \
--port=0 \
--listen-address 192.168.1.10 \
--dhcp-range="192.168.1.50,192.168.1.150,12h" \
--dhcp-authoritative \
--enable-tftp \
--bootp-dynamic \
--dhcp-boot="lede-17.01.4-ar71xx-mikrotik-vmlinux-initramfs.elf" \
--tftp-root="$(pwd)"
 
User avatar
patrikg
Member
Member
Topic Author
Posts: 350
Joined: Thu Feb 07, 2013 6:38 pm
Location: Stockholm, Sweden

Re: Trying to unbrick my RG750GL.  [SOLVED]

Wed Dec 27, 2023 2:29 pm

:D :D :D

Now i have solved this problem, don't know why I have to use dnsmasq to serve the netinstall-cli bootp & dhcp, and then using netinstall-cli to install and flash the device,, but here you have the commands i have to use to get it working.
sudo systemctl stop NetworkManager.service
sudo ip address flush eth0
sudo ip address add 192.168.88.1/24 dev eth0

sudo ./netinstall-cli -a 127.0.0.2 netinstall-cli &
sudo dhtest -T 5 -o "Mips_boot" -i lo
curl tftp://127.0.0.1/linux.arm > netinstall.mips
sudo killall netinstall-cli

sudo dnsmasq --port=0 --no-daemon --interface=eth0 --dhcp-range="192.168.88.2,192.168.88.254,12h" --dhcp-leasefile=dnsmasq.leases --enable-tftp --dhcp-authoritative --bootp-dynamic --dhcp-boot=netinstall.mips --tftp-no-blocksize --tftp-root="$(pwd)" --log-dhcp --log-queries
dnsmasq: started, version 2.89 DNS disabled
dnsmasq: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
dnsmasq-dhcp: DHCP, IP range 192.168.88.2 -- 192.168.88.254, lease time 12h
dnsmasq-tftp: TFTP root is /home/patrik/Projekt/mikrotik  
dnsmasq-dhcp: 2778116566 available DHCP range: 192.168.88.2 -- 192.168.88.254
dnsmasq-dhcp: 2778116566 vendor class: Mips_boot
dnsmasq-dhcp: 2778116566 DHCPDISCOVER(eth0) 00:0c:42:a3:4a:b6 
dnsmasq-dhcp: 2778116566 tags: eth0
dnsmasq-dhcp: 2778116566 DHCPOFFER(eth0) 192.168.88.4 00:0c:42:a3:4a:b6 
dnsmasq-dhcp: 2778116566 requested options: 1:netmask, 3:router
dnsmasq-dhcp: 2778116566 bootfile name: netinstall.mips
dnsmasq-dhcp: 2778116566 next server: 192.168.88.254
dnsmasq-dhcp: 2778116566 sent size:  1 option: 53 message-type  2
dnsmasq-dhcp: 2778116566 sent size:  4 option: 54 server-identifier  192.168.88.254
dnsmasq-dhcp: 2778116566 sent size:  4 option: 51 lease-time  12h
dnsmasq-dhcp: 2778116566 sent size:  4 option: 58 T1  6h
dnsmasq-dhcp: 2778116566 sent size:  4 option: 59 T2  10h30m
dnsmasq-dhcp: 2778116566 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 2778116566 sent size:  4 option: 28 broadcast  192.168.88.255
dnsmasq-dhcp: 2778116566 sent size:  4 option:  3 router  192.168.88.254
dnsmasq-dhcp: 3598205160 available DHCP range: 192.168.88.2 -- 192.168.88.254
dnsmasq-dhcp: 3598205160 vendor class: Mips_boot
dnsmasq-dhcp: 3598205160 DHCPREQUEST(eth0) 192.168.88.4 00:0c:42:a3:4a:b6 
dnsmasq-dhcp: 3598205160 tags: eth0
dnsmasq-dhcp: 3598205160 DHCPACK(eth0) 192.168.88.4 00:0c:42:a3:4a:b6 
dnsmasq-dhcp: 3598205160 requested options: 1:netmask, 3:router
dnsmasq-dhcp: 3598205160 bootfile name: netinstall.mips
dnsmasq-dhcp: 3598205160 next server: 192.168.88.254
dnsmasq-dhcp: 3598205160 sent size:  1 option: 53 message-type  5
dnsmasq-dhcp: 3598205160 sent size:  4 option: 54 server-identifier  192.168.88.254
dnsmasq-dhcp: 3598205160 sent size:  4 option: 51 lease-time  12h
dnsmasq-dhcp: 3598205160 sent size:  4 option: 58 T1  6h
dnsmasq-dhcp: 3598205160 sent size:  4 option: 59 T2  10h30m
dnsmasq-dhcp: 3598205160 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 3598205160 sent size:  4 option: 28 broadcast  192.168.88.255
dnsmasq-dhcp: 3598205160 sent size:  4 option:  3 router  192.168.88.254
dnsmasq-tftp: sent /home/patrik/Projekt/mikrotik/netinstall.mips to 192.168.88.4
dnsmasq-dhcp: 3598205160 available DHCP range: 192.168.88.2 -- 192.168.88.254
dnsmasq-dhcp: 3598205160 vendor class: Mips_boot

sudo ./netinstall-cli -k Y7SR-Z6EA.key -a 192.168.88.4 -r routeros-7.13-mipsbe.npk
Version: 7.13(2023-12-14 10:08:11)
Will reset to default config
Interface Mask: 255.255.255.0
Using Client IP: 192.168.88.4
Using Server IP: 192.168.88.254
Starting PXE server
Waiting for RouterBOARD...
Installed branding package detected
Discovered RouterBOARD...
Formatting...
Sending package routeros-7.13-mipsbe.npk ...
Ready for reboot...
Sent reboot command

sudo systemctl start NetworkManager.service
And for the dhtest program.
https://github.com/saravana815/dhtest


Hurray

I found the main problem was, the Routerboard setting of boot protocol was set to dhcp, when I changed this back to bootp, then I can only use netinstall-cli to flash the device back to it's original manufacture firmware

Who is online

Users browsing this forum: No registered users and 5 guests