Chapter 11. Booting Bering from different boot-media

Revision History
Revision 0.22002-04-14JN, EW
initial revision

Table of Contents

Objectives
The single floppy drive setup
The two-floppy drives setup
Booting from an IDE device
Booting from a CD-Rom with isolinux
Partial backup of packages to/from floppy

Objectives

These instructions are for those who want to boot Bering from something else that the traditional single floppy setup. We assume that you already have some knowledge of Bering.

Many thanks to Allen Hillery for his contribution to this section !

Comments on this section should be addressed to its maintainers: Jacques Nilo or Eric Wolzak .

The single floppy drive setup

The poor man setup ... Do not worry you can still do many things. Here are the tricks:

The main problem when you have got a single floppy drive is space. Especially if you are willing to use those big fat packages like sshd.lrp or ipsec.lrp. But you can still use them in such an environnement. There are basically two approaches:

The first one is to remove useless components from the Bering floppy. Refer to the installation guide to learn how to do that.

But most of the time, for big applications, one floppy won't fit. You then have to setup your distro on two floppies, while still using a single drive. The strategy is as follow:

On the first floppy keep only the following files: linux, ldlinux.sys, syslinux.dpy, syslinux.cfg and initrd.lrp.

On the second floppy put all the remaining LEAF packages that you will need. You have a full floppy available! It can be 1440k, 1680k or 1723k formatted but it should be the same format for both floppies. 1680k is generally working without any problem and is a de facto LEAF standard.

Then edit the syslinux.cfg file of the first floppy. You will enter something like:

display syslinux.dpy
timeout 0
default linux initrd=initrd.lrp init=/linuxrc rw root=/dev/ram0 boot=/dev/fd0u1680:msdos diskwait=yes PKGPATH=/dev/fd0u1680
   LRP=root,etc,local,modules,iptables,pump,keyboard,shorwall,ulogd,dnscache,sshd,ipsec,weblet

Important

The last two lines ("default linux ... ipsec,weblet") must be typed as a single one in syslinux.cfg

Notice the diskwait=yes statement. Once the first floppy will be booted, Bering will ask you to enter the second floppy and will then load the *.lrp LEAF packages.

In this setup you can leave the second floppy on your drive if you want to make changes to your configuration files and backup the corresponding packages. What is on the first floppy generally do not need to be backed-up !

Tip

You can optimize this setup by declaring all your modules in /boot/etc/modules, moving them from /lib/modules to /boot/lib/modules. Then backup initrd.lrp. Then you won't need modules.lrp anymore since everything will be stored in initrd.lrp on the first floppy :-)

The two-floppy drives setup

Here we assume that you have two floppy drives available, namely fd0u1680 and fd1u1680 (assuming 1680k formatted floppies). The first floppy will be s standard Bering floppy. The second one will only contain *.lrp LEAF packages that do not fit on the first floppy. In this setup *.lrp LEAF packages can be on any disk and you only have to adjust the PKGPATH statement of the first "booting" floppy:

display syslinux.dpy
timeout 0
default linux initrd=initrd.lrp init=/linuxrc rw root=/dev/ram0 boot=/dev/fd0u1680:msdos PKGPATH=/dev/fd0u1680,/dev/fd1u1680
   LRP=root,etc,local,modules,iptables,pump,keyboard,shorwall,ulogd,dnscache,sshd,ipsec,weblet

Booting from an IDE device

To install Bering on an IDE device, proceed as follow:

Make sure your IDE device has a first bootable partition and is DOS formatted. With the Windows rescue disk you will have the fdisk and the format utilities to help you doing that. With a linux rescue floppy disk, fdisk and mkfsdos will be your friends.

Warning

Be careful: you will be destroying any pre-existing data !

Once you hard disk is formatted install syslinux. You can install syslinux either from a windows or a linux rescue floppy. Boot your floppy then issue the following command:

syslinux [-s] /dev/hda1

The -s flag might be required for syslinux to work with old buggy BIOSes. See the syslinux web site for more instructions.

Boot a Bering floppy. Install on the /boot/lib/modules the ide-mod.o, ide-disk.o and the ide-probe-mod.o modules. Then declare those modules in /boot/etc/modules through the initrd package configuration menu in this order. Then backup the initrd.lrp package. Once this is done, edit the syslinux.cfg file which will look like:

display syslinux.dpy
timeout 0
default linux initrd=initrd.lrp init=/linuxrc rw root=/dev/ram0 boot=/dev/hda1:msdos PKGPATH=/dev/hda1
   LRP=root,etc,local,modules,iptables,pump,keyboard,shorwall,ulogd,dnscache,sshd,ipsec,weblet

