Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in MTD5 Clean script #9

Open
InvisiBilldotnet opened this issue May 17, 2022 · 0 comments
Open

Error in MTD5 Clean script #9

InvisiBilldotnet opened this issue May 17, 2022 · 0 comments

Comments

@InvisiBilldotnet
Copy link

The ssh command used in secret sauce to clean MTD.ps1 (line 17) contains six commands to run. Two of the commands are reversed, which causes it to not actually work.

1 backs up mtd5.
2 makes a temporary directory for mounting the mtdblock.
3 mounts mtdblock5 to the temp dir.
4 syncs and unmounts the mtdblock.
5 removes the files from the mount point.
6 writes nvram and reboots the router.

4 & 5 should be swapped. You need to remove the files from the temporary mounted filesystem, then sync the changes back and unmount it. The copy of the script shown to the user is correct, but the actual ssh command doesn't match it.

Here is how line 17 should look instead.

ssh -oHostKeyAlgorithms=+ssh-dss -oKexAlgorithms=+diffie-hellman-group1-sha1 -oStrictHostKeyChecking=false [email protected] "cat /dev/mtd5 > /jffs/mtd5_backup.bin; mkdir /tmp/asus_jffs; mount -t jffs2 /dev/mtdblock5 /tmp/asus_jffs; rm -rf /jffs/.sys/RT-AC68U /tmp/asus_jffs/*; sync && umount /tmp/asus_jffs; nvram unset fw_check && nvram commit && reboot"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant