root/morphix/trunk/how_tos/morphix_docbook.xml

Revision 2, 58.6 kB (checked in by nextime, 2 years ago)

Initial import, branching from morphix svn

Line 
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
3
4 <article lang="en">
5 <articleinfo>
6     <title>Morphix Manual</title>
7     <date>September 2006</date>
8     <author>
9         <firstname>www</firstname>
10         <othername>Morphix</othername>
11         <surname>Org</surname>
12     </author>
13     <authorinitials>BMS</authorinitials>
14
15 <revhistory><revision><revnumber>0.5</revnumber><date>September 2006</date><authorinitials>BMS</authorinitials></revision></revhistory>
16
17 </articleinfo>
18 <section>
19 <title>Dedication</title>
20 <simpara>To our benevolent dictator Alextreme, Debian and everyone at #morphix</simpara>
21
22 </section>
23 <section>
24 <title>Preface</title>
25 <simpara>This is an attempt to document some of ways to use Morphix. In particular to support a new Morphix LiveCD - MorphingMorphix.</simpara>
26
27 <simpara><indexterm>
28   <primary>Knoppix Hacks</primary>
29 </indexterm>
30 The following is an extract from Knoppix Hacks - 100 Industrial-Strength Tips and Tools describing Morphix.</simpara>
31
32 <section>
33 <title>A look at Morphix: The Hack-friendly Live CD</title>
34 <simpara>Given the popularity of Knoppix and the vast amount of people
35 working on derivative versions of Knoppix, it doesn't come as a
36 surprise that people have been working to make Knoppix easier to
37 modify and more flexible to use. In early 2003, Morphix was born out
38 of a number of Knoppix remasters' wishes to have a version of Knoppix
39 that was good at what they used Knoppix for: a base upon which to
40 build their own versions using Debian GNU/Linux.</simpara>
41
42 <section>
43 <title>What makes Morphix so special compared to other Live CDs</title>
44 <simpara>As you have seen in this book, there are a number of ways to change Knoppix to
45 your liking. However, these possibilities have always been, and probably always
46 will be, fairly limited. Knoppix was made for different goals: to detect your
47 hardware as fast and correct as possible, to be a good demonstration of Linux
48 and to include as much common-use Linux software as
49 possible. Morphix's goals however are different: Ease of
50 customization, ease of use, ease of installing. We are a lazy bunch,
51 but thanks to Klaus Knopper we had a solid place from which to work from.</simpara>
52
53 <simpara>Knoppix, and most Knoppix' derivatives, are fairly monolithic in
54 nature: They are essentially complete ready-made filesystems all
55 compressed into one file. Morphix on the other hand is built up around
56 the idea of modules: you have one module that boots your live CD and
57 detects your hardware, another that contains your live CD filesystem
58 and zero or more extra modules that can contain minor or major changes
59 and additions to the system. This way, Morphix promotes the reusing of
60 smaller, existing modules instead of one large /KNOPPIX/KNOPPIX
61 file. Complicated? Well, a look at a typical Morphix live CD might
62 help. This is the structure of Morphix 0.4-1 LightGUI, one of the
63 Morphix flavours:</simpara>
64
65 <simpara><emphasis>&lt;pre&gt;</emphasis>
66 <emphasis>/base/boot.img</emphasis>
67 <emphasis>/base/morphix</emphasis>
68 <emphasis>/mainmod/MorphixMain-Light.mod</emphasis>
69 <emphasis>&lt;/pre&gt;</emphasis></simpara>
70
71 <simpara>While it seems quite empty, this is how we release typical versions
72 of Morphix. They are quite bare but offer users (or 'morphers', as we
73 call ourselves, as you will notice we have a strange lingo for the
74 uninitiated) more possibilities to change the resulting live CD. We
75 will take a closer look at these and other tricks in the hack \"Morphing
76 Morphix\" later on.</simpara>
77
78 <simpara>Morphix currently has four ready-to-burn \"combined ISOs\" available for
79 download and a list of extra modules available for whomever needs
80 them. All combined ISOs contain the Morphix installer, a graphical
81 tool for installing Morphix onto your harddisk, and a number of
82 other graphical and command line Morphix tools for various
83 purposes. Each of these live CDs has their own targeted audience&#8212;our
84 opinion has always been that we should offer (limited) choice to users
85 and as much choice as possible for developers:</simpara>
86
87 </section>
88 <section>
89 <title>Morphix LightGUI</title>
90 <simpara>Aimed at lower-end PCs, LightGUI features the XFCE4 desktop and
91 contains a reasonable amount of lighter tools. It was the initial
92 version of Morphix, and the aim has been to keep LightGUI small enough to
93 have it fit on 210MB CDR(W). LightGUI includes Abiword, Gnumeric, Dillo and
94 Firefox. For communication, Gaim and Xchat are included, and for
95 photo processing the GIMP has been added.</simpara>
96
97 </section>
98 <section>
99 <title>Morphix Gnome</title>
100 <simpara>Formerly named Morphix HeavyGUI, this flavour was for some time the
101 only conterpart of LightGUI. Including Gnome, OpenOffice.org,
102 Mozilla, and the kitchen sink, Morphix Gnome was aimed at office users
103 with more recent machines. Even so, a normal Morphix Gnome ISO still
104 doesn't fill up the whole (650MB) CD-ROM, and recent versions weigh in at
105 around 500MB.</simpara>
106
107 </section>
108 <section>
109 <title>Morphix KDE</title>
110 <simpara>Although primarily focused on GTK/Gnome, the Morphix crew acknowledges
111 that users might prefer KDE instead (and looking at the number of
112 derivatives, a lot of users do!). Morphix KDE contains the whole KDE suite of
113 programs, as well as Mozilla and other applications. Morphix KDE
114 sits inbetween LightGUI and Gnome when it comes to size, and fills up
115 approximately 400MB of space on your CD-ROM.</simpara>
116
117 </section>
118 <section>
119 <title>Morphix Game</title>
120 <simpara>An odd-ball in Morphix, this flavour contains the very light IceWM and
121 a very large number of Open Source games. BZflag, Frozen Bubble, Freecraft
122 and many, many others are sure to entertain the kids (or entertain the
123 kid in you) for quite a few hours. Normally Morphix Game also includes
124 one or more demo versions or free full versions of commercial Linux
125 games, adding to the fun. Gaming on Linux a rarity? This hasn't been
126 the case for many years, no matter what kind of games you enjoy!</simpara>
127
128 <simpara>All the official Morphix live CDs contain the Morphix installer, as
129 stated above. This tool allows users to easily install their Morphix
130 (or derivative) live CD onto a hard disk. Often overlooked, the
131 difference between a live CD and a hard disk install is very small
132 indeed. The Morphix installer is also built in a flexible manner so
133 that derivatives can even rebrand the Morphix installer, although the
134 source itself is licensed under the GNU GPL. A graphical partitioner
135 and series of configuration tools have been under development and are
136 likely to be part of Morphix by the time this book comes off the press.</simpara>
137
138 </section>
139 <section>
140 <title>Morphing-Morphix</title>
141 <simpara>The purpose of <emphasis>Morphing-Morphix</emphasis> is to provide the quick way to start <emphasis>Morphing</emphasis> and making your own LiveCD. Just boot the CD and start Morphing, no need to install tools, compile applications or switch operating systems. All is required is some space on a connected hard drive. The aim is to be able make new Morphix LiveCDs using this LiveCD, as an introduction to Morphix. In fact this LiveCD was made using Morphing-Morphix.</simpara>
142
143 </section>
144 <section>
145 <title>Derivatives</title>
146 <simpara>A lot has been said about the number of Linux distributions recently. What
147 others see as a complicated mess, we see as a healthy, messy
148 eco-system. Morphix has quite a few offspring
149 and a lot of them are specially focussed at a single group of people
150 (ranging from Brazilian engineers, non-profit organizations or
151 self-proclaimed Hackers) or are providing a localized non-English
152 Linux distribution (ie. Chinese, Galicia/Spanish, Hindi, Arabic), the list
153 goes on and on. So, if the default Morphix Live CDs aren't to your
154 liking take a look on www.morphix.org for a list of related
155 projects. Even if you start 'morphing' from one of these derivatives,
156 you can be sure of a base to fall back to and a design that will get
157 your project 'live' and updated ASAP.</simpara>
158
159 <simpara>Happy Morphing!</simpara>
160
161 </section>
162 </section>
163 </section>
164 <section>
165 <title>Morphix ISO README</title>
166 <simpara>If you're wondering what the directories on the cdrom do, this is the right
167 document. If not, take a look on morphix.org! (don't miss the FAQ or wiki)</simpara>
168
169 <simpara><indexterm>
170   <primary>boot</primary>
171 </indexterm>
172 <emphasis>o /boot</emphasis> 
173         contains the init ramdisk, grub menu and kernel</simpara>
174
175 <simpara><indexterm>
176   <primary>base</primary>
177 </indexterm>
178 <emphasis>o /base</emphasis> 
179         contains morphix, the module that detects/configures your hardware and
180         contains your standard kernel modules.</simpara>
181
182 <simpara><indexterm>
183   <primary>mainmod</primary>
184 </indexterm>
185 <emphasis>o /mainmod</emphasis>
186         contains mainmodules, these are also cloop images, comparable to
187         the /base/morphix file, but using a different structure
188         see README.mainmod for info about the internal structure of these files
189         In short: mainmodules contain your filesystem, except for your kernel,
190         loadable kernel modules, and hardware detection scripts.</simpara>
191
192 <simpara><indexterm>
193   <primary>minimod</primary>
194 </indexterm>
195 <emphasis>o /minimod </emphasis>
196         contains minimodules, again these are cloop images.
197         You don't need them, but you can add extra functionality by including
198         extra minimodules. See README.minimod.</simpara>
199
200 <simpara><indexterm>
201   <primary>exec</primary>
202 </indexterm>
203 <emphasis>o /exec </emphasis>
204         If you place files in this directory, they will be executed at
205         boottime. Note that this does not mean that programs using X
206         will be executed, the proper way would be to add a line to .xinitrc
207         for this. Place the following in /exec/script.sh for example:
208           <emphasis>echo \"program\" &gt;&gt; /home/morph/.xinitrc</emphasis>
209           <emphasis>echo \"program\" &gt;&gt; /home/morph/.xsession</emphasis>
210         (Does Debian still use .xsession? not 100% sure, xinitrc should
211         be enough&#8230;)
212         Again, try this out. Exit from X, execute the script, and
213         'sh /morphix/init.sh'</simpara>
214
215 <simpara><indexterm>
216   <primary>copy</primary>
217 </indexterm>
218 <emphasis>o /copy</emphasis>
219         If you place files in this directory, they will be copied over to the
220         root of your filesystem. Use directories to place files in a certain
221         directory instead. For example, have:
222           <emphasis>/copy/home/morph/.xfce4/xfcerc</emphasis>
223         to copy the xfcerc file to /home/morph/.xfce4/xfcerc at boottime.</simpara>
224
225 <literallayout class="monospaced">Interesting things can be done with adding files to locations like: +
226   '/copy/morphix/init.sh'
227 or
228   '/copy/morphix/loadmod.sh'</literallayout>
229 <literallayout class="monospaced">as these files are executed after being swapped. Great fun ;)</literallayout>
230 </section>
231 <section>
232 <title>Fast Introduction to building your own Morphix based livecd</title>
233 <section>
234 <title>Really Fast Introduction</title>
235 <itemizedlist>
236 <listitem>
237 <simpara>
238 Get a Morphix Base iso
239 </simpara>
240 </listitem>
241 <listitem>
242 <simpara>
243 Add "deb http://www.morphix.org/debian ./" to your /etc/apt/source.list
244 </simpara>
245 </listitem>
246 <listitem>
247 <simpara>
248 apt-get update ; apt-get install morphing-tools
249 </simpara>
250 </listitem>
251 <listitem>
252 <simpara>
253 Edit mymainmod.xml
254 </simpara>
255 </listitem>
256 <listitem>
257 <simpara>
258 mmaker mymainmod.xml myprograms.mod
259 </simpara>
260 </listitem>
261 <listitem>
262 <simpara>
263 make-iso /path/source myfirstlivecd.iso
264 </simpara>
265 </listitem>
266 </itemizedlist>
267 </section>
268 <section>
269 <title>Fast Introduction</title>
270 <section>
271 <title>Foreplay</title>
272 <itemizedlist>
273 <listitem>
274 <simpara>
275 Use a Debian based Linux distro [preferably Debian sid, aka unstable, but every recent one should do]
276 </simpara>
277 </listitem>
278 <listitem>
279 <simpara>
280 Get a morphix based .iso [or better: just a base .iso, preferably a stable one atm, like 0.5-pre5 or an autobuilded base .iso]
281 </simpara>
282 </listitem>
283 <listitem>
284 <simpara>
285 Open a root terminal [su -, you get the point]
286 </simpara>
287 </listitem>
288 <listitem>
289 <simpara>
290 mount -t iso9660 -o loop nameoftheisoyoudownloaded.iso /mnt/whatever
291 </simpara>
292 </listitem>
293 <listitem>
294 <simpara>
295 cp -a /mnt/whatever/* /path/to/the/extracted/stuff [like /scratch/iso]
296 </simpara>
297 </listitem>
298 </itemizedlist>
299 </section>
300 <section>
301 <title>Setting up the build environment</title>
302 <itemizedlist>
303 <listitem>
304 <simpara>
305 Add "deb http://www.morphix.org/debian ./" to your /etc/apt/source.list
306 </simpara>
307 </listitem>
308 <listitem>
309 <simpara>
310 apt-get update
311 </simpara>
312 </listitem>
313 <listitem>
314 <simpara>
315 apt-get install morphing-tools
316 </simpara>
317 </listitem>
318 </itemizedlist>
319 </section>
320 <section>
321 <title>Creating your own mainmodule</title>
322 <itemizedlist>
323 <listitem>
324 <simpara>
325 See this manual about mmaker for building an .xml file describing your mainmodule, which will basically be your system
326 </simpara>
327 </listitem>
328 <listitem>
329 <simpara>
330 If you're done with the .xml file [e.g., mymainmod.xml], type "mmaker mymainmod.xml myprograms.mod" or whatever you like to name them
331 </simpara>
332 </listitem>
333 </itemizedlist>
334 </section>
335 <section>
336 <title>Building an .iso out of it</title>
337 <itemizedlist>
338 <listitem>
339 <simpara>
340 Now, remove the files in /scratch/iso/mainmod
341 </simpara>
342 </listitem>
343 <listitem>
344 <simpara>
345 Copy/move your myprograms.mod into /scratch/iso/mainmod
346 </simpara>
347 </listitem>
348 <listitem>
349 <simpara>
350 make-iso /scratch/iso myfirstlivecd.iso
351 </simpara>
352 </listitem>
353 <listitem>
354 <simpara>
355 Done. Burn to cd with your favorite burn program or run with "qemu -cdrom myfirstlivecd.iso" in the qemu emulator, for example
356 </simpara>
357 </listitem>
358 </itemizedlist>
359 </section>
360 <section>
361 <title>More advanced stuff</title>
362 <simpara>If you manually modify some stuff in /tmp/libmorphix-&lt;randomsequence&gt; (e.g., /tmp/libmorphix-9oVKWq) , you have to use the following command to recompress the mainmod: "module-builder /tmp/libmorphix-9oVKWq aquamorph_20051120a.mod" (or whatever you want to call the mainmodule).</simpara>
363
364 </section>
365 </section>
366 </section>
367 <section>
368 <title>HowTo: Building a new LiveCD in two commands</title>
369 <simpara><indexterm>
370   <primary>HowToLiveCD</primary>
371 </indexterm>
372 <anchor id="BuildingLiveCDtwocommands" xreflabel="[BuildingLiveCDtwocommands]"/></simpara>
373
374 <itemizedlist>
375 <listitem>
376 <simpara>
377 <link linkend="SettingUptheBuildEnvironment">Setting Up the Build Environment</link>
378 </simpara>
379 </listitem>
380 <listitem>
381 <simpara>
382 <link linkend="GettingtheTemplatesandmainGraphicsFile">Getting the Templates and main Graphics File</link>
383 </simpara>
384 </listitem>
385 <listitem>
386 <simpara>
387 <link linkend="IsoMakerExmaple">Two Commands</link>
388 </simpara>
389 </listitem>
390 <listitem>
391 <simpara>
392 <link linkend="HowDoesItLook">Volia One LiveCD</link>
393 </simpara>
394 </listitem>
395 </itemizedlist>
396 <section id="SettingUptheBuildEnvironment">
397 <title>Setting up the build environment</title>
398 <itemizedlist>
399 <listitem>
400 <simpara>
401 Add "deb http://www.morphix.org/debian ./" to your /etc/apt/source.list
402 </simpara>
403 </listitem>
404 <listitem>
405 <simpara>
406 apt-get update
407 </simpara>
408 </listitem>
409 <listitem>
410 <simpara>
411 apt-get install morphing-tools
412 </simpara>
413 </listitem>
414 </itemizedlist>
415 </section>
416 <section id="GettingtheTemplatesandmainGraphicsFile">
417 <title>Getting the Templates and main Graphics File</title>
418 <itemizedlist>
419 <listitem>
420 <simpara>
421 <ulink url="http://svn.sourceforge.net/viewcvs.cgi/morphix/trunk/mmaker/templates/basemod-2.6.9.xml?view=markup">Base Module Tempate</ulink>
422 </simpara>
423 </listitem>
424 <listitem>
425 <simpara>
426 <ulink url="http://svn.sourceforge.net/viewcvs.cgi/morphix/trunk/mmaker/templates/morphix-livekiosk.xml?view=markup">MainModule Template</ulink>
427 </simpara>
428 </listitem>
429 <listitem>
430 <simpara>
431 MiniModule Templates, <ulink url="http://svn.sourceforge.net/viewcvs.cgi/morphix/trunk/scripts-mini/MorphixMini-KioskSetting.xml?view=markup">1</ulink> <ulink url="http://svn.sourceforge.net/viewcvs.cgi/morphix/trunk/scripts-mini/MorphixMini-KioskAddins.xml?view=markup">2</ulink>
432 </simpara>
433 </listitem>
434 </itemizedlist>
435 <note>
436 <title>Note on Templates</title>
437 <simpara>These templates may point to a local mirror of the debian repository. Un-comment the remote repository and comment out the local repository.</simpara>
438
439 <simpara>For example replace the lines</simpara>
440
441 <literallayout class="monospaced">&lt;!--   &lt;repository type="debian"&gt;ftp://ftp.debian.org/debian&lt;/repository&gt; --&gt;
442 &lt;repository type="debian"&gt;http://127.0.0.1/sid/&lt;/repository&gt;</literallayout>
443 <simpara>With the lines</simpara>
444
445 <literallayout class="monospaced">&lt;repository type="debian"&gt;ftp://ftp.debian.org/debian&lt;/repository&gt;
446 &lt;!-- &lt;repository type="debian"&gt;http://127.0.0.1/sid/&lt;/repository&gt; --&gt;</literallayout>
447 </note>
448 <itemizedlist>
449 <listitem>
450 <simpara>
451 <ulink url="http://www.morphix.org/doc/how_tos/images/MorphixLiveKiosk.png">Graphics file used for Rebranding</ulink>
452 </simpara>
453 </listitem>
454 </itemizedlist>
455 <example>
456 <title>Graphics File used for Rebranding</title>
457 <simpara><inlinemediaobject>
458   <imageobject>
459   <imagedata fileref="../images/MorphixLiveKiosk.png" contentwidth="400pt"/>
460   </imageobject>
461   <textobject><phrase>Rebranded Boot Splash Background</phrase></textobject>
462 </inlinemediaobject></simpara>
463
464 </example>
465 </section>
466 <section id="IsoMakerExmaple">
467 <title>Two Commands</title>
468 <simpara>Run isomaker then morphix-rebrand (The magic two commands)</simpara>
469
470 <itemizedlist>
471 <listitem>
472 <simpara>
473 isomaker -b ./basemod-2.6.15.xml -m ./morphix-livekiosk.xml -n ./MorphixMini-KioskSetting.xml -n ./MorphixMini-KioskAddins.xml -r http://www.morphix.org/debian -p grub-gfxboot-iso-udeb -p morphix-cdrom-misc-udeb -p morphix-grub-menulist-udeb -p morphix-iso-grubtheme ./morphix-livekiosk.iso
474 </simpara>
475 </listitem>
476 <listitem>
477 <simpara>
478 morphix-rebrand ./morphix-livekiosk.iso ./MorphixLiveKiosk.iso ./MorphixLiveKiosk.png
479 </simpara>
480 </listitem>
481 </itemizedlist>
482 </section>
483 <section id="HowDoesItLook">
484 <title>Volia One LiveCD</title>
485 <simpara>Isomaker can take about 45 minutes to run. Morphix-rebrand about 2 minutes.</simpara>
486
487 <simpara>After this fun you should have a bootable LiveCD</simpara>
488
489 <section>
490 <title>Boot Menu</title>
491 <simpara><inlinemediaobject>
492   <imageobject>
493   <imagedata fileref="../images/RebrandBootMenu.png"/>
494   </imageobject>
495   <textobject><phrase>Rebranded Grub Menu</phrase></textobject>
496 </inlinemediaobject></simpara>
497
498 </section>
499 <section>
500 <title>Boot-Up Screen</title>
501 <simpara><inlinemediaobject>
502   <imageobject>
503   <imagedata fileref="../images/RebrandBootSplash.png"/>
504   </imageobject>
505   <textobject><phrase>Rebranded Boot Splash</phrase></textobject>
506 </inlinemediaobject></simpara>
507
508 <simpara>Or if you press F2</simpara>
509
510 <simpara><inlinemediaobject>
511   <imageobject>
512   <imagedata fileref="../images/RebrandBootUp.png"/>
513   </imageobject>
514   <textobject><phrase>Rebranded Boot Splash Backround</phrase></textobject>
515 </inlinemediaobject></simpara>
516
517 </section>
518 <section>
519 <title>X-Background / Wallpaper</title>
520 <simpara>Should be the same as the Graphics file.</simpara>
521
522 <simpara><inlinemediaobject>
523   <imageobject>
524   <imagedata fileref="../images/MorphixLiveKiosk.png"/>
525   </imageobject>
526   <textobject><phrase>Rebranded Boot Splash Backround</phrase></textobject>
527 </inlinemediaobject></simpara>
528
529 </section>
530 </section>
531 </section>
532 <section>
533 <title>Morphix tools</title>
534 <simpara>A number of commandline tools and scripts are provided in order to help
535 you morph. You can find all of these in the Morphix repository,
536 see <ulink url="http://www.morphix.org/debian">http://www.morphix.org/debian</ulink> for details.</simpara>
537
538 <simpara><indexterm>
539   <primary>module-builder</primary>
540 </indexterm>
541 <emphasis>- module-builder (morphix-modulebuilder)</emphasis>
542         Constructs a module from a directory</simpara>
543
544 <simpara><indexterm>
545   <primary>module-extractor</primary>
546 </indexterm>
547 <emphasis>- module-extractor (morphix-moduleextractor)</emphasis>
548         Extracts files from a module to a directory</simpara>
549
550 <simpara><indexterm>
551   <primary>make-iso</primary>
552 </indexterm>
553 <emphasis>- make-iso (morphix-make-iso)</emphasis>
554         Creates a bootable ISO from a directory, detects multiple base versions.</simpara>
555
556 <simpara><indexterm>
557   <primary>isomorph</primary>
558 </indexterm>
559 <emphasis>- isomorph (morphix-isomorph)</emphasis>
560         Lists modules on an ISO, adds or removes modules from an ISO, and more!</simpara>
561
562 <simpara><indexterm>
563   <primary>mmaker</primary>
564 </indexterm>
565 <emphasis>- mmaker (morphix-mmaker)</emphasis>
566         Creates a base or main module, using template files. Examples are in /usr/share/mmaker/templates.
567 See <ulink url="http://www.morphix.org/wiki/index.php/ModuleMaker">http://www.morphix.org/wiki/index.php/ModuleMaker</ulink>
568 and documentation in /usr/share/doc/mmaker for details.</simpara>
569
570 <simpara><indexterm>
571   <primary>isomaker</primary>
572 </indexterm>
573 <emphasis>- isomaker (morphix-mmaker)</emphasis>
574         Creates an iso, using one or more mmaker template files.
575         See documentation in /usr/share/doc/mmaker for details.</simpara>
576
577 <simpara><indexterm>
578   <primary>make-mini</primary>
579 </indexterm>
580 <emphasis>- make-mini (morphix-mmaker)</emphasis>
581         Commandline tool for building homedir and language minimodules.</simpara>
582
583 <simpara><emphasis>- install2mainmod (morphix-install2mainmod)</emphasis>
584         Converts a running hdd install into a mainmodule.</simpara>
585
586 <simpara><indexterm>
587   <primary>minimodgen</primary>
588 </indexterm>
589 <emphasis>- minimod-gen (morphix-minimodgen)</emphasis>
590         Provides a commandline interface for building simple minimodules.</simpara>
591
592 <simpara><emphasis>- addtoiso (morphix-addtoiso)</emphasis>
593         Add file to an iso, without having to copy the file all within the image</simpara>
594
595 <simpara><indexterm>
596   <primary>morphix-rebrand</primary>
597 </indexterm>
598 <emphasis>- morphix-rebrand (morphix-rebrand)</emphasis>
599         This script Re-brands a Morphix CD image using a single graphics file.</simpara>
600
601 </section>
602 <section>
603 <title>HowTo: Some Examples to help you start Morphing</title>
604 <simpara><indexterm>
605   <primary>MorphingMorphix</primary>
606 </indexterm>
607 Some <emphasis>updated</emphasis> How Tos to help you get started with Morphing. These HowTos are available on interacive <emphasis>How To</emphasis> LiveCD called <emphasis>Morphing-Morphix</emphasis>, much better than a boring document.</simpara>
608
609 <section>
610 <title>A look at MorphingMorphix 0.3</title>
611 <simpara>The purpose of MorphingMorphix is to provide a quick way
612 to start Morphing and to showcase all the Morphix tools
613 - a LiveCD contruction kit. Just boot the CD and start
614 Morphing, no need to install tools, compile applications or
615 switch operating systems. All that is required is some space
616 on a connected hard drive.</simpara>
617
618 <simpara>You do not have to use MorphingMorphix you just need a debian based system and <link linkend="SettingUptheBuildEnvironment">Set Up the Build Environment</link></simpara>
619
620 <simpara>On MorphingMorphix there are a number of interactive
621 HowTo/examples. The examples work best if you work though
622 them in order. First configure MorphingMorphix so that some
623 extra disk space is available. Then work through the
624 examples in order.</simpara>
625
626 <simpara>Some of the examples, such as using mmaker and isomaker
627 require access to the internet, so that software can be
628 downloaded from repositories to build new parts of a
629 MorphixCD. The examples are very machine intensive,
630 using lots of disk space, memory, and bandwidth.</simpara>
631
632 <simpara>The following Morphs can be completed from the LiveCD.</simpara>
633
634 <itemizedlist>
635 <listitem>
636 <simpara>
637 <link linkend="Introduction">Introduction to isomorph</link>
638 </simpara>
639 </listitem>
640 <listitem>
641 <simpara>
642 <link linkend="Remove">Remove Modules</link>
643 </simpara>
644 </listitem>
645 <listitem>
646 <simpara>
647 <link linkend="MiniMorphExample">MiniMorph Example</link>
648 </simpara>
649 </listitem>
650 <listitem>
651 <simpara>
652 <link linkend="HomeDir">Saving files in /home/morph</link>
653 </simpara>
654 </listitem>
655 <listitem>
656 <simpara>
657 <link linkend="AutoBuilding">Mmaker Example</link>
658 </simpara>
659 </listitem>
660 <listitem>
661 <simpara>
662 <link linkend="MainModule">Chrooting a Main Module</link>
663 </simpara>
664 </listitem>
665 <listitem>
666 <simpara>
667 <link linkend="Rebrand">Rebrand an ISO</link>
668 </simpara>
669 </listitem>
670 <listitem>
671 <simpara>
672 <link linkend="BuildingwholeISO">Building a whole ISO from Scratch</link>
673 </simpara>
674 </listitem>
675 <listitem>
676 <simpara>
677 <link linkend="TestQemu">Testing an iso using Qemu</link>
678 </simpara>
679 </listitem>
680 </itemizedlist>
681 </section>
682 <section id="Introduction">
683 <title>Introduction</title>
684 <simpara>LiveCD are stored as .iso files. Which can then be written
685 to a CD. One of the morphing-tools is isomorph. This can be
686 used to manipulate morphix iso files.</simpara>
687
688 <simpara>Isomorph can list, add, del and get files on the Morphix
689 LiveCDs.</simpara>
690
691 <simpara>Isomorph is used in all of the other examples.</simpara>
692
693 <simpara>For example we will now run the command</simpara>
694
695 <literallayout class="monospaced">isomorph --list MyMorph.iso</literallayout>
696 </section>
697 <section id="Remove">
698 <title>Remove Modules</title>
699 <simpara>We have now got our CD Image file, by copying this running
700 CD. As you have seen in the last example, this image
701 contains the MainModule and lots of MiniModules.  The easy
702 way to make a new LiveCD is to build new MiniModules and a
703 new MainModule.</simpara>
704
705 <simpara>Hence the first task is to delete the MainModule and
706 MiniModules from the LiveCD image.
707 Remove Modules</simpara>
708
709 <simpara>We will again use isomorph</simpara>
710
711 <literallayout class="monospaced">isomorph --del-all main ./MyMorph.iso ./tmp.iso
712 mv ./tmp.iso ./MyMorph.iso
713 isomorph --del-all mini ./MyMorph.iso ./tmp.iso
714 mv ./tmp.iso ./MyMorph.iso</literallayout>
715 </section>
716 <section id="MiniMorphExample">
717 <title>MiniMorph Example</title>
718 <simpara>The next Morph is making the MiniModule to auto run an
719 application once the window manager has loaded.</simpara>
720
721 <simpara>This Morph is to demonstrate the use of one of the morphix
722 tools - morphmini. This is mmaker's little brother. As in
723 other examples this makes use of XML template files.</simpara>
724
725 <screen>&lt;comps&gt;
726  &lt;group&gt;
727   &lt;minimod&gt;
728    &lt;version&gt;0.0.1&lt;/version&gt;
729    &lt;description&gt;MorphMini launch Morphing-Morphix-GUI&lt;/description&gt;
730    &lt;minitag&gt;MorphixMini-Launch-MM-GUI&lt;/minitag&gt;
731    &lt;maintag&gt;ALL&lt;/maintag&gt;
732    &lt;bootoption&gt;ALL&lt;/bootoption&gt;
733    &lt;root&gt; &lt;!-- Files or Packages to be overlaid on the rootfile system - good for saving ramspace --&gt;
734     &lt;files&gt;
735      &lt;local&gt;
736       &lt;from&gt;/home/morph/morphix/trunk/morph-scripts/mmorphix/morphing-morphix-gui.sh&lt;/from&gt;
737       &lt;to&gt;/usr/sbin/morphing-morphix-gui&lt;/to&gt;
738      &lt;/local&gt;
739      &lt;local&gt;
740       &lt;from&gt;/home/morph/morphix/trunk/morph-scripts/mmorphix/MorphingMorphix.xpm&lt;/from&gt;
741       &lt;to&gt;/usr/share/morphing-morphix/&lt;/to&gt;
742       &lt;/local&gt;
743     &lt;/files&gt;
744    &lt;/root&gt;
745    &lt;commandlist&gt; &lt;!-- Commands to be started from minimodule --&gt;
746     &lt;X&gt;         &lt;!-- Commands to run in X windows --&gt;
747      &lt;command&gt;/usr/sbin/morphing-morphix-gui &amp;amp; &lt;/command&gt;&lt;!-- &amp;amp; is xml format for &amp; --&gt;
748     &lt;/X&gt;
749    &lt;/commandlist&gt;
750   &lt;/minimod&gt;
751  &lt;/group&gt;
752 &lt;/comps&gt;</screen>
753 <simpara>We will now build the MiniModule then add the MiniModule to
754 the the LiveCD.</simpara>
755
756 <literallayout class="monospaced">morphmini ./MorphixMini-Launch-MM-GUI.xml ./MorphixMini-Launch-MM-GUI.mod
757 isomorph --add mini ./MorphixMini-Launch-MM-GUI.mod ./MyMorph.iso ./tmp.iso
758 mv ./tmp.iso ./MyMorph.iso</literallayout>
759 <simpara><ulink url="http://svn.sourceforge.net/viewcvs.cgi/morphix/trunk/scripts-mini/">Other templates for morphmini are available</ulink></simpara>
760
761 </section>
762 <section id="HomeDir">
763 <title>Morphing the Home Directory</title>
764 <simpara>The next Morph is to save the files in the users home
765 directory.</simpara>
766
767 <simpara>The following will be saved</simpara>
768
769 <itemizedlist>
770 <listitem>
771 <simpara>
772 Any files and directories in /home/morph
773 </simpara>
774 </listitem>
775 <listitem>
776 <simpara>
777 Hidden system files. (These are the files beginning with a . e.g. .icewm)
778 </simpara>
779 </listitem>
780 </itemizedlist>
781 <simpara>The following will not be saved</simpara>
782
783 <itemizedlist>
784 <listitem>
785 <simpara>
786 The X server setting - these are generated on boot up.
787 </simpara>
788 </listitem>
789 </itemizedlist>
790 <simpara>Basically all the files and directories in /home/morph will
791 be zipped into placed in to a self-extracting MiniModule.</simpara>
792
793 <simpara>So feel free to save some files, settings, etc within the
794 home directory before continuing.This is really useful for
795 setting default homepages, menus etc.</simpara>
796
797 <simpara>The power of a MiniModule is that they are very simple to
798 build, but really useful to change the whole impression of
799 the cd.</simpara>
800
801 <simpara>We make the mini-module using one of the morphix-tools
802 make-mini, along with isomorph to add the MiniModule to the
803 image file.</simpara>
804
805 <literallayout class="monospaced">make-mini --homedir --hidden MorphixMini-MM-Saved-Home.mod
806 isomorph --add mini MorphixMini-MM-Saved-Home.mod ./MyMorph.iso ./tmp.iso
807 mv ./tmp.iso ./MyMorph.iso</literallayout>
808 </section>
809 <section id="AutoBuilding">
810 <title>Mmaker Example</title>
811 <simpara>MMaker is a tool that is quite simple in nature. Using a
812 so-called template, an xml file with all the information
813 about the module you want to build, you can auto-build a
814 Morphix MainModule.</simpara>
815
816 <simpara>That's it kids, we will just have a look at
817 morphing-morphix.xml used to build this MainModule
818 currently running.</simpara>
819
820 <simpara>We will then use mmaker to build a new version of the
821 MainModule. Unless you one of the lucky people who has a
822 local repository, you will be using the main Debian repository.</simpara>
823
824 <simpara>You need a fast connection to Debian repository and a lot
825 of space to build the MainModule before it is compressed.</simpara>
826
827 <simpara>This step could take up to 45 minutes, but hey it is
828 automated!</simpara>
829
830 <simpara>We will use these commands</simpara>
831
832 <literallayout class="monospaced">mmaker /usr/share/morphing-morphix/morphing-morphix.xml /tmp/morphing-morphix.mod
833 isomorph --add main /tmp/morphing-morphix.mod ./MyMorph.iso ./tmp.iso
834 mv ./tmp.iso ./MyMorph.iso</literallayout>
835 <simpara>As you might have guessed, the template is the key to all of this. A look at one for Morphix LightGUI: [note to editor: the template uses an xml notation, so might not appear when viewing in html]</simpara>
836
837 <literallayout class="monospaced">&lt;comps&gt;
838 &lt;groups&gt;
839 &lt;version&gt;0.5&lt;/version&gt;
840 &lt;id&gt;lightgui&lt;/id&gt;
841 &lt;name&gt;Morphix LightGUI&lt;/name&gt;
842 &lt;repositorylist&gt;
843 &lt;repository type="debian"&gt;ftp://ftp.debian.org/debian&lt;/repository&gt;
844 &lt;repository type="plain"&gt;http://www.morphix.org/debian&lt;/repository&gt;
845 &lt;/repositorylist&gt;
846 &lt;description&gt;Morphix LightGUI mainmodule. Includes XFCE4, Firefox,
847 Abiword and a host of other goodies&lt;/description&gt;
848 &lt;type&gt;mainmod&lt;/type&gt;
849 &lt;suite&gt;sid&lt;/suite&gt;
850 &lt;packagelist&gt;
851 &lt;packagereq&gt;abiword&lt;/packagereq&gt;
852 &lt;packagereq&gt;xfce4&lt;/packagereq&gt;
853 &lt;packagereq&gt;mozilla-firefox&lt;/packagereq&gt;
854 &lt;!-- ... other goodies here ... --&gt;
855 &lt;/packagelist&gt;
856 &lt;/groups&gt;
857 &lt;/comps&gt;</literallayout>
858 <simpara>NB This is a partial template see <ulink url="http://svn.sourceforge.net/viewcvs.cgi/morphix/trunk/mmaker/templates/">http://svn.sourceforge.net/viewcvs.cgi/morphix/trunk/mmaker/templates/</ulink> for template examples.</simpara>
859
860 <simpara>Seems simple, doesn't it? The actual template for MorphingMorphix is quite a bit longer (and contains a package to start xfce4 at boot time), but it's very simple to specify which repositories you want to use, what Debian suite you want, what type of Morphix module you want to autobuild and naturally the packages you want. Currently, MMaker can only build base and main modules . A few tags might need some extra explaining:</simpara>