Once you have finished with your floppy preparation, copy all the files from it EXCEPT ldlinux.sys (which is created by syslinux) to the IDE device that you prepared earlier. You should now be able to boot from the IDE device. Once again be careful not to copy ldlinux.sys from the floppy otherwise your disk won't be bootable and you will have to go over the installation of syslinux on your hard disk again.

Booting from a CD-Rom with isolinux

This section does not cover the creation of the Bering cd-rom which is explained in a separate section.

The start options for isolinux are similar to the syslinux options. By default they look like this:

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,pump,keyboard,shorwall,ulogd,dnscache,weblet

There are some important differences with the syslinux parameters:

  • The boot filesystem - iso9660 - must be specified after the boot device (/dev/cdrom) in the boot= statement. Use a colon (:) as a delimiter

  • The devices in your PKGPATH= statement can be given different filesystems The former are seperated from the later with a colon(:)

  • The order in which the devices (/dev/cdrom, /dev/fd0) are declared in the PKGPATH= statement is important. Packages will be picked-up in this order which means that you can override a package from the CD-rom with one provided on the floppy

If you are booting from a CD-Rom the list of packages in the LRP= statement might be pretty long. The problem is that there is a limit to the lenght of isolinux.cfg statements which cannot exceed 255 characters. To avoid this limitation, you can declare the list of packages you are going to use in a file called lrpkg.cfg. When this file exists on the boot device, the package list will be read from it.

This file consists of a single record with a list of packages separated by commas. It looks like:

# cat lrpkg.cfg

root,etc,local,modules,pump,keyboard,shorwall,dnscache,weblet

This file can be present in more locations. The last location in the PKGPATH= statement will be used. So you have the possibility to have a "standard" lrpkg.cfg on your CD and for special occasions or testing, you can have another one on a floppy.

As stated before you can load a package stored on different devices. This is useful in the following situations:

  • To have access to an updated package on the floppy

  • To do a partial backup of of a package on the floppy. Especially useful for configuration files ! Have you ever tried to backup a package on a CD-Rom ? :-)

  • To do testing

You can indicate for every package where to look first: R(everse),r or F(orward),f

With the F(orward) option the searching for the package starts on the left in the package path.

  • With the uppercase F it stops as soon as the first occurence of the package is found.

  • With the lowercase f the search start from left to right but all occurences of the packages are loaded. This option is taken to load a partial backup. Be sure that the package found first is the one with the standard configuration. The one found in the second place will overwrite the saved files with the individual options.

The same rules applies for the R(everse) option. Especially the Uppercase R can be used to load a complete new version of a package

The full syntax for the package list is package_name:option,package_name:option,...

#cat lrpkg.cfg
root:F,etc:f,local:R,modules:R,pump:r

Example. Let's assume you have the following setup in your isolinux.cfg file.

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

and the following lrpkg.cfg package file.

root,etc,local,modules,iptables,pump:f,keyboard,shorwall:r,ulogd,dnscache,weblet

The search order for pump (f) will be: cd --> floppy. To load pump only from floppy use R.

The search order for shorwall (r) will be: floppy--> cd. To load shorwall only from boot-cd use F.

Note

You will be able to see the search order at boot time.

Partial backup of packages to/from floppy

Saving a partial backup to floppy disk

  • If you want to backup parts of the package that are not in the /etc and /var/lib/lprkg directories, you have to be sure there is a /var/lib/lrpkg/PACKAGE.local file for each PACKAGE.lrp you are doing partial backup of. This file contains the list of files to be saved in the partial backup. See doc. for format. This list should include local configuration files and any binary files that have been updated. ( always include "I /var/lib/lrpkg/PACKAGE.*" to save the *.local files in the Partial backup of PACKAGE.lrp)

  • Set back up to partial ( p # ) and set the backup device ( d # ) to something like fd0 and msdos

Loading partial backup from floppy disk after booting cdrom

  • Check syslinux.cfg on boot cd to see if PKGPATH includes partial backup device the default is PKGPATH=/dev/cdrom:iso9660,/dev/fd0:msdos

  • set the load order in lrpkg.cfg file on the floppy disk to load CDROM version of the package then the floppy version of the partial back of the package.

This ":f" ( the default ) will first load the cdrom version then the floppy updates it they exist.

Use ":R" to load the floppy version a full package and totally avoid the cdrom version of the package.

Note

You can NOT do a partial back up of initrd.lrp because it loaded directly off the boot disk. If the version on the cdrom needs to be change you must make a new cdrom or use a boot floppy disk with a new initrd.lrp and then you can load other packages off the cdrom.