diff/patch rootfs
Erez D
erez0001 at gmail.com
Thu Jul 10 10:25:36 IDT 2014
On Thu, Jul 10, 2014 at 9:54 AM, Oleg Goldshmidt <pub at goldshmidt.org> wrote:
> Erez D <erez0001 at gmail.com> writes:
>
>> hello
>>
>> i am dealing with rootfs images i install on embedded linux
>>
>> from time to time i update the rootfs - add some file, remove other,
>> update others, mknod etc ...
>>
>> currently, when i do this, i need to reinstall the image
>>
>> i am looking to create a patch, i can patch an old rootfs to update it
>>
>> however, diff does not handle create file, remove file, special files
>> and binary files very well
>>
>> i am looking for a tool that can do that.
>>
>> anyone ?
>>
>> btw: distro is emdebian/debian on armel
>
> Proper (IMHO) solution - package your updates (in .deb in your case, I
> presume). This includes modifying existing packages if you need to roll
> your own stuff - to avoid clashes.
interesting idea, altough seems trivial, it never came into mind
however:
1. will take a lot of work (note that i overwrite some of debian's
file with my own, and will need to resove this)
2. will be a big patch (and i pay by the byte, have low flash/ram. and
must be done offline)
currently i need something simpler, which will be small, offline
>
> Barring that, rsync is the first thing that comes to my mind.
that was my first idea, however it need to be done offline.
searched to see if rsync creates diffs, and never found any info about this ...
>
> I assume I don't need to remind you to be very, very careful, especially
> with --delete. ;-)
sure
>
> I suppose if you screw up an update you can still reinstall as today,
> right?
yes, if i have access to the product (which is not always true)
>
> Possible enhancements (going on a tangent here):
>
> I don't know your circumstances, nor am I familiar with emdebian, but
> personally I'd prefer to get as much as possible packaged from the
> distro and not touch rootfs by hand, and keep my own stuff on a separate
> partition (that I can clobber, e.g., with rsync, even multiple times if
> things go wrong).
no problems with emdebian
>
> I realize this may not be an option, so back to rootfs. Have you
> considered having 2 partitions side-by-side and swapping old for new
> (that you have, e.g., rsync'ed, etc.) with the possibility of rolling
> back? Once new is running you can update old, too, if it is needed to
> prepare for the next upgrade. The second partition will cost you some
> space, of course...
think of a software patch to a filesystem, like (god forbid ;-)
windows-update ;-)
>
> --
> Oleg Goldshmidt | pub at goldshmidt.org
More information about the Linux-il
mailing list