OpenWrt Forum Archive

Topic: RB133: How to update kernel / rootfs?

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

what the common way to update a running Kamikaze svn on a Routerboard 133?
Is there any way to do so without using Netboot again?
X-Wrt on the upgrade screen asks for a firmware image to upload - but I've got kernel and rootfs in separate files ...?
Furthermore I'm not sure that X-Wrt knows about the peculiarities of Routerboot (AFAIR: kernel as elf image in the first four MB of a yaffs2 fs)

You should be able to update the kernel easily enough.  Just mount the kernel partition and overwrite the old kernel with the new one.

As for the fs, you could probably untar the new rootfs.tgz onto /, but I'm not sure how safe it would be smile  If you try it out, let us know what happens.

@Wodin
Agreed for the kernel part.

With the rootfs I'd rather follow the approach of Sven-Ola with the firmware-burn script in the Freifunk firmware, which
first kills all processes (killall5 -TERM), stops the WLAN interface, unloads some kernel modules, creates a minimal rootfs
in /tmp (just busybox, some libraries and mtd,mtdkill), chroot to this minimal rootfs and overwrites the flash from there.

Untarring the new .tgz on / could leave old files which were removed in the new tgz and destroys the shell and tar executables
currently running.

I agree that sounds safer. Currently running stuff should be ok, but new processes spawned by old ones when libc has changed could break.

The easy way is to keep your network boot .elf file ready to be served up by your tftp server and boot from the network, then load the kernel and file system the same way you did initially. Just takes a couple of minutes if the dhcp and tftp servers are already setup and running.

Rob

The discussion might have continued from here.