On 05/13/14 16:04, Carruth, Rusty wrote: > Ok, pardon my dumbness, but let me back up a bit. > > First, lets look at the switch/router things: > > (And I should first ask what flash controller is being used – does it > automatically do ‘read scrub’ or other techniques to get around this > whole issue? If so, you don’t need to do anything…) > > Can you log in (as root, or become root) on the switches/routers? > > If so, can you ‘see’ all the files you’d have to change? > > If so, why not copy ‘in place’. That is, copy the whole thing (or parts > of it) to a new directory, then rename everything to the new place. > > So, for example, lets say you had /bin, /etc, and /var you wanted to do > this to. /bin has 200M, /etc has 10M, and /var has 1G. Your flash has > 2G free. > > So, ‘mkdir /bin.new /etc.new /var.new ; cd /bin ; tar cf – . | ( cd > /bin.new && tar xf - ) ;cd /etc; tar cf – . | (cd /etc.new && tar xf -) > ; cd /var ; tar cf - . | (cd /var.new && tar xf -)’ > > That gets you 3 new dirs., /bin.new /etc.new and /var.new. Do your MD5 > sums across the world and compare. > > Now, rename everything: ‘mv /bin /bin.old ; /bin.old/mv /bin.new /bin ; > mv /etc /etc.old ; mv /etc.new /etc ; mv /var /var.old ; mv /var.new /var’. > > Ok, so now new is new and old is old. Delete old as you see fit, but > probably after a reboot ;-) > > Beware that when you move /bin suddenly you won’t have mv available any > more, so you have to say /bin.old/mv to be able to use it. > > No new kernel needed. > > On the other hand, if you have no choice but to make a kernel, > ‘everything you need’ should be there when you get the kernel source. > Other than special hardware that requires special drivers, just ‘build > it and they will come’. Or rather, build it and it will run. All the > majic of linking and all that is taken care of for you. The only thing > where absolute addresses is needed is (as far as I can remember right > now) just hardware. > > Good luck, Mr Phelps! > > Rusty If it that easy, then maybe migrate through the files in something like 1K chunks with dd, writing the next 1K chunk from the file in flash to a 1K file on RAM Disk then back. I think this is just for the few files in /boot, to refresh the kernel, yes? The kernel is running in RAM, so you can write to it the kernel binary file in /boot while running. --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org To subscribe, unsubscribe, or to change your mail settings: http://lists.phxlinux.org/mailman/listinfo/plug-discuss