Difference between revisions of "Live CD"

From ElphelWiki
Jump to: navigation, search
(Boot and use)
 
(65 intermediate revisions by 9 users not shown)
Line 1: Line 1:
The Live CD based on [http://knopper.net/knoppix/ Knoppix] which is based on [http://www.debian.org/ Debian].
+
{{Manual legacy_pages}}
 +
 
 +
{{Manual Header}}
 +
The Live CD is based on [http://knopper.net/knoppix/ Knoppix] which is based on [http://www.debian.org/ Debian].
 
== Structure ==
 
== Structure ==
The Live CD contain multipurpose GNU/Linux software and a special software for elphel cameras.
+
The Live CD contains [[Camera_software#Common_software_for_video| multipurpose GNU/Linux software]] and [[Camera_software#Special_software| special software for elphel cameras]].
 
The software is organized as debian packages.
 
The software is organized as debian packages.
Our debian packages are presented on our [http://sourceforge.net/projects/elphel/ SourcreForge page] in
+
Our debian packages are presented on our [http://sourceforge.net/projects/elphel/ SourceForge page] in
 
the [http://sourceforge.net/project/showfiles.php?group_id=105686&package_id=130302 Live-CD] and [http://sourceforge.net/project/showfiles.php?group_id=105686&package_id=120785 Players] sections.
 
the [http://sourceforge.net/project/showfiles.php?group_id=105686&package_id=130302 Live-CD] and [http://sourceforge.net/project/showfiles.php?group_id=105686&package_id=120785 Players] sections.
  
Root file system of Knoppix is compressed and cloop kernel module is needed to decompress it on-fly when it is necessary.
+
The root file system of Knoppix is compressed and the cloop kernel module is needed to decompress it on-the-fly when it is necessary.
The CD contains comressed root file system, boot loader and flash tarballs for different modeles of our cameras.
+
The CD contains the compressed root file system, boot loader and flash tarballs for different models of our cameras.
  
If you already have installed Debian or Knoppix system, you can add some our debs to work with our cameras.
+
If you already have a Debian or Knoppix system installed, you can add some of our debs to work with our cameras.
  
<ul>We recommend to install following packages from our SourceForge page:
+
<ul>We recommend installing the following packages from our SourceForge page:
 
<li>[http://prdownloads.sourceforge.net/elphel/elphel-pack_1.4.0.4_i386.deb?download elphel-pack]
 
<li>[http://prdownloads.sourceforge.net/elphel/elphel-pack_1.4.0.4_i386.deb?download elphel-pack]
It has utilites to configure network specially for cameras (for rtp stream receiving), search cameras in the LAN, update flash and helper for Mozilla/Firefox to work with .sdp files.
+
has utilities to configure the network specifically for the cameras (for rtp stream receiving), search for cameras on the LAN, update flash, and a helper for Mozilla/Firefox to work with .sdp files.
 
<li>[http://prdownloads.sourceforge.net/elphel/netcardconfig-knoppix_0.5-20-elphel-3_all.deb?download netcardconfig-knoppix elphel clone]
 
<li>[http://prdownloads.sourceforge.net/elphel/netcardconfig-knoppix_0.5-20-elphel-3_all.deb?download netcardconfig-knoppix elphel clone]
to configure network card and to make a simple bridge from several cards.
+
to configure network cards and to make a simple bridge from several cards.
 
<li>[http://prdownloads.sourceforge.net/elphel/mplayer_1.0pre7-elphel-1_i386.deb?download patched MPlayer]
 
<li>[http://prdownloads.sourceforge.net/elphel/mplayer_1.0pre7-elphel-1_i386.deb?download patched MPlayer]
to watch and to record rtp stream from our cameras.
+
to watch and to record the rtp stream from our cameras.
 
</ul>
 
</ul>
  
To install selected package(s) you may use the following command:
+
To install the selected package(s) you may use the following command:
 
  # dpkg -i --force-overwrite <deb-file-name>
 
  # dpkg -i --force-overwrite <deb-file-name>
 +
 +
Our version of netcardconfig-knoppix is dependant on the iputils-arping package.
 +
You may install it with:
 +
# apt-get install iputils-arping
 +
 +
Our other packages and applied patches contain common minor improvements and bug fixes for the base distro.
  
 
== Usage ==
 
== Usage ==
 
=== Boot and use ===
 
=== Boot and use ===
Currently we have Live CD only for i386 architecture.
+
Currently we only have a Live CD for the i386 architecture.
  
Boot CD allows to use Linux with necessary network settings and utilites for our cameras without any modification of data on your hard drive.
+
The Boot CD allows you to use Linux with the necessary network settings and utilities for our cameras without any modification of data on your hard drive.
  
Insert our CD in CD drive and let computer to boot from this CD.
+
Insert our CD in the CD drive and let the computer boot from this CD.
It is possible you need change some BIOS settings to do it.
+
It is possible you may need to change some BIOS settings to do it.
  
You may simply to wait until system will be ready.
+
You may simply wait until the system is ready.
  
First you will see Knoppix boot menu.
+
First you will see the Knoppix boot menu.
To continue boot you can wait some time or simply press Enter.
+
To continue the boot you can wait longer or simply press Enter. The most common intervention during the boot process is setting the screen resolution to match your monitor (details below - [[http://wiki.elphel.com/index.php?title=Live_CD#Knoppix_cheat_codes_.28boot_parameters.29]]):
In most case Knoppix starts succesfully and automatically detects computer hardware.
+
knoppix screen=1600x1200
  
Then network cards will be configured.
+
In most cases Knoppix starts succesfully and automatically detects the computer hardware.
Config script may ask you about to make a bridge if your computer has several network cards.
 
Press Enter or wait some time for default configuration.
 
  
Then it automatically search elphel cameras in your LAN and make static html page with links.
+
Then network cards will next be configured.
 +
The config script may ask you whether to make a bridge if your computer has several network cards.
 +
Press Enter or wait longer for the default configuration.
  
After boot complette you will see the page with cameras.
+
Then it automatically searches for elphel cameras on your LAN and makes a static html page with links.
  
=== Common software for video ===
+
After the boot completes you will see the page with cameras.
==== mplayer ====
 
This is a movie player. It can play files and streams with many different video and audio formats.
 
  
To watch an rtp stream from our cameras you may use the following command:
+
==== Knoppix cheat codes (boot parameters)====
mplayer rtsp://camera-ip:7070/
+
Special parameters can be set at the boot prompt.
Where '''camera-ip''' is a ip addtess of the camera.
+
<dl>The first word must be a name of a boot variant.
 +
<dt>knoppix<dd>Default mode.
 +
<dt>expert<dd>Verbose interactive mode.
 +
<dt>debug<dd>Debug mode.
 +
<dt>failsafe<dd>Boot without hardware autodetection.
 +
<dt>memtest<dd>RAM test.
 +
</dl>
 +
<dl>Some further parameters separated by spaces can follow in any order.
 +
<dt>screen=1280x1024<dd>Use this if you have a monitor resolution higher than 1024x768 pixels and autodetection does not work.
 +
<dt>lang=XX<dd>Specify the two-letter designation of your language.
 +
</dl>
 +
See the file "KNOPPIX/knoppix-cheatcodes.txt" on the Live CD for more in-depth information. Or online - [http://www.knoppix.net/wiki/Cheat_Codes here]
  
To play a file recorded with mencoder or any other videofile you may use the following command:
+
=== Installing to hard drive ===
  mplayer path-to-file
+
=== Working with packages  ===
 +
Knoppix is based on Debian. So it uses the debian package system.
 +
To list the installed packages use:
 +
dpkg -l [<shell-like-template>]
 +
To install a new package from file:
 +
  dpkg -i <deb-filename>
 +
To install from servers:
 +
apt-get install <package-name>
 +
To search available packages:
 +
apt-cache search <word>
 +
To remove a package:
 +
dpkg -r <package-name>
 +
To get a description of installed package:
 +
dpkg -s <package-name>
 +
When booting from CD/DVD you can install/remove packages, but all changes will be temporary until reboot.
 +
Due to use of unionfs with ramfs you may temporarily change any file in the compressed filesystem,
 +
but changes are stored in RAM.
  
Or you may use KDE menu to run mplayer in dialog mode
+
You can get a package file from any installed package:
 +
dpkg-repack <package-name>
 +
And convert it to tar.gz format which is used in Slackware, and which is easy to install in any GNU/Linux system without a package manager:
 +
alien -t <file-name.deb>
  
You may use keyboard to control playing
+
== How to Make a New CD Image ==
*'''space''' pause/continue
+
Here we describe the usage of the Live CD maker which can be downloaded from our SourceForge page.
*'''Q''' shut
+
The tar archive contains several shell scripts and directories with patches and files for the CD.
 +
=== Debs ===
 +
This directory contains packages to install on the new CD and files with a list of packages and file names to remove.
 +
The script recognizes deb, rpm, and compressed tar archives.
 +
Use of debs is preferred.
  
Look mplayer man page and [http://www.mplayerhq.hu/homepage/design7/info.html site] for more information.
+
Files '''"00remove-debs"''' and '''"00remove-files"''' contain, respectively, a list of debian packages, and files to remove '''''before''''' installing and updating new packages.
 +
Files '''"zzremove-debs"''' and '''"zzremove-files"''' are used similarly only '''''after''''' installation of new packages.
  
==== mencoder ====
+
When the result is a DVD remastering the script uses some filenames but with -DVD suffixes.
To record rtp stream from our cameras.
 
  
...
+
=== Patches ===
 +
there are 4 types of objects:
 +
* diff patches, to be applied as patches to the knoppix root;
 +
* tar.bz2 archives, to be unpacked in the knoppix root file system;
 +
* executable files which will run with knoppix root as the current directory;
 +
* directories which are ignored by the script, and can contain data for the executables.
 +
Before application the initrd image is unpacked to the knoppix root and repacked after.
 +
So patches can modify the content of initrd.
  
=== Special software ===
+
Diff patches will be tested before application: they will be tried with --dry-run and -p0 and -p1 options.
==== netcardconfig ====
 
netcardconfig is an improved version of knoppix network configurator.
 
It needs root priveleges.
 
It has two modes: interactive and batch.
 
  
...
+
Executables are first run with --dry-run, with this option the files will be checked but it will not modify files.
  
It is called from startup script on our Live CD.
+
=== Files to Be Placed on CD ===
If you have installed netcardconfig-knoppix not on our distro, it is possible you need to insert call to the script in a system startup script.
+
The directory "newcd" contains files which will be placed on the CD as-is.
 +
Put here new flash tarballs and HTML files which can be accessed without booting from the CD.
  
==== netcamconfig ====
+
=== Scripts ===
Run "netcamconfig" as user "root" to apply additional network settings and some kernel parameters.
+
==== download-debs ====
 +
==== livecd-make ====
 +
Before running this script, packages and patches must be placed in the "debs" and "patches" directories,
 +
Additional files should be located in the "newcd" directory.
 +
The remastering process consists of 5 phases:
 +
# Mount the source disk or image and unpack the compressed root file system to a directory named "new". An image of the init root file system (initrd) is unpacked to new/initrd
 +
# Remove packages and files listed in debs/00remove-*
 +
# Install packages from "debs" directory and from internet servers with apt-get and finally remove files and debs listed in debs/zzremove-*. Some packages must be installed and removed in the specified order, so the script can do it in 5 phases, and files with packages and lists of packages can be named with digital prefixes 00, 01, 02, 0 and without prefix.
 +
# Check and apply patches, install scripts and simple tar archives in the "patches" directory. Remove backup files.
 +
# Compress new root filesystem, initrd and make a new disk image.
  
This script adds aliases for the network card with most popular LAN ip adresses,
+
All operations are logged to the file "livecd-make.log"
adds route records for multicast ip addresses
 
and changes kernel parameters to prevent long i/o operations with hard drive,
 
  
It is called from startup script on our Live CD after netcardconfig.
+
Usage:
If you have installed elphel-pack not on our distro, possible you need to insert call for the script in a system startup script.
+
./livecd-make [-d] [no-refresh] [no-upate] [quick] [dvd] [unpack|remove|update|patch]
==== camsearch ====
+
*        unpack  - stop after unpacking source distro into ''./new/''
==== flashit ====
+
*        remove  - stop after removing packages
==== sdp-helper ====
+
*        update  - stop after installing new packages
 +
*        patch - stop after patches and scripts
 +
*        pause - wait for CR after each phase
 +
*        quick  - do not use ''best'' compression
 +
*        dvd - make dvd image - do not delete most packages and split root, quick is recommended
 +
*        no-update - do not remove & install packages
 +
*        no-refresh      - do not remove old ''./new/'' & unpack
 +
*        -d      - do not redirect stderr to logfile
  
=== Work with packages  ===
+
<strong>This script needs root privileges.</strong>
 +
 
 +
=== Other Files ===
  
== How to Make New CD Image ==
 
 
== Diagnostic ==
 
== Diagnostic ==
 +
 +
== Road map ==
 +
see [[LiveCD Release Notes]]
 +
----
 +
''Free Software and Open Hardware. Elphel, Inc., 2005''

Latest revision as of 16:39, 24 August 2008

This is a legacy page. The information bellow is not compatible with Elphel 393 or 353/363 series cameras.
Elphel Network Cameras Manual

353/363 | Using the cameras | Camera software | Live CD | Camera hardware | Diagnostic & repair | Development documentation | 333 prices | Information | FAQ | About Elphel, Inc


The Live CD is based on Knoppix which is based on Debian.

Structure

The Live CD contains multipurpose GNU/Linux software and special software for elphel cameras. The software is organized as debian packages. Our debian packages are presented on our SourceForge page in the Live-CD and Players sections.

The root file system of Knoppix is compressed and the cloop kernel module is needed to decompress it on-the-fly when it is necessary. The CD contains the compressed root file system, boot loader and flash tarballs for different models of our cameras.

If you already have a Debian or Knoppix system installed, you can add some of our debs to work with our cameras.

    We recommend installing the following packages from our SourceForge page:
  • elphel-pack has utilities to configure the network specifically for the cameras (for rtp stream receiving), search for cameras on the LAN, update flash, and a helper for Mozilla/Firefox to work with .sdp files.
  • netcardconfig-knoppix elphel clone to configure network cards and to make a simple bridge from several cards.
  • patched MPlayer to watch and to record the rtp stream from our cameras.

To install the selected package(s) you may use the following command:

# dpkg -i --force-overwrite <deb-file-name>

Our version of netcardconfig-knoppix is dependant on the iputils-arping package. You may install it with:

# apt-get install iputils-arping

Our other packages and applied patches contain common minor improvements and bug fixes for the base distro.

Usage

Boot and use

Currently we only have a Live CD for the i386 architecture.

The Boot CD allows you to use Linux with the necessary network settings and utilities for our cameras without any modification of data on your hard drive.

Insert our CD in the CD drive and let the computer boot from this CD. It is possible you may need to change some BIOS settings to do it.

You may simply wait until the system is ready.

First you will see the Knoppix boot menu. To continue the boot you can wait longer or simply press Enter. The most common intervention during the boot process is setting the screen resolution to match your monitor (details below - [[1]]):

knoppix screen=1600x1200

In most cases Knoppix starts succesfully and automatically detects the computer hardware.

Then network cards will next be configured. The config script may ask you whether to make a bridge if your computer has several network cards. Press Enter or wait longer for the default configuration.

Then it automatically searches for elphel cameras on your LAN and makes a static html page with links.

After the boot completes you will see the page with cameras.

Knoppix cheat codes (boot parameters)

Special parameters can be set at the boot prompt.

The first word must be a name of a boot variant.
knoppix
Default mode.
expert
Verbose interactive mode.
debug
Debug mode.
failsafe
Boot without hardware autodetection.
memtest
RAM test.
Some further parameters separated by spaces can follow in any order.
screen=1280x1024
Use this if you have a monitor resolution higher than 1024x768 pixels and autodetection does not work.
lang=XX
Specify the two-letter designation of your language.

See the file "KNOPPIX/knoppix-cheatcodes.txt" on the Live CD for more in-depth information. Or online - here

Installing to hard drive

Working with packages

Knoppix is based on Debian. So it uses the debian package system. To list the installed packages use:

dpkg -l [<shell-like-template>]

To install a new package from file:

dpkg -i <deb-filename>

To install from servers:

apt-get install <package-name>

To search available packages:

apt-cache search <word>

To remove a package:

dpkg -r <package-name>

To get a description of installed package:

dpkg -s <package-name>

When booting from CD/DVD you can install/remove packages, but all changes will be temporary until reboot. Due to use of unionfs with ramfs you may temporarily change any file in the compressed filesystem, but changes are stored in RAM.

You can get a package file from any installed package:

dpkg-repack <package-name>

And convert it to tar.gz format which is used in Slackware, and which is easy to install in any GNU/Linux system without a package manager:

alien -t <file-name.deb>

How to Make a New CD Image

Here we describe the usage of the Live CD maker which can be downloaded from our SourceForge page. The tar archive contains several shell scripts and directories with patches and files for the CD.

Debs

This directory contains packages to install on the new CD and files with a list of packages and file names to remove. The script recognizes deb, rpm, and compressed tar archives. Use of debs is preferred.

Files "00remove-debs" and "00remove-files" contain, respectively, a list of debian packages, and files to remove before installing and updating new packages. Files "zzremove-debs" and "zzremove-files" are used similarly only after installation of new packages.

When the result is a DVD remastering the script uses some filenames but with -DVD suffixes.

Patches

there are 4 types of objects:

  • diff patches, to be applied as patches to the knoppix root;
  • tar.bz2 archives, to be unpacked in the knoppix root file system;
  • executable files which will run with knoppix root as the current directory;
  • directories which are ignored by the script, and can contain data for the executables.

Before application the initrd image is unpacked to the knoppix root and repacked after. So patches can modify the content of initrd.

Diff patches will be tested before application: they will be tried with --dry-run and -p0 and -p1 options.

Executables are first run with --dry-run, with this option the files will be checked but it will not modify files.

Files to Be Placed on CD

The directory "newcd" contains files which will be placed on the CD as-is. Put here new flash tarballs and HTML files which can be accessed without booting from the CD.

Scripts

download-debs

livecd-make

Before running this script, packages and patches must be placed in the "debs" and "patches" directories, Additional files should be located in the "newcd" directory. The remastering process consists of 5 phases:

  1. Mount the source disk or image and unpack the compressed root file system to a directory named "new". An image of the init root file system (initrd) is unpacked to new/initrd
  2. Remove packages and files listed in debs/00remove-*
  3. Install packages from "debs" directory and from internet servers with apt-get and finally remove files and debs listed in debs/zzremove-*. Some packages must be installed and removed in the specified order, so the script can do it in 5 phases, and files with packages and lists of packages can be named with digital prefixes 00, 01, 02, 0 and without prefix.
  4. Check and apply patches, install scripts and simple tar archives in the "patches" directory. Remove backup files.
  5. Compress new root filesystem, initrd and make a new disk image.

All operations are logged to the file "livecd-make.log"

Usage:

./livecd-make [-d] [no-refresh] [no-upate] [quick] [dvd] [unpack|remove|update|patch]
  • unpack - stop after unpacking source distro into ./new/
  • remove - stop after removing packages
  • update - stop after installing new packages
  • patch - stop after patches and scripts
  • pause - wait for CR after each phase
  • quick - do not use best compression
  • dvd - make dvd image - do not delete most packages and split root, quick is recommended
  • no-update - do not remove & install packages
  • no-refresh - do not remove old ./new/ & unpack
  • -d - do not redirect stderr to logfile

This script needs root privileges.

Other Files

Diagnostic

Road map

see LiveCD Release Notes


Free Software and Open Hardware. Elphel, Inc., 2005