Author Topic: ozone - OpenZaurus cloning tool  (Read 5149 times)

dys

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
ozone - OpenZaurus cloning tool
« on: April 07, 2004, 07:47:20 pm »
Hi all,
        Just thought I\'d post to say that I have written a little script that makes a flashable image (clone) of an openzaurus filesystem. I wrote this for myself but it works good for me so I thought someone else might benefit from it so I thought I\'d release it

In a nutshell what it does:

- Can create a flashable image of an OZ system so as if the system needs reinstalling (for whatever reason) then it can be done with some apps/data etc already there.
- Can also create a regular backup (tarball) of an OZ system. This tarball can be encrypted if required.

What I\'ve found it useful for:

- Checking out new ROM\'s. I just took an image of the OZ with the old ROM and then could test out the new ROMs without worrying about loosing anything / doing a lengthy reinstall of old ROM + Apps if I didn\'t like the new ROM.
- As I play round LOTS with my zaurus there is always the chance I will kill it somehow. If I have a recent flashable image its very quick and easy to restore back to a good and happy zaurus

Anyway I thought that someone other than me might find it useful so here ya go. If you do like it / dont like it / want to see new features or bugfixes feel free to let me know and I\'ll try and do them.

!! --WARNING-- !!
I have only tested it on a 5500 but it \"should\" (cough) work on the other models that OZ works on as I have included the initrd build values from the OZ CVS. In any case if it does work on another model / you tweak the script to get it to work on another model it would be cool if you let me know.

It can be downloaded from my website :
http://www.iodboi.co.uk/ozone/

cheers
           dys

Snooby

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • http://
ozone - OpenZaurus cloning tool
« Reply #1 on: April 07, 2004, 09:45:45 pm »
Neat idea !!

Could you adapt the script to work with other ROMs ? I prefer use tkc 2.0 Alpha 3.0 on my Sl-5500 for daily use but am forever re-flashing to test new ROMs/apps etc and then re-installing tkc afterwards, this could save me a lot of time !!!
SL-5500 with tkc 2.0 Alpha 3.0 (/home on SD)
Kingston 256MB SD Card
Fujifilm 128MB CF Card
Wisgo 802.11b CF Wireless LAN Card
XP Pro, Redhat 7.3

dys

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
ozone - OpenZaurus cloning tool
« Reply #2 on: April 08, 2004, 03:59:26 am »
Yeah I was thinking about this the other night, I think all I would to know for each ROM are the mountpoints so as the script can get the partitions right. I\'m off to work now but I\'ll try and have a look into it tonight, hopefully it shouldn\'t prove too much of a prob.

Cheers
           dys

braindrop

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://
ozone - OpenZaurus cloning tool
« Reply #3 on: April 08, 2004, 12:56:08 pm »
wow! this sounds exactly like what ive been looking for. like that ghost thing from that one company right?  i just have to ponder any possible implications of having my /usr and /opt on sd partitions.

dys

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
ozone - OpenZaurus cloning tool
« Reply #4 on: April 08, 2004, 02:14:01 pm »
Quote
i just have to ponder any possible implications of having my /usr and /opt on sd partitions

all you would need to do is add ./opt/* and ./usr/* to the list of files that are being written to the file ozclone_exclude on the zaurus (its in an ssh\'d echo statement near the start of the ozclone function in the ozone script). This file list is used to exclude parts of the filesystem from the initrd image. Now the clone will not use the contents of /opt or /usr but still leave the mount points there. Upon flashing with that image all should be well as long as /opt and /usr on the SD haven\'t changed much.

I was going to put in some configuration options to exclude extra parts of the file system easily rather than having to hack up the main script. I\'ll try and put that in the next version.

Has anyone (other than me !!) successfully cloned an image and reflashed yet ??? I\'d appreciate feedback

cheers
         dys

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
ozone - OpenZaurus cloning tool
« Reply #5 on: April 08, 2004, 04:38:20 pm »
Nice idea. I\'m going to pester the Opie folks to add that to the backup application.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

dys

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
ozone - OpenZaurus cloning tool
« Reply #6 on: April 08, 2004, 05:15:19 pm »
Hi Mickeyl, at the moment it is run from the desktop PC (linux) but i\'m sure it can easily be done on the Z and the initrd created on CF/SD.  Is there a version of mkjffs2 that runs on the zaurus itself ?

dys

gester

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • http://
ozone - OpenZaurus cloning tool
« Reply #7 on: April 08, 2004, 05:37:29 pm »
This is a fantastic idea, I don\'t run OZ at the moment but I\'ll be happy to test this for other rom\'s as they become available.

gester.

dys

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
ozone - OpenZaurus cloning tool
« Reply #8 on: April 08, 2004, 08:45:33 pm »
Done a quick update, there is now a new configuration variable CLONE_MSK which makes it easier to alter which directories will NOT be included in the flashable image. This should make it easier for people who have non-standard filesystem layouts (e.g. /opt on a SD card) to use the cloning without having to dig through the main script. Check the README for details. Did a few other cleanups as well. Get the new version from the same place as last time:
http://www.iodboi.co.uk/ozone/

dys

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
ozone - OpenZaurus cloning tool
« Reply #9 on: April 09, 2004, 05:44:37 am »
Quote
Is there a version of mkjffs2 that runs on the zaurus itself ? 
Yeah, no problem in making one.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

dys

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
ozone - OpenZaurus cloning tool
« Reply #10 on: April 09, 2004, 05:52:37 am »
Quote
Yeah, no problem in making one.

Cool if you could send a copy to me I really appreciate it [ ozone[at]iodboi.co.uk]. I pretty sure with that I will be able to get a quick and dirty version of ozone going that will run on the zaurus itself.

cheers
          dys

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
ozone - OpenZaurus cloning tool
« Reply #11 on: April 09, 2004, 11:09:52 am »
Just built one with OpenEmbedded. The package is @ http://vanille.de/temp/mtd_20040409-r0_arm.ipk and contains the whole mtd utils.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

dys

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
ozone - OpenZaurus cloning tool
« Reply #12 on: April 12, 2004, 06:19:53 am »
Cheers Mickeyl, really appreciate you doing that. I\'ll get onto getting a version that runs natively on the Zaurus.

cheers
          dys

dys

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
ozone - OpenZaurus cloning tool
« Reply #13 on: April 12, 2004, 06:22:33 am »
Sorry Mickeyl but the ipk installs fine but is asking for version 2.3 of libc.so.6 and as far as I know I only have version 2.2 on my 5500 (OZ 3.3.5). Is there any chance of building against libc 2.2 ?? Sorry to be a pain

dys

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
ozone - OpenZaurus cloning tool
« Reply #14 on: April 12, 2004, 07:02:52 am »
I\'m looking into it. Must do it manually then, because we don\'t have the older libc in OpenEmbedded. I\'ll keep you posted.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.