Blog Code Forum

ISO Testbed

From Wiki.cyring.fr

(Difference between revisions)
Jump to: navigation, search
(Page créée avec « == ISOLINUX == === Setup === * Download the [http://www.syslinux.org/wiki/index.php/ISOLINUX ISOLINUX] * Prepare the directories tree ---- <syntaxhighlight lang="bash" lin... »)
 
(8 intermediate revisions not shown)
Line 1: Line 1:
-
== ISOLINUX ==
+
== Syslinux ==
=== Setup ===
=== Setup ===
-
* Download the [http://www.syslinux.org/wiki/index.php/ISOLINUX ISOLINUX]
+
* Download & compile the package of [http://www.syslinux.org/wiki/index.php/The_Syslinux_Project Syslinux]
 +
==== from ArchLinux ====
 +
----
 +
<syntaxhighlight lang="bash" line start="1">
 +
# refresh the Arch Build System
 +
sudo abs
 +
# create a packages repository
 +
mkdir PKGBUILD
 +
# copy the SysLinux bash script
 +
cp -r /var/abs/core/syslinux PKGBUILD/
 +
cd PKGBUILD/syslinux/
 +
# build SysLinux
 +
makepkg
 +
cd
 +
</syntaxhighlight>
 +
----
 +
<br />
 +
==== from GIT ====
 +
----
 +
<syntaxhighlight lang="bash" line start="1">
 +
# create a GIT repository
 +
mkdir GIT
 +
cd GIT
 +
# clone the all SysLinux tree
 +
git clone git://git.kernel.org/pub/scm/boot/syslinux/syslinux.git
 +
cd syslinux
 +
# build SysLinux
 +
make
 +
cd
 +
</syntaxhighlight>
 +
----
 +
<br />
 +
==== ISO Testbed structure ====
* Prepare the directories tree
* Prepare the directories tree
----
----
<syntaxhighlight lang="bash" line start="1">
<syntaxhighlight lang="bash" line start="1">
-
mkdir CD_root
+
mkdir -p CD_root/isolinux
-
cd CD_root
+
mkdir CD_root/images CD_root/kernel
-
mkdir isolinux
+
</syntaxhighlight>
-
cp /users/PKGBUILD/syslinux/src/syslinux-4.05/core/isolinux.bin isolinux/
+
===== if ArchLinux =====
-
mkdir images kernel
+
<syntaxhighlight lang="bash" line start="3">
-
cp /users/PKGBUILD/syslinux/src/syslinux-4.05/memdisk/memdisk kernel/
+
cp PKGBUILD/syslinux/src/syslinux-4.05/core/isolinux.bin CD_root/isolinux/
-
cp /users/PKGBUILD/syslinux/src/syslinux-4.05/com32/modules/*.c32 isolinux/
+
cp PKGBUILD/syslinux/src/syslinux-4.05/memdisk/memdisk CD_root/kernel/
 +
cp PKGBUILD/syslinux/src/syslinux-4.05/com32/modules/*.c32 CD_root/isolinux/
 +
</syntaxhighlight>
 +
===== if GIT =====
 +
<syntaxhighlight lang="bash" line start="3">
 +
cp GIT/syslinux/core/isolinux.bin CD_root/isolinux/
 +
cp GIT/syslinux/memdisk/memdisk CD_root/kernel/
 +
cp GIT/syslinux/com32/modules/*.c32 CD_root/isolinux/
</syntaxhighlight>
</syntaxhighlight>
----
----
 +
<br />
 +
=== Configuration ===
=== Configuration ===
* Write the configuration file
* Write the configuration file
----
----
<syntaxhighlight lang="bash" line start="1">
<syntaxhighlight lang="bash" line start="1">
-
nano isolinux/isolinux.cfg
+
nano CD_root/isolinux/isolinux.cfg
</syntaxhighlight>
</syntaxhighlight>
<pre>
<pre>
-
UI menu.c32
+
DEFAULT dir
-
DEFAULT none
+
-
PROMPT 0
+
-
#
+
-
LABEL none
+
KBDMAP fr.ktl
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
</pre>
</pre>
 +
=== Keyboard ===
=== Keyboard ===
-
* If required, make a french keyboard translation map
+
* If required, make a French keyboard translation map
----
----
<syntaxhighlight lang="bash" line start="1">
<syntaxhighlight lang="bash" line start="1">
-
keytab-lilo /usr/share/kbd/keymaps/i386/qwerty/us.map.gz /usr/share/kbd/keymaps/i386/azerty/fr-latin1.map.gz > isolinux/fr.ktl
+
# translate a French keyboard
 +
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
 +
# translate an English keyboard
 +
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
</syntaxhighlight>
</syntaxhighlight>
<br />
<br />
-
=== Scripting ===
+
=== Automation ===
* Code a script to build the ISO image
* Code a script to build the ISO image
----
----
<syntaxhighlight lang="bash" line start="1">
<syntaxhighlight lang="bash" line start="1">
-
cd ..
 
nano buildiso.sh
nano buildiso.sh
</syntaxhighlight>
</syntaxhighlight>
Line 48: Line 107:
CD_root
CD_root
</pre>
</pre>
-
<syntaxhighlight lang="bash" line start="3">
+
<syntaxhighlight lang="bash" line start="2">
chmod +x buildiso.sh
chmod +x buildiso.sh
</syntaxhighlight>
</syntaxhighlight>
Line 54: Line 113:
* Run the script to build the ISO image
* Run the script to build the ISO image
----
----
-
<syntaxhighlight lang="bash" line start="1">
+
<syntaxhighlight lang="bash" line start="3">
./buildiso.sh
./buildiso.sh
</syntaxhighlight>
</syntaxhighlight>
Line 68: Line 127:
:''376 extents written (0 MB)''
:''376 extents written (0 MB)''
</small><big><big>'''”'''</big></big>
</small><big><big>'''”'''</big></big>
-
== VirtualBox ==
+
== Virtualization ==
-
- EOF -
+
=== VirtualBox ===
 +
* Create a new virtual machine
 +
{| class="wikitable"
 +
|-
 +
| General ||
 +
|-
 +
| Name: || ISO
 +
|-
 +
| OS Type: || DOS
 +
|-
 +
| System ||
 +
|-
 +
| Base Memory: || 64 MB
 +
|-
 +
| Processor(s): || 2
 +
|-
 +
| Execution Cap: || 100%
 +
|-
 +
| Boot Order: || CD/DVD-ROM
 +
|-
 +
| VT-x/AMD-V: || Enabled
 +
|-
 +
| Nested Paging: || Enabled
 +
|-
 +
| Display ||
 +
|-
 +
| Video Memory: || 16 MB
 +
|-
 +
| 3D Acceleration: || Disabled
 +
|-
 +
| 2D Video Acceleration: || Disabled
 +
|-
 +
| Remote Desktop Server: || Disabled
 +
|-
 +
| Storage ||
 +
|-
 +
| IDE Controller || -
 +
|-
 +
| IDE Primary Master (CD/DVD): || isotestbed.iso
 +
|-
 +
| SATA Controller || -
 +
|-
 +
| Audio || Disabled
 +
|-
 +
| Network || Disabled
 +
|-
 +
| Serial Ports || Disabled
 +
|-
 +
| USB ||
 +
|-
 +
| Device Filters: || 0 (0 active)
 +
|-
 +
| Shared Folders || None
 +
|}

Latest revision as of 11:19, 23 September 2012

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)

Virtualization

VirtualBox

  • Create a new virtual machine
General
Name: ISO
OS Type: DOS
System
Base Memory: 64 MB
Processor(s): 2
Execution Cap: 100%
Boot Order: CD/DVD-ROM
VT-x/AMD-V: Enabled
Nested Paging: Enabled
Display
Video Memory: 16 MB
3D Acceleration: Disabled
2D Video Acceleration: Disabled
Remote Desktop Server: Disabled
Storage
IDE Controller -
IDE Primary Master (CD/DVD): isotestbed.iso
SATA Controller -
Audio Disabled
Network Disabled
Serial Ports Disabled
USB
Device Filters: 0 (0 active)
Shared Folders None
Personal tools