NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
mdgm-ntgr
Mar 22, 2012NETGEAR Employee Retired
OS Re-install via SSH
Would be nice to be able to initiate an OS re-install via SSH e.g. place flag file on OS partition, reboot and OS re-install takes place.
9 Replies
Replies have been turned off for this discussion
mdgm wrote: Would be nice to be able to initiate an OS re-install via SSH e.g. place flag file on OS partition, reboot and OS re-install takes place.
+1 for this.
Please!
I'm tinkering so much it's becoming a bit of nightmare at the moment.
Are there any commands I can run via SSH, on the Firmware? (Like is possible on most Community addons?)
Or, as a last desperate measure, a way to run the FACTORY command via ssh?- chirpaLuminaryOS re-install:
# touch /.os_update
Factory default:# touch /.os_install
- mdgm-ntgrNETGEAR Employee RetiredThanks.
chirpa wrote: OS re-install: # touch /.os_update
Factory default:# touch /.os_install
Thanks Chirpa, top man. :thumbsup:- mdgm-ntgrNETGEAR Employee RetiredNote the OS Re-install by flag file only extracts the contents of the OS. It does not reset the admin password etc. unlike an OS Re-install triggered by the boot menu.
- xeltrosApprenticeAlso note that if you do a factory reset, you will have to clic on the backup button anyway... So ok for reinstall, but that's a bit pointless for factory reset. Also be aware that network setting being reset you'd better have either a DHCP reservation or knowing where to look to find the new IP once rebooted (that said if network setting are not rewetted like mdgm said...).
I'd like an option to do a factory reset without losing the data, but knowing how the OS is built, I'm not likely to see it, the only way I found was to erase the system partition, reboot and reinstall the OS. Something I'm not comfortable to do although I guess booting without OS isn't much different than plugging empty drives for first boot and shouldn't represent a risk for the NAS itself. That said I'm not so sure that the raid config will be ok, so there is a real risk for the data.
Still linux is quite good for that kind of things, having a list of file to replace and the ability to extract the OS-image from flash and you could replace anything and erase file that are not on the list while retaining some configs (like raid, share list...) but that's a hell of a script to do (well the script itself isn't that bad but the testing and the management of the exclude list will be a nightmare). - mdgm-ntgrNETGEAR Employee RetiredI think you only need to click on the backup button if the factory default is triggered via the boot menu.
devs would use the /.os_install trick every day to reset machines running experimental code.
There is a way to format the OS partition and re-install the OS, I think, but the steps for OS6 must be more involved than for older OSes. - xeltrosApprenticePossible indeed, I didn't think of devs. But I wouldn't bet on it if I had no way to push that button like this would be the case if that's an off site device (which would be the most common use for SSH reset). At least without testing.
For the reset option, yep I believe that's possible and I feel right at home with bash. My problem is more that RN104 has no screen, no keyboard, no mouse, no DVD drive which severely limits recovery options. Although I think there is some USB recovery option, an official version would make the process way safer.
I don't need to reset right now (and hope I won't need to). For now I have all my private stuff backed up properly but some of the Data is available online only (MSDNAA, VMWare, Oracle, training vids...), so I can get it back (still have valid accounts) but it would take ages. I don't have money to mirror the device, so I'm staying like this and I believe many people are like me (if they even have important stuff backed up, which I doubt) so an official option would really make sense IMO. - mdgm-ntgrNETGEAR Employee RetiredThere are USB Boot Recovery files on downloads.netgear.com. USB Boot Recovery does not touch the disks and is only useful if there is a problem with the firmware on the internal flash.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!