Page 1 of 4

Customize your own ZMliveCD

Posted: Mon Oct 11, 2004 7:36 pm
by rdmelin
First of all, why would you want to? Well, I can think of several reasons. I'm sure you all can come up with a few more. Here is a short list.

1. You want to peddle some Zoneminder systems to your local security conscious businesses. You want to customize the interface with your company logos and preconfigure for your hardware.

2. You want to have a preconfigured livecd that you can leave watching your cubicle while you are out to lunch.

3. You have written some other LAMP type software package, and would like a demo / installer CD , and starting with ZMliveCD is easier than starting from scratch.

4. You like the livecd, but can't stand my choice of desktop settings.

5. Etc. etc. etc.

So anyway, if anyone expresses interest, I will post some howto info in this thread. :)

Posted: Tue Oct 12, 2004 5:13 pm
by tommy
Yes I'm interested.

I can only boot the livecd using "nodetect". Once I do get booted up I can load the appropriate modules etc. I'ld like to customize the cd so I wouldn't have to do this.

thanks
tommy

Posted: Tue Oct 12, 2004 7:20 pm
by rdmelin
OK, coming up very shortly.
BTW are you using the latest (1.19.5) version of the CD?

regards,
Ross

ZMliveCD HOWTO

Posted: Tue Oct 12, 2004 9:44 pm
by rdmelin
To remaster the ZMliveCD you begin by installing from the CD to a partition. I use a partition 2.5 GB in size. This is enough if you can use another partition for mklivecd temp files and the final iso file. If you want to keep everything together better start with 3.5GB.

After installation is complete, reboot into the new system.

There are some files in /home/user/bin that run mozilla-firefox displaying the help documents. They are run by Desktop files in .kde/Autostart. If you trace them out you will find a little shell game that shuffles the Desktop links from /home/user/Documents/scripts to .kde/Autostart in such a way that one file is displayed on the livecd and another is displayed after installation.
Anyway, open a konsole and run the command "bin/installer". Then press the "Cancel" button to close the livecd_installer window. Now all the Desktop entries will be shuffled back in preparation to build another CD.

The command "mklivecd new.iso" will now build a new livecd. (must be run as root, or use sudo ) "mklivecd --help" will display a message detailing all the command line switches. I have wrapped the command in a simple shell script in "/home/user/bin/mkzmcd" . You can just edit this file to reflect your path to temp files and the final iso. You must mount any partitons manually if used for temp and the final iso.

Now you can make any changes you want to the system. Then run "sudo bin/mkzmcd".

That's it. Really. Have fun. :)

Posted: Thu Oct 14, 2004 8:36 pm
by tommy
Ross:
Thank you for your reply re: Remastering.
I was looking for a way to make alteratiions without installing. I am using the latest version of the live cd and am attempting to run it "live".
I thought there might be a way to save the configuration to floppy or to mount the iso image and make alterations that way. I prefer not to install to hd.
Currently I am booting with nodetect and making changes afterward. If I am successful I could put these in to a script to run from floppy after start up. I think my problems are due to my Pico 2000 video capture card or my nvidia video card. I gather from the forums that these can be a problem.

