Blog Code Forum

ISO Testbed

From Wiki.cyring.fr

Revision as of 10:56, 23 September 2012 by Cyril (Talk | contribs)
Jump to: navigation, search

Contents

Syslinux

Setup

  • Download & compile the package of Syslinux
from ArchLinux

  1. # refresh the Arch Build System
  2. sudo abs
  3. # create a packages repository
  4. mkdir PKGBUILD
  5. # copy the SysLinux bash script
  6. cp -r /var/abs/core/syslinux PKGBUILD/
  7. cd PKGBUILD/syslinux/
  8. # build SysLinux
  9. makepkg
  10. cd


from GIT

  1. # create a GIT repository
  2. mkdir GIT
  3. cd GIT
  4. # clone the all SysLinux tree
  5. git clone git://git.kernel.org/pub/scm/boot/syslinux/syslinux.git
  6. cd syslinux
  7. # build SysLinux
  8. make
  9. cd


ISO Testbed structure
  • Prepare the directories tree

  1. mkdir -p CD_root/isolinux
  2. mkdir CD_root/images CD_root/kernel
if ArchLinux
  1. cp PKGBUILD/syslinux/src/syslinux-4.05/core/isolinux.bin CD_root/isolinux/
  2. cp PKGBUILD/syslinux/src/syslinux-4.05/memdisk/memdisk CD_root/kernel/
  3. cp PKGBUILD/syslinux/src/syslinux-4.05/com32/modules/*.c32 CD_root/isolinux/
if GIT
  1. cp GIT/syslinux/core/isolinux.bin CD_root/isolinux/
  2. cp GIT/syslinux/memdisk/memdisk CD_root/kernel/
  3. cp GIT/syslinux/com32/modules/*.c32 CD_root/isolinux/


Configuration

  • Write the configuration file

  1. nano CD_root/isolinux/isolinux.cfg
DEFAULT dir
KBDMAP fr.ktl
TIMEOUT 0
PROMPT 1
#
LABEL dir
COM32 ls.c32

LABEL off
COMBOOT poweroff.com

LABEL core
COM32 coredts.c32

LABEL fr
COM32 kbdmap.c32
APPEND fr.ktl

LABEL us
COM32 kbdmap.c32
APPEND us.ktl

Keyboard

  • If required, make a French keyboard translation map

  1. # translate a French keyboard
  2. keytab-lilo /usr/share/kbd/keymaps/i386/qwerty/us.map.gz /usr/share/kbd/keymaps/i386/azerty/fr-latin1.map.gz > CD_root/isolinux/fr.ktl
  3. # translate an English keyboard
  4. keytab-lilo /usr/share/kbd/keymaps/i386/qwerty/us.map.gz /usr/share/kbd/keymaps/i386/qwerty/us.map.gz > CD_root/isolinux/us.ktl


Automation

  • Code a script to build the ISO image

  1. nano buildiso.sh
mkisofs -o isotestbed.iso \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
CD_root
  1. chmod +x buildiso.sh


  • Run the script to build the ISO image

  1. ./buildiso.sh


I: -input-charset not specified, using utf-8 (detected in locale settings)
Size of boot image is 4 sectors -> No emulation
Total translation table size: 2048
Total rockridge attributes bytes: 0
Total directory bytes: 6334
Path table size(bytes): 54
Max brk space used 1f000
376 extents written (0 MB)

VirtualBox

- EOF -

Personal tools