Strict standards: Declaration of action_plugin_popularity::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/lib/plugins/popularity/action.php on line 11 Call Stack: 0.0003 244904 1. {main}() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:0 0.0010 357304 2. require_once('/home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/init.php') /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:27 0.0279 4301200 3. Doku_Event_Handler->Doku_Event_Handler() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/init.php:214 0.0283 4303152 4. plugin_load() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/events.php:135 0.0283 4303328 5. Doku_Plugin_Controller->load() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/pluginutils.php:21 0.0285 4318368 6. include_once('/home/virtualmin/it46.se/domains/wiki.it46.se/public_html/lib/plugins/popularity/action.php') /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/plugincontroller.class.php:93 Strict standards: Declaration of action_plugin_safefnrecode::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/lib/plugins/safefnrecode/action.php on line 66 Call Stack: 0.0003 244904 1. {main}() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:0 0.0010 357304 2. require_once('/home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/init.php') /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:27 0.0279 4301200 3. Doku_Event_Handler->Doku_Event_Handler() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/init.php:214 0.0297 4462304 4. plugin_load() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/events.php:135 0.0297 4462448 5. Doku_Plugin_Controller->load() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/pluginutils.php:21 Warning: Cannot modify header information - headers already sent by (output started at /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/lib/plugins/popularity/action.php:11) in /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/auth.php on line 352 Call Stack: 0.0003 244904 1. {main}() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:0 0.0010 357304 2. require_once('/home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/init.php') /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:27 0.0300 4488536 3. auth_setup() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/init.php:218 0.0309 4608680 4. trigger_event() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/auth.php:108 0.0309 4608976 5. Doku_Event->trigger() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/events.php:196 0.0309 4609880 6. auth_login_wrapper() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/events.php:90 0.0309 4609912 7. auth_login() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/auth.php:146 0.0309 4610456 8. auth_logoff() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/auth.php:228 0.0309 4611392 9. setcookie() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/auth.php:352 Strict standards: Declaration of Doku_Renderer_metadata::table_open() should be compatible with Doku_Renderer::table_open($maxcols = NULL, $numrows = NULL, $pos = NULL) in /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/parser/metadata.php on line 24 Call Stack: 0.0003 244904 1. {main}() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:0 0.0313 4556360 2. pageinfo() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:55 0.0319 4561992 3. p_get_metadata() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/common.php:164 0.0328 4642792 4. p_render_metadata() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/parserutils.php:317 0.0335 4772776 5. require_once('/home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/parser/metadata.php') /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/parserutils.php:507 Strict standards: Declaration of Doku_Renderer_metadata::table_close() should be compatible with Doku_Renderer::table_close($pos = NULL) in /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/parser/metadata.php on line 24 Call Stack: 0.0003 244904 1. {main}() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:0 0.0313 4556360 2. pageinfo() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:55 0.0319 4561992 3. p_get_metadata() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/common.php:164 0.0328 4642792 4. p_render_metadata() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/parserutils.php:317 0.0335 4772776 5. require_once('/home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/parser/metadata.php') /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/parserutils.php:507 Warning: Cannot modify header information - headers already sent by (output started at /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/lib/plugins/popularity/action.php:11) in /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/actions.php on line 180 Call Stack: 0.0003 244904 1. {main}() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:0 0.0965 6319656 2. act_dispatch() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/doku.php:88 0.0967 6321568 3. trigger_event() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/actions.php:172 0.0967 6321776 4. Doku_Event->trigger() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/events.php:196 0.0967 6322080 5. act_sendheaders() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/events.php:90 0.0967 6322464 6. header() /home/virtualmin/it46.se/domains/wiki.it46.se/public_html/inc/actions.php:180 myhacks:tunning_asterisknow_cd [IT46 Wiki]
 

I need to prepare a ALL-in-one CD for a VoIP training. What I will like to achieve is one single CD that installs Asterisk with the AsteriskGUI and that also includes all the training materials and some extra GPL software.

I took the AsteriskNOW (beta 6) as a base and I thought that it was going to be as simple as opening the ISO, adding content and creating a new ISO. Unfortunately, there are several interesting features that made this more difficult that I expected. During installation the installer rejects the new image with a message: “The rPath Linux CD was not found in any of your CD ROM Drives.” I image that you found this webpage while googling for this error. Welcome!

I spent a long evening looking into this and this is what I found out. I write it here so I do not forget and serves others :)

The AsteriskNOW CD uses rPath, rPath is a Linux distribution specially designed for appliances. rPath is heavily based on RedHat installer i.e. the anaconda installation system. Yes, the python one. I specially like those python errors that anaconda gave me back in 2000 during the creation of RedHat-based distro.

At first glance, it looks pretty much like a RedHat kickstart will work, this is something I remember from the times of building Flyinglinux, the very first Linux distro with native support for WiFi. rPath uses a package repository based on sqlite3 and conary.

Checking the ISO image we see:

# file asteriskNOW-beta6-x86.iso 
asteriskNOW-beta6-x86.iso: ISO 9660 CD-ROM filesystem data UDF filesystem data 
(unknown version, id 'NSR01') 'AsteriskNOW Disc 1             ' (bootable)

The CD is recorded in a UDF filesystem, The Universal Disk Format (UDF) is a format specification of a file system for storing files on optical media. It is an implementation of the ISO/IEC 13346.

Having a look to the code of file.c, the software package that checks the magic numbers of a file. I saw that the file is UDF NSR01, UDF 1.0

