knoppix-customize

Name

knoppix-customize -- change boot options and files of a KNOPPIX image w/o remastering

Synopsis

knoppix-customize COMMAND ARG [... ]

DESCRIPTION

knoppix-customize is a program that let's you change the boot options and files of a KNOPPIX ISO image or boot disk without remastering.

Important Note
 

Please note this software is still in developement. No all functions are implemented and there are still some serious limitations.


OPTIONS

This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below.

--action ACTION

Mandatory. Action to perform, see below

--action list

list files in boot image

--action export_file

export file from image to localfile, in other words: extract a file from the image and copy it to a local file.

--action import_file

import local file into image, in other words: copy a local file into the image.

--action export_floppy

export boot floppy from image to localfile

--action import_floppy

import boot floppy from local file into image

--action get_syslinux_opt

Get the value for a syslinux option. May be used together with --target to get option for other target. Option to get is read from stdin. Value ist output to STDOUT. Exit 0 if option exists and 1 otherwise.

--action set_syslinux_opt

Get the value for a syslinux option. May be used together with --target to get option for other target. Reads pair with option "=" value from STDIN. Values for existing options will we changed, non existing options will be added, empty values (only the option name and the equals sign) will remove option.

--action get_append_opt

Get the value for an option in a syslinux APPEND-option May be used together with --target to get option for other target. Reads option from stdin and prints value to STDOUT. Exit 0 if option exists and 2 otherwise.

Caution Caution
 

Some Options (e. g. 2, quiet) have no value so nothing will be output to STDOUT. Check return value to see if option exists without a value or if it doesn't exist.



--action set_append_opt

Set the value for an option in a syslinux APPEND-option. May be used together with --target to set option for other target. Reads pair with option "=" value from STDIN. Values for existing options will we changed, non existing options will be added, empty values (only the option name and the equals sign) will remove option. To set an option without a value (e. g. 2) supply only the option name (without the equals sign).

--image KNOPPIX-Image-File

Mandatory. the Knoppix image to customize. This may be an iso image or a floppy image. You can also specify a device.

--local_file filepath

filepath on local filesystem. Mandatory with --action export_* and import_*.

With action export_file filepath my be a directory. In this case file with same name as --image_file will be created (Hint: "." also is a directory).

You may specify filepath as "-" for STDIN with action import_file and for STDOUT with action export_file.

--image_file filepath

file in the image (maybe . when importing). Mandatory with action export_file and import_file

With action import_file filepath may be "." and local file name (without path) will be used.

Please rember that the boot image uses FAT filesystem with 8+3 naming convention.

--target boottarget

Specifies the boot-target in syslinux.cfg to operate on. May be DEFAULT or any name that appears after a LABEL option in syslinux.cfg.

This option is only used with actions get_syslinux_opt, set_syslinux_opt, get_append_opt and set_append_opt. If target is not specified it defaults to DEFAULT. Target DEFAULT referes to the options after the keyword no matter wich target is given for DEFAULT in syslinux.cfg.

--verbose

be verbose

--help

Show summary of options.

--help

Show summary of options

--version

Show version of program

EXAMPLES

extract the floppy boot image from an image:
$ knoppix-customize --image knoppix.iso --action export_floppy --local_file boot.img
re-insert boot.img into a Knoppix image:
$ knoppix-customize --image knoppix.iso --action import_floppy --local_file boot.img
Copy/look at syslinux.cfg:
$ knoppix-customize --image knoppix.iso --action export_file --image_file syslinux.cfg --local_file -
See which target is booted by default:
$ echo DEFAULT | knoppix-customize --action get_syslinux_opt --image knoppix.iso
Get the APPEND-options for target userdef:
$ echo APPEND | knoppix-customize --action get_syslinux_opt --target userdef --image knoppix.iso
Set default boot-target to userdef:
$ echo "DEFAULT=userdef" | knoppix-customize --action set_syslinux_opt --image knoppix.iso
See which language is set:
$ echo "lang" | knoppix-customize --action get_append_opt --image knoppix.iso
change language to german in boot-target userdef:
$ echo "lang=de" | knoppix-customize --action set_append_opt --target userdef --image knoppix.iso
make system boot into runlevel 2 in boot-target userdef (this is without X-Window-System on console):
$ echo "2" | knoppix-customize --action set_append_opt --target userdef --image knoppix.iso
remove the option vga from the APPEND-optins for boot-target userded:
$ echo "vga=" | knoppix-customize --action set_append_opt --target userdef --image knoppix.iso
copy APPEND-options from DEFAULT target to userdef target:
$ echo "APPEND="$(echo "APPEND" | knoppix-customize --image knoppix.iso --action get_syslinux_opt) | knoppix-customize --image knoppix.iso --action set_syslinux_opt --target userdef
make userdef the default boot-target:
$ echo "DEFAULT=userdef" | knoppix-customize --image knoppix.iso --action set_syslinux_opt
look at append-options for userdef:
$ echo "APPEND" | knoppix-customize --image knoppix.iso --action get_syslinux_opt --target userdef
change language in boot-target userdef:
$ echo "lang=es" | knoppix-customize --image knoppix.iso --action set_append_opt --target userdef
in case things went wrong restore orginal knoppix behavior, make vmlinuz default:
$ echo "DEFAULT=vmlinuz" | knoppix-customize --image knoppix.iso --action set_syslinux_opt


Tip Tip
 

Make your changes to target userdef (that's what it was added for) so you can always boot the original knoppix by entering knoppix at the boot-prompt.


EXIT CODES

To facilitate the use of knoppix-customize in shell scripts, an exit code is returned to give an indication of what kind of error occured. The exit codes returned by knoppix-customize are as follows:

0

normal operation no errors

1

normal operation no errors, syslinux option doesn't exist in configuration

2

normal operation no errors, append option doesn't exist in target

3

Error: Wrong Arguments

4

Error: Can't stat image

5

Error: Can't stat local file

6

Error: Can't read image

7

Error: Can't parse image

8

Error importing

9

Error exporting

10

Target not found

11

Can't read options

12

No value expected

200

Function not implemented yet.

201

Internel error, should never occur

BUGS AND KNOWN PROBLEMS

At the moment files have to be replaced with files of the same size. It is not yet possible to insert smaller order larger files.

FUTURE IMPROVEMENTS

Add a GUI.

NOTES

KNOPPIX is a bootable CD with a collection of GNU/Linux software, automatic hardware detection, and support for many graphics cards, ound cards, SCSI and USB devices and other peripherals. KNOPPIX can be used as a Linux demo, educational CD, rescue system, or adapted and used as a platform for commercial software product demos. It is not necessary to install anything on a hard disk. Due to on-the-fly decompression, the CD can have up to 2 GB of executable software installed on it.

SEE ALSO


AUTHOR

Knoppix-customize was was written by Kester Habermann .

COPYING

GNU GPL

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This manual page was written by Kester Habermann . Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.