See https://openwrt.org/docs/guide-quick-start/sshadministration
I use Windows Powershell.
I get something different, is this ok?
You should use PuTTY. Have you installed app?
I try putty right now and i get same results.
What result? Have you followed manual?
This:
I am afraid to continue until someone can told me that this is ok, also, if i install this, how can i back to stock if i do something wrong?
Also, will i get wifi automatically turned on or i must do something to turn on wifi?
Also, on this tut:
Summary
Actual installation via SSH:
- Copy
openwrt-ramips-mt7621-mir3g-squashfs-kernel1.bin
andopenwrt-ramips-mt7621-mir3g-squashfs-rootfs0.bin
optained from the OpenWrt download site to a USB drive or wget it directly via SSH to a location (/tmp
for example) on the router - Switch to
/extdisks/sda1/
(if copied to an USB drive) or to the folder on the router like/tmp
if downloaded directly on the router - Run
mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
- Run
mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
- Run
nvram set flag_try_sys1_failed=1
- Run
nvram commit
- Run
reboot
I go there and find for files and download? http://downloads.openwrt.org/releases/18.06.5/targets/
Again, sorry for my non perfect english so i must ask more times to be sure.
Thanks
Hello, what is your nationality?
If you are french, I have a very well detailed tutorial to install openwrt on the mi routeur 3G.
In this case, since you have access in ssh :
#Download the kernel1 and rootfs0 images to a FAT32 USB drive and connect the USB drive to the router. The following have been confirmed to work:
-
On the firmware run `cd /extdisks/sdax (x = the number of usb drive)
-
Run:
mtd write openwrt-18.06.5-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
-
Run:
mtd write penwrt-18.06.5-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
-
Run:
nvram set flag_try_sys1_failed=1
-
Run:
nvram commit
-
Run:
reboot
-
The router should now boot to OpenWrt
Be careful not to conflict with the ip of the internet box, openwrt by default uses ip 192.168.1.1, I configured my internet box on ip 192.168.10.1
In ssh, install Luci (webui) : opkg update && opkg install luci
Go to : http://192.168.1.1/cgi-bin/luci/admin/system/flash and update with the file downloaded above.
More infos : https://openwrt.org/toh/xiaomi/mir3g
I recommend you to install Breed: https://breed.hackpascal.net/breed-mt7621-xiaomi-r3g.bin Install it now, in stock firmware with SSH access, download to /tmp dir with wget:
cd /tmp
wget --no-check-certificate https://breed.hackpascal.net/breed-mt7621-xiaomi-r3g.bin
Check md5sum:
md5sum /tmp/breed-mt7621-xiaomi-r3g.bin
Now flash Bootloader:
mtd write /tmp/breed-mt7621-xiaomi-r3g.bin Bootloader
OK, now as @Zeymon:
Actual installation via SSH:
-
Copy
openwrt-ramips-mt7621-mir3g-squashfs-kernel1.bin
andopenwrt-ramips-mt7621-mir3g-squashfs-rootfs0.bin
optained from the OpenWrt download site to a USB drive or wget it directly via SSH to a location (/tmp
for example) on the router -
Switch to
/extdisks/sda1/
(if copied to an USB drive) or to the folder on the router like/tmp
if downloaded directly on the router -
Run
mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
-
Run
mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
-
Run
nvram set flag_try_sys1_failed=1
-
Run
nvram commit
-
Run
reboot
See manual:
Recovery to stock for R3G
Assuming you used the above installation instructions you will have a stock kernel image in system 1. If it can be booted then it may be used to perform a stock firmware recovery, thus erasing OpenWrt completely. From a 'working' OpenWrt state (even failsafe)
Many times easier like that, I hadn't thought of it
I corrected the error, I had copied it without paying attention, thanks for the fix.
Thanks everyone from willing to help me. I am from Eastern Europe.
When i get ssh, can i delete this and in that usb put kernel1 and rootfs0 and than back to router?
How to Switch to `/extdisks/sda1/?
Just to type on putty that?
What is /tmp?
What is breed, what is differences if i install this or not?
If i install now, do i automatically get enabled wifi or i must do something else to enabled it?
I don't understand your question.
cd /extdisks/sda1
pwd
/tmp - is just folder in filesystem of router, it is located in RAM. For your purpose it is just place for downloading firmware.
Breed has good function of emergency firmware recovery.
You can configure WiFi, as any other features of OpenWRT.
Lets check if i good understand everything, first unlock ssh, and do everything until i go there:
Then i back usb from router to pc, and put openwrt-ramips-mt7621-mir3g-squashfs-kernel1.bin
and openwrt-ramips-mt7621-mir3g-squashfs-rootfs0.bin
USB drive and back to router
Then just type /extdisks/sda1/
Type mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
Type mtd write openwrt-18.06.2-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
Type nvram set flag_try_sys1_failed=1
Type nvram commit
Type reboot
Then type my ip to browser and configure everything.
Is that it?
My english is not my nature language so sorry for a lot of questions
Install Breed initially.
See output of
cd /extdisks/sda1
ls
Current version is 18.06.5, so correct names of files.
just after get SSH acces to install breed?
should i need to type all
cd /tmp?
Or dont type tmp?
I am not sure where is /tmp filesystem of router
Yes, install Breed just after SSH.
Read it firstly: https://www.ubuntupit.com/the-50-best-linux-commands-to-run-in-the-terminal/
Please, ask question one time.
See again:
cd /tmp
wget --no-check-certificate https://breed.hackpascal.net/breed-mt7621-xiaomi-r3g.bin
There is precise command, don't ask stupid questions like
cd /tmp?
Or dont type tmp?
There's one thing I don't understand, he has ssh access with the stock firmware ? (no ssh if I remember correctly)
Where did he install the developer firmware ? With this procedure :
By going through breed, it avoids the procedure of going through an xiaomi account and app?
I didn't know breed, thank you for enlightening me.
Where did he install the developer firmware?
Setup the router and install a dev firmware...
It is needed to get SSH access to the router. Or do you have SSH access without any manipulation?
The process of going through mi account and app serves to get SSH access.
So I repeat my question, do you have SSH access without any manipulation?
No, that's what I was just asking you.
When I installed openwrt on my router (it's been a while already), I followed this instruction: fake xiaomi account + app for linked my router, then deleted the router from the app afterwards, forced to go through there to get ssh access.
So @stefs has already done this step, but what I was asking you is what is the difference between Breed and the classic installation I mentioned above?
I installed dev filmware earlier.
I am not sure where is /tmp filesystem of router?
Can i just put this to usb drive?
What to type then?