Just as one might want to completely format or securely wipe a recently bought used (or even new) computer or hard drive, can this be done with a router too?
For example, with a computer one can connect a live system to overwrite the whole storage drive or even use other methods for suitable drives (like blkdiscard), and then re-install using the BIOS/UEFI.
If it is possible, would uboot survive in order to re-install/reflash OpenWRT? Does uboot run from the storage drive of a router or from a separate place like a BIOS/UEFI? If uboot would be deleted, could it be reinstalled? Or is it possible to re-install/reflash OpenWRT without uboot?
I am asking generally, but have in mind GL-iNet routers and their uboot web UI.
Thanks for any replies and thanks to everyone involved with OpenWRT.
Thanks for the reply. Should I assume from your answers that uboot would indeed be deleted if a router's storage drive/area was completely formatted or securely wiped (if that's possible to do)? Is that where uboot resides?
I gather from your reply that it is more common or at least a viable option to wipe all the sections on the flash/storage drive apart from the bootloader. Is that right?
With a regular external drive, I could simply connect via USB to a computer to see the partitions and wipe them using any number of programs/utilities. Would it be that simple with a router too?
I guess you are able to see the draft of my reply because I ended up changing that part before posting, but thanks for answering it.
I haven't yet delved into ssh but I will research it. I'll aim to connect via ssh, view the different sections/partitions, determine which are necessary for uboot and for re-installing OpenWRT, and then wipe the rest.
No, most people reset to default and perhaps flash the firmware again over that. To be clear, the "wiping" of flash chip is not akin to wiping a hard disk drive.
Lastly, to reiterate, it's not common practice to sell someone electronic paperweights when you've led them to believe they're purchasing a router.
A running uboot and OpenWrt firmware is needed to install OpenWrt - unless you're doing this to trick some unsuspecting buyer into purchasing a broken device.
@lleachii I do appreciate that you took time to reply to my post, but I'm not sure why you keep suggesting over and over again that I might be planning to fraudulently sell someone a bricked router. I clearly stated that this is for when purchasing a router.
In general it is a bad idea to wipe the flash / partitions of a router before installing OpenWrt. Some devices store wifi radio calibration data on the flash which would be impossible to restore afterwards. OpenWrt will overwrite to required partition during the install process which will remove any of the existing data from the manufacturers original firmware.
@konus Thanks for the information. My use case for the specific router I have in mind right now doesn't include wifi, but I understand that you still generally don't recommend wiping any part of the flash.
I would recommend to just follow the install instructions for the specific device. Use either the OpenWrt device page if it exists or otherwise the information in the git commit which add device support. Read through the instructions and if anything is unclear you can ask questions in the forum.