In the meantime I have a different issue. I am trying to compile a driver for my usb webcam.
I can't get past here:
make -C /lib/modules/`uname -r`/build SUBDIRS=/home/user/spca50x modules
make[1]: Entering directory `/lib/modules/2.6.7-2.tmb.3mdk/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/2.6.7-2.tmb.3mdk/build'
make: *** [default] Error 2
Is there a directory missing from the live cd or do I have to massage the makefile in some way?

thanks
tommy

Posted: Thu Oct 14, 2004 10:54 pm
by rdmelin
Is there a directory missing from the live cd or do I have to massage the makefile in some way?
I have built third party modules for intel chipset modems from the installed system. I've never tried building while running from the livecd, but I think the environment for building kernel modules is complete, so I know no reason it wouldn't work. If you point me to the package you are trying to build I will try it here.
I thought there might be a way to save the configuration to floppy or to mount the iso image and make alterations that way.
If you have a usb thumb drive you could try booting with home=usb which will copy the files from home onto the usb drive. Then try creating a script to change settings, install modules, etc. Create a Desktop entry in .kde/Autostart on the usb drive that runs the script. I have not tried this yet myself, but will try it soon. Let me know if it works for you.

Posted: Thu Oct 14, 2004 10:58 pm
by tommy
Ross:

This is the project for the driver. I used the lates CVS.

http://sourceforge.net/projects/spca50x/

thanks
tommy

Posted: Fri Oct 15, 2004 12:09 am
by rdmelin
I was able to build and install the module without any errors or warnings but could not load it.
Error message:
FATAL: Error inserting spca50x (/lib/modules/2.6.7-2.tmb.3mdk/kernel/drivers/usb/media/spca50x.ko): Invalid module format

It looks like 2.6.x support for this module is still very experimental.

I also tried the home=usb thing with no luck. I will look at this more when I have more time.

Ross

Posted: Fri Oct 15, 2004 12:57 am
by rdmelin
I was able to build and install the module without any errors or warnings but could not load it.
Error message:
FATAL: Error inserting spca50x (/lib/modules/2.6.7-2.tmb.3mdk/kernel/drivers/usb/media/spca50x.ko): Invalid module format
The module will load if you use "modprobe -f spca50x".
I have no idea if it works, as I don't have a usb webcam.
If you wan to to pursue the matter you can download the module package precompiled here :http://www.elltel.net/melins/spca50x.tgz
You would need to unzip, cd, and do "make install", then "modprobe -f spca50x". It wont work to use insmod, so you must do make install and them modprobe. I dont think you can do make install on the livecd, as /lib is read only. So this may be of no use to you.

Ross

Posted: Fri Oct 15, 2004 3:35 pm
by tommy
Ross:
Thanks for compiling the driver for me.
However you were right. I cannot use it for the reasons you mentioned.

I use an earlier version of the driver for my main ZoneMinder installation on my home machine. It has a 2.4.xx kernel and all works well. I have 4 outdoor cameras connected to a video capture card and use the usb webcam for indoor surveillance.

If I could get the webcam working under your live cd I was hoping to have the ultimate in portability. All I would need to bring along to almost any machine would be a usb camera and the cd. No need for the video capture card.

Perhaps in the future.

Thanks again
tommy

Posted: Sat Oct 16, 2004 5:47 am
by tommy
Ross:
I have made some progress.
I copied the entire kernel source tree to /home/user. This gave me full read/write access.
I then compiled the driver using this make statement:
make -C /home/user/linux-2.6.7-2.tmb.3mdk SUBDIRS=$PWD INSTALL_MOD_PATH=/home/user modules
This created the object module in my user directory.
When I tried to insmod it, I got the "invalid module format" error.
When I did a modinfo spca50x.ko, it returned this:
description: SPCA50X USB Camera Driver
license: GPL
vermagic: 2.6.7-2.tmb.3mdk preempt 586 gcc-3.3
When I did a modinfo on any other module I got something similar to this:
filename: /lib/modules/2.6.7-2.tmb.3mdk/kernel/drivers/cdrom/cdrom.ko.gz
license: GPL
vermagic: 2.6.7-2.tmb.3mdk preempt 586 gcc-3.4
Notice the vermagic number differs by the gcc version number. Is it possible that the version of gcc on the distribution, which appears tobe 3.3, is not the version the kernel was compiled with?
I went to the vermagic.h file and hard coded gcc-3.4 into it. I then recompiled the module . This time it had the matching vermagic number and I was able to insmod it. It actually works.
In short, should the live cd have the same compiler version as that used to compile the kernel, or is there a way to bypass the checking of the version magic numbers?

thanks
tommy

Posted: Sat Oct 16, 2004 1:27 pm
by rdmelin
Very fine bit of sleuthing there. Clearly you found the problem. The kernel on the livecd came from mandrakes development tree (Cooker), and since it worked without complaint I didn't bother to rebuild it on Mandrake 10.0. My current desktop / development system was installed from the livecd, and I have compiled a number or modules without running into this error before.

Since you have a working driver for these webcams, could you post it somewhere so users can download it?

Thanks, and best regards,

Ross

Posted: Sat Oct 16, 2004 3:54 pm
by tommy
Ross:
I don't have access to any web site but I would be happy to send it to anyone who does.
thanks
tommy

Posted: Sat Oct 16, 2004 6:49 pm
by zoneminder
You can mail it to me and I'll make it available on this site if you like. Can you also include a short description of exactly what it is and who might need it.

Phil,

Source file on Live CD

Posted: Wed Aug 24, 2005 8:46 am
by bujia
Hi!
I have installed LiveCD on HardDisk, now I want to modify some file, source file, in order to create a personalized distribution of ZoneMinder, with my logo etc.... Where can I found source file in the directory tree of my installed system? Are There source fille or not?
Thanks in advance!
Bye
Alessandro