[BusyBox] Live updating busybox?

tom at ceisystems.com tom at ceisystems.com
Mon Nov 17 17:32:22 UTC 2003


Steven,
	You'll run into a few problems here.  I've developed a method to
update routers built on BusyBox, and it seems to work well.  Here's what
you're going to have to do (at least).

	1) Assemble a pivotroot environment.  In other words, build a
root environment with the _new_ busybox.
	2) Kill all "services" that are running in the original root
environment.
	3) chroot & pivotroot to your new environment
	4) copy your _new_ busybox into the old root environment
	5) Cleanup any dead symlinks, create any new symlinks, etc.
	6) Reboot the system
	7) Cross your fingers, eyes, toes, arms, legs, and anything else
you can find in the room.

	That should get you going.  Of course, you probably don't _have_
to reboot.  I reboot because I replace more than just BusyBox (init
scripts, etc.).  Good luck.

Thomas Cameron
CEI Systems


-----Original Message-----
From: busybox-bounces at mail.busybox.net
[mailto:busybox-bounces at mail.busybox.net] On Behalf Of Steven Scholz
Sent: Monday, November 17, 2003 8:48 AM
To: Busybox
Subject: [BusyBox] Live updating busybox?

Hi there,

I am using busybox in embedded systems and want to update it.

I understand the just overwriting the busybox binary could cause some
trouble.

One suggestion I got was to store the new version of busybox in let's
say 
/bin/busybox.new and then "mv /bin/busybox.new /bin/busybox" where "mv"
must not 
be the busybox applet but a standalone binary.

So I have a few more questions:

1.) If I do the copy and move in a shell script, then this script would
be
     executed by (the old version of) busybox ash. But what happends
when I
     replace the busybox binary which is actually just executing  the
shell
     script?

2.) Should I kill busybox inetd, httpd, telnetd etc before updating
busybox?

3.) When updating busybox, is it better to have soft- or hardlinks to
     /bin/busybox for all the applications?

Thanks a million!

Steven


_______________________________________________
busybox mailing list
busybox at mail.busybox.net
http://busybox.net/mailman/listinfo/busybox





More information about the busybox mailing list