Chapter 10. Creating a bootable Bering CD-ROM

Revision History
Revision 0.22002-04-14LC
initial revision

Table of Contents

Objectives
Step 1: preparing the distro
Step 2: downloading the required packages
Step 3: preparing the Bering CD-Rom content
Step 4: making the CD
Support
Thanks to...

Objectives

These instructions assume that you already have some knowledge of Bering and a working distribution running out of one or two floppies.

They have been tested with Bering v1.0-rc1 on several hardware configurations, using only IDE CD-ROM's. No SCSI support is planned at this stage.

Comments on this section should be addressed to its maintainer: Luis Correia .

Step 1: preparing the distro

First make sure you have your Bering floppy distro already working. You may want to take one or more of the following actions:

  • Define root password

  • Generate the ssh keys, if you will use them

Make sure to read the CD-Rom section of Bering user's guide chapter on "Booting Bering from different boot-media".

Step 2: downloading the required packages

From now on we are going to use a Windows machine to create the CD. Linux users should have no problem in following.

Download the two following packages, syslinux and cdrtools. Unpack them with WinZip. Also download the makeiso.bat MS-DOS bat file from the Bering "contrib" directory.

Create a new directory. It can be anywhere but in practice I recommend to create it next to the root (e.g. C:\) since it will be easier to access it at a later stage from the DOS prompt. Let's call it BCD ("Bering CD"). We will have the following directory hierarchy:

     C:\
      |
       --- C:\BCD
            |
             --- C:\BCD\diskcontent

Once this is done put in the C:\BCD directory the following 3 files:

  • mkisofs.exe (1) and cygwin1.dll (2) extracted out of the cdrtool directory.

  • makeiso.bat (3) downloaded from the Bering "contrib" directory.

Then put in the C:\BCD\diskcontent directory the following file:

  • isolinux.bin extracted out of the syslinux directory.

Warning

Other versions of these files - older or more recent ones - may also work. You are on your own here!

Step 3: preparing the Bering CD-Rom content

If you are in a hurry, download the initrd.cdrom file from the Bering "contrib" directory and rename it initrd.lrp. This is an initrd.lrp "package" which includes the necessary kernel modules to access a CD-Rom at boot time. You can also create it yourself as follow:

Boot your working Bering floppy. In the /boot/lib/modules directory put the following modules that will allow boot time CD-Rom support (those modules can be found in the Bering modules download area):

cdrom.o
ide-mod.o
ide-cd.o
ide-probe-mod.o
isofs.o

Declare those names, without the ".o" suffix in the /boot/etc/modules file through the initrd package menu. The order MUST be respected.

Now backup the initrd.lrp package !

Copy all the files from your working Bering floppy to the C:\BCD\diskcontent directory (except initrd.lrp if you have not created it yourself as described above, in which case you will put in the C:\BCD dir the one you downloaded).

In this directory do the following:

  • Rename syslinux.cfg to isolinux.cfg

  • Delete ldlinux.sys

  • Edit isolinux.cfg and replace the /dev/fd0u1680 entries (after boot= and PKGPATH=) by /dev/cdrom.

  • Add any package you might need out of the CD. Do not forget the hackers though...

After that your isolinux.cfg file will look like:

display syslinux.dpy
timeout 0
default linux initrd=initrd.lrp init=/linuxrc rw root=/dev/ram0 boot=/dev/cdrom:iso9660 PKGPATH=/dev/cdrom:iso9660,/dev/fd0:msdos
   LRP=root,etc,local,modules,iptables,ppp,pppoe,keyboard,shorwall,ulogd,dnscache,weblet,libz,routerst,sshd,tinydns,ipsec

Important

Do not forget the rw parameter if you are usin a post 2.4.18 kernel otherwise you will get a kernel panic!

Step 4: making the CD

Get access to MS-DOS from within Windows. Change your directory to C:\BCD. Then execute the makeiso command file. This file contains one single line with the following command:

mkisofs -o bering.iso -b isolinux.bin -c isolinux.cat -no-emul-boot -boot-load-size 4 -boot-info-table -hide isolinux.cat -hide isolinux.bin -l diskcontent

You should now have a bering.iso CD-Rom image in C:\BCD. You can now create your Bering CD from this ISO image with your favorite CD burner program.

Change your BIOS settings to declare your CD-Rom as the first boot device. You should be all set.

Tip

It is of course much better to test your Bering CD with a CD-RW :-). But be aware that a lot of "old" CD drives just won't be able to read them. The CD-RW will be used for testing on a recent machine. Once you are happy with your image you will have to burn a traditionnal CD-Rom for your old i486-based Bering router :-)

Support

I read both the leaf-user and the leaf-devel lists. You may put your questions there.

Thanks to...

Charles Steinkuehler for creating the *stein series,

Jacques Nilo & Eric Wolzak for the Bering series,

Allen Hillery for the hints & Christian Hostelet for beta testing,

all LEAF developpers,

my friend João Alves for his helpful linux support and

Mike Noyes for keeping up his excellent work on the LEAF site.