[j-nsp] Sanitising m/t series routers?

Stacy W. Smith stacy at acm.org
Tue Jul 7 02:46:48 EDT 2009


On Jul 6, 2009, at 11:42 PM, Andrew Cheng wrote:

> Hi There
>
> I have to sanitise a large number of routers (ie, remove all configs,
> logs.. everything), and
> was wondering if there was a magic way of doing it remotely?
>
> There is the tedious way of going through and deleteing /var/log, all
> configs.. etc etc, but surely
> there must be a better way?


The best way would be to re-install JUNOS from install media, but  
that's not a very remote-friendly method because it requires hands to  
insert the install media. Otherwise, I am not aware of any supported,  
easy, or foolproof method.

The least cumbersome method I can think of is:

1) Connect via console and login to cli
2) start shell
3) su -
4) mount /altconfig
5) rm -rf /config/*
6) rm -rf /altconfig/*
7) umount /altconfig
8) exit
9) exit
10) request system partition hard-disk
11) request system reboot

The method above is totally unsupported. Use at your own risk. Do not  
pass 'Go'. Do not collect $200, etc.


FWIW, J-series offers a slightly easier method of:

1) Connect via console and login to cli
2) request system snapshot factory media <alternate media>
3) request system reboot media <alternate media>
4) request system snapshot factory media compact-flash
5) request system reboot media compact-flash

--Stacy





More information about the juniper-nsp mailing list