>38913   string   !NSR0      ISO 9660 CD-ROM filesystem data
>38913   string    NSR01     UDF filesystem data (version 1.0)
>38913   string    NSR02     UDF filesystem data (version 1.5)
>38913   string    NSR03     UDF filesystem data (version 2.0)
>38913   string    >NSR03    UDF filesystem data (unknown version,
>>38917  byte      x         id 'NSR0%c')
>38913   string    <NSR01    UDF filesystem data (unknown version,
>>38917  byte      x         id 'NSR0%c')

In order to make a ISO with NSR01/UDF format we need to add the UDF flag to the mkiso utility and the -V to create the right label. After mounting the ISO

#mount -o loop asteriskNOW-beta6-x86.iso /media/ISO/

I copied all the content of the read-only to another folder

#cp -a /media/ISO/ /usr/local/src/CD3/

It is important to notice here that there is a file that it will not get copied by issuing the cp -a command. The file starts with a ”.”. This file is very important without it, the new ISO will be rejected. I had to dig into the sources of anaconda to find out why the image was all the time rejected.

#/media/ISO# find . -name ".*"
.
./.discinfo

The .discinfo file contains:

1182556870.42
AsteriskNOW
i386
1
rPath/base
rPath/changesets
rPath/pixmaps

So make sure that file is in the new image

#cp /media/ISO/.discinfo /usr/local/src/CD2/

Now we can try to add content to the ISO and rebuild it using:

mkisofs -o /tmp/ISO.iso -UDF -b isolinux/isolinux.bin -c isolinux/boot.cat \
                -no-emul-boot -boot-load-size 4 -boot-info-table -l \
                -V "AsteriskNOW Disc 1" -R -r /usr/local/src/CD2

In my case I created a new folder inside of the CD to store documentation and tools. But the final touch is that the CD includes a MD5 integrity check.

The integrity check is implemented as part of anaconda but I discovered later that it can be retrieved as a debian package with the name isomd5sum

isomd5sum is a set of utilities for implanting a MD5 checksum in an ISO (or any block device), then verifying the checksum later. isomd5sum is part of Anaconda; when you boot a RH/Fedora installer and select “verify cd”, it's running isomd5sum.

I downloaded and compiled isomd5sum and compute and verify the new MD5 sum as follows:

echo "Creating ISO"
Setting input-charset to 'UTF-8' from locale.
Unknown file type (unallocated) /usr/local/src/CD2/.. - ignoring and continuing.
Size of boot image is 4 sectors -> No emulation
Total translation table size: 2048
Total rockridge attributes bytes: 1676
Total directory bytes: 2564
Path table size(bytes): 26
Max brk space used 0
3146 extents written (6 MB)
Inserting md5sum into iso image...
md5 = 528b515f53ea3215df5e69ea6100cebe
Inserting fragment md5sums into iso image...
fragmd5 = c726ca4968958d5ddf76166de7c92cf6744a4df1a466a9f1edc8972ac87b
frags = 20
Setting supported flag to 0
/tmp/ISO.iso:   528b515f53ea3215df5e69ea6100cebe
Fragment sums: c726ca4968958d5ddf76166de7c92cf6744a4df1a466a9f1edc8972ac87b
Fragment count: 20
Percent complete: 100.0%   Fragment[20/20] -> OK
100.0
The supported flag value is 0
The media check is complete, the result is: PASS.

So in a nutshell these are the steps:

Where is the MD5 stored?

Before adding the MD5 you will see:

0000000000000000
2007112711345500
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
CD001
EL TORITO SPECIFICATION
CD001
BEA01
NSR02
TEA01
MKI Tue Nov 27 11:34:55 2007
2.01.01a33 -o .../ISO.iso -UDF -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -l -V AsteriskNOW Disc 1 -R -r .../CD2
AsteriskNOW Disc 1

Checking the header of the CD we can see now:

# head -5 ISO.iso  | strings
CD001
LINUX                           AsteriskNOW Disc 1              
                                                                                                                                                                                                                                                                                                                                                                                                MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING                                                                                                                        2007112711255500
2007112711255500
0000000000000000
2007112711255500
ISO MD5SUM = 528b515f53ea3215df5e69ea6100cebe;SKIPSECTORS = 15;RHLISOSTATUS=0;FRAGMENT SUMS = c726ca4968958d5ddf76166de7c92cf6744a4df1a466a9f1edc8972ac87b;FRAGMENT COUNT = 20;THIS IS NOT THE SAME AS RUNNING MD5SUM ON THIS ISO!!                     

A different between both images shows

--- /tmp/a      2007-11-27 11:37:57.000000000 +0100
+++ /tmp/b      2007-11-27 11:38:33.000000000 +0100
@@ -4,7 +4,7 @@
 2007112711345500
 0000000000000000
 2007112711345500
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
+ISO MD5SUM = 20784ea0ed427c0ce051e2925ea70f76;SKIPSECTORS = 15;RHLISOSTATUS=0;FRAGMENT SUMS = 6e97e74715f4b79537fbdffedbcee6f88adae8db6dee1b8dbbf93619f3ed;FRAGMENT COUNT = 20;THIS IS NOT THE SAME AS RUNNING MD5SUM ON THIS ISO!!                                                                                                                                                                                                                                                                                             
 CD001
 EL TORITO SPECIFICATION
 CD001

Enjoy your integrity checks!

myhacks/tunning_asterisknow_cd.txt · Last modified: 2009/03/28 14:09 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki