#=====================================================#
# How to make Original LiveCD/DVD with Make One Linux #
#=====================================================#

* Caution
  - install all necessary programs for Make One Linux before you start making
    LiveCD/DVD.
  - see Online Manual for more detail information.

* Process
  1.Preparation
    Make backups of all important files and delete them from your system.
    For example, deleting these files are recommended.
      * unnecessary accounts
      * backup files
      * cache, history, and cookie files about web browser etc.
    In addition to above, delete indivisual information as much as possible.
    It is easy for us to carry LiveCD/DVD, but it is also easy for thief to do.
    If you cannot delete it anyway, edit exclude-file.list to exclude it from
    your LiveCD/DVD. See next section for exclude-file.list detail.

  2.Edit Configuration Files
    In the case that you installed Make One Linux from rpm package,
    configuration files are in /etc/mol directory. There are the following 5
    files in this directory.
      * exclude-file.list
      * exclude-package.list
      * include-module.list
      * isolinux.cfg
      * molmake.conf
    This is the way to edit these files and the meaning of them.
      * exclude-file.list
        You can specify the files or directories that you want to exclude from
        your LiveCD/DVD by editing this file. If CD/DVD Media cannot hold your
        LiveCD/DVD system, edit this file and reduce the capacity.
        For example, if /opt, /usr/local, and /usr/src is unnecessary, then
        edit this file like this.
            /opt
            /usr/local
            /usr/src
      * exclude-package.list
        You can specify the rpm packages that you want to exclude from your
        LiveCD/DVD by editing this file. If CD/DVD Media cannot hold your
        LiveCD/DVD system, edit this file and reduce the capacity.
        For example, if foo-x.x.x.i386.rpm and bar-y.y.y.i386.rpm packages
        are unnecessary, then edit this file like this.
            foo
            bar
      * include-module.list
        You can specify the kernel modules that you want to include in your
        LiveCD/DVD by editing this file. The necessary modules for booting are
        automatically included, so you don't have to include them with this
        file.
        For example, if foo.ko and bar.ko kernel modules are unnecessary,
        then edit this file like this.
            foo
            bar
      * isolinux.cfg
        Make One Linux uses ISOLINUX as boot loader. This is a ISOLINUX
        Configuration file. See ISOLINUX Document for more detail.
      * molmake.conf
        This is the configuration file for molmake script. You can configure
        the way of making your LiveCD/DVD by this file. The following
        environment variables are in this file.
          - KERNEL_RELEASE
              Specify linux kernel version name in this variable. Default value
              is current kernel version.
          - DISTRIBUTION
              Specify base distribution name in this variable.
                RHEL 4 or RHEL 4 based distro (like CentOS 4.x) :
                    RHEL4
                Fedora Core 5 :
                    Fedora5
          - BUILD_ROOT
              Specify work directory for mkinitrd-mol, mkfs-mol, and
              mkisofs-mol scripts in this variable. Default value is
              /tmp/molmake. If you don't specify "raw" in MAIN_FS variable,
              mkfs-mol script makes large image file in this directory. So
              specify the directory which can afford to hold this image file.
          - ISODIR
              Specify the directory where ISO9660 image file is made by
              mkisofs-mol. ISO9660 image file will become very large, so
              specify the directory which can afford to hold this image file.
          - SBINDIR
              Specify the directory where you installed molmake, mkinitrd-mol,
              etc. If you installed Make One Linux with rpm package, default
              value is /usr/sbin.
          - LIBEXECDIR
              Specify the directory where you installed linuxrc, autosetup-mol,
              etc. If you installed Make One Linux with rpm package, default
              value is /usr/libexec.
          - SYSCONFDIR
              Specify the directory where you installed molmake.conf,
              execlude-file.list, etc. If you installed Make One Linux with rpm
              package, default value is /etc.
          - DATADIR
              Specify the directory where you installed data file, patch file,
              etc. If you installed Make One Linux with rpm package, default
              value is /usr/share.
          - MKSQUASHFS
              Specify mksquashfs command. Default value is mksquashfs.
          - ISOLINUXBIN
              Specify isolinux.bin file. If you installed Make One Linux with
              rpm package, default value is /usr/lib/syslinux/isolinux.bin.
          - HWSETUP
              Specify hwsetup-mol command. If you installed Make One Linux with
              rpm package, default value is /usr/libexec/hwsetup-mol.
          - DDCXINFO
              Specify ddcxinfo-mol command. If you installed Make One Linux
              with rpm package, default value is /usr/libexec/ddcxinfo-mol.
          - BUSYBOX
              Specify busybox-mol command. If you installed Make One Linux with
              rpm package, default value is /usr/libexec/busybox-mol.
          - EX_FILE_LIST
              Specify exclude-file.list file. If you installed Make One Linux
              with rpm package, default value is /etc/mol/exclude-file.list.
          - EX_PKG_LIST
              Specify exclude-package.list file. If you installed Make One
              Linux with rpm package, default value is
              /etc/mol/exclude-package.list.
          - IN_MOD_LIST
              Specify include-module.list file. If you installed Make One Linux
              with rpm package, default value is /etc/mol/include-module.list.
          - INITRD_BS
              Specify block size for initial ramdisk (initrd.img). Default
              value is 1k.
          - INITRD_COUNT
              Specify the number of blocks for initial ramdisk. Default value
              is 16384.
          - COPY_INITRD_TO_BOOTDIR
		      Specify "yes" in this variable if you want to copy initial
			  ramdisk to /boot directory. If not, don't specify anything.
			  The copyed ramdisk is named initrd-mol-x.y.z.img (x.y.z is Make
              One Linux version). Boot menu is also added to your bootloader
              to boot your based system from the ramdisk.
          - MAIN_FS
		      Specify image file filesystem for Make One Linux. You can select
			  from among these filesystems, squashfs, ext2, ext3, reiserfs, or
			  raw. Default value is squashfs.
			  squashfs is recommended if it is not problem. This filesystem
			  compresses your system, so your LiveCD/DVD can hold large system.
			  If you specify "raw", you can make LiveCD/DVD which has no image
			  file. However, it takes much time to boot this system.
          - MAINFS_BS
		      Specify block size for the filesystem which is specified in
			  MAIN_FS. If "squashfs" or "raw" is specified in MAIN_FS, this
			  variable is ignored.
          - MAINFS_COUNT
		      Specify the number of blocks for the filesystem which is
			  specified in MAIN_FS. If "squashfs" or "raw" is specified in
			  MAIN_FS, this variable is ignored.
          - ISO_SUFFIX
              Specify SUFFIX about ISO9660 image file and volume id. Default
              value is distribution name.
          - INSTALL2WIN
              If you want to set install2win.bat in your CD/DVD, specify yes
              in this variable. By using install2win.bat script, you can
              install your LiveCD/DVD into Windows File System. Default value
              is yes.
          - INSTALL2LIN
              If you want to set install2lin.sh in your CD/DVD, specify yes
              in this variable. By using install2lin.sh script, you can
              install your LiveCD/DVD into Linux File System. Default value
              is yes.

  3.Run molmake Script
    Run molmake script by root.
        $ su -
        Password:
        # molmake
    This script is a front-end of mkinitrd-mol, mkfs-mol, and mkisofs-mol
    scripts, and it can make ISO9660 image file for your LiveCD/DVD. This may
    take a while. When running this script, don't make large files because
    this script may not be able to make ISO9660 image correctly.
    If some error occures and interrupts this script, then run molmake script
    with --clean option to remove created files.
        # molmake --clean

  4.Write ISO9660 Image File
    ISO9660 image file is made in the directory which are specified in
    molmake.conf (default is /tmp/molmake directory). Write this image to
    CD/DVD, and making LiveCD/DVD is complete.

