Turn openSUSE 11 Live CD into a ZENworks Imaging Tool

0 Likes

Requirements:




  • Linux Box

  • openSUSE 11 Live CD ISO

  • ISO Editor.

  • squashfs 3.1 tools for Linux

  • ZENworks boot cd / iso



The plan is to take an openSUSE Live boot CD and add the imaging commands and libraries to it.




  1. Copy the ZENworks boot disk ISO onto the Linux box, mount it and copy the root image off the CD.


    The root image path is mnt/boot/i386/ with mnt being the directory that the ISO is mounted.



  • Now we need to mount the root image and copy what we need out of it.


    In the directory that you copied the root image to, use these commands:

      mv root root.gz
    gunzip root.gz
    mkdir image
    mount -o loop root image # this will mount the root archive
    cd image
    # now we want to copy these files
    image/usr/lib/libhwresolve.so.2.2
    image/usr/lib/libtvision.so.0
    image/usr/lib/libhd.so.12
    image/usr/lib/libzisd.so
    image/usr/lib/libzmgtool.so
    image/usr/lib/libzmgerror.so
    image/usr/lib/libdbus-1.so.2
    image/lib/libsysfs.so.1
    image/lib/libc-2.4.so
    image/bin/img



    Now that we have the tools we need the next step is to get the openSUSE Live CD ready.


  • On the Linux box again take the openSUSE Live CD ISO and mount it.


    Copy openSUSE-11.0-read-only.i686-2.7.0 from the top directory of the ISO, this is the Live CD root image that we will be adding the tools to.



    In order to extract and edit openSUSE-11.0-read-only.i686-2.7.0 we need the squashfs tools, more specifically squashfs version 3.1.



  • unsquashfs openSUSE-11.0-read-only.i686-2.7.0



    This will create a directory named squashfs-root.


  • Inside squashfs-root you should see the root directory for the Live CD.


    Move into the var directory, create a directory (mine is img-tools) and copy all the files we got from the ZENworks boot CD.



  • Now we need to add the libraries and the img command, all that is necessary is to copy the files.

    libhwresolve.so.2.2 /usr/lib/libhwresolve.so.2.2
    libtvision.so.0 /usr/lib/libtvision.so.0
    libhd.so.12 /usr/lib/libhd.so.12
    libzisd.so /usr/lib/libzisd.so
    libzmgtool.so /usr/lib/libzmgtool.so
    libzmgerror.so /usr/lib/libzmgerror.so
    libsysfs.so.1 /lib/libsysfs.so.1
    libdbus-1.so.2 /usr/lib/libdbus-1.so.2
    libc-2.4.so /lib/libc-2.4.so
    img /usr/bin/img




  • Inside the directory img-tools create a link to libc-2.4.so
    ln -s  libc-2.4.so libc.so.6 



    The image now is ready to be repacked and added back to the Live CD ISO.



    To repack the squashfs file system run:
    mksquashfs squashfs-root openSUSE-11.0-read-only.i686-2.7.0



    All that is left is to add the read only file system back into the ISO and reburn it and that is it.



    Once booted to the CD run sudo img or su as root and you are ready to image.




Labels:

How To-Best Practice
Comment List
  • Thanks for the instructions! I'm in the process of trying them out.

    Something that, for me, was difficult to find was how to create the ISO. Here is the command I used; hopefully it will be helpful for others.

    First, copy all the files from the openSuSE boot cd to a directory, here called suse/ . Then replace the openSUSE-11.0-read-only.i686-2.7.0 file on there with the one that you created. Then run the following command:

    sudo genisoimage -b boot/i386/loader/isolinux.bin -c boot/i386/loader/isolinux.cat -no-emul-boot -boot-load-size 4 -boot-info-table -l -R -r -o opensuseboot.iso suse/

    This will name the outputted image "opensuseboot.iso". Some comments on the options:

    The -b and -c options give the boot image and boot catalog. The files need to be in relation to the ISO's root, not your current working directory.

    -l allows long filenames

    The -R and -r options set things for the Rock Ridge protocol.

    Hope this helps!
  • in reply to MigrationDeletedUser
    Since Zen 7 does not seem to use them I decided to just continue on with your steps. The biggest challenge I encountered (not counting installing squashfs) was getting the modified Open SUSE squashed file back into the ISO. For some reason WINISO doubles the size when you replace the file even though it shows the size as 697 MB inside the program itself. I ended up using ISOMaster for that piece. I booted with the live CD and ran img after su in a terminal window and did a restore from a Zen server with no errors. Oddly enough it does not result in a bootable machine so I am going to play around a bit more and see if there are other files that need to be added for this to work with Zenworks 7 imaging.
  • I suppose this would help with the lack of device support in the official ZMD boot CD's. Cool idea! What will Novell tech support do with all of the time this frees up? Hey Novell how about posting the iso on download.novell.com?
  • in reply to MigrationDeletedUser
    It would make sense to include that in the initial article. Sorry about that. The version I used was 10 from zcm. I didn't think about it at the time but those to versions appear to be very different.
    I can email them If you need.
  • The version 7 bootcd.iso I have does not have any files I can find named libzmgtool.so or libzmgerror.so in the location you specify.
  • To the previous commenter, the obvious path they should be taking is add an AutoBuild of the Zen Imaging CD.

    That is, for every build of SUSE (including OpenSUSE) they should be building a Zen Imaging distro and make it available the same way.

    Then you can always get the latest build with the latest drivers, with very little extra work, plus, you validate that changes do not break Zen as well.
  • Thank you !
  • I waiting that Novell releases unoffical/unsupported Zenworks Bootcd build of OpenSuse. Next best thing what i can get is this kind of guide that helps me to create my own bootcd...

    ...big thanks to sgreenmyer!! I really hope that this works for me!

    Next to Novell:
    How it is possible that this kind of enterprise class software like ZfD uses old kernel (and nic/chipset drivers) that does not work with new workstations! Our "new" workstations are more than half year old (HP enterprise brand). This is not new problem, so i can't understand why isn't fixed yet.

    Why novell does not offer bootcd that includes newest kernel and drivers? This version does not need be offically supported (of course), but so what if it works!! Now I have supported bootcd that does not work with our new computers, because it includes too old kernel. So compliting new drivers is not solution.

    Zenworks is great product, but workstation imaging (bootcd) is really pain in real life!
Related
Recommended