Robert de Bath 6cb598cc5f Import Dev86src-0.16.16.tar.gz 20 years ago
..
Makefile beba34dc22 Import Dev86src-0.16.15.tar.gz 10 years ago
README 5613ba3c07 Import Dev86src-0.16.12.tar.gz 10 years ago
bb_init1.s 5613ba3c07 Import Dev86src-0.16.12.tar.gz 10 years ago
bb_init2.s 673f690a37 Import Dev86src-0.16.4.tar.gz 10 years ago
bb_linux.s 673f690a37 Import Dev86src-0.16.4.tar.gz 10 years ago
boot_fpy.s 673f690a37 Import Dev86src-0.16.4.tar.gz 10 years ago
boot_win.c 6cb598cc5f Import Dev86src-0.16.16.tar.gz 10 years ago
buffer.c 673f690a37 Import Dev86src-0.16.4.tar.gz 10 years ago
bzimage.c 5613ba3c07 Import Dev86src-0.16.12.tar.gz 10 years ago
commands.c df53846368 Import Dev86src-0.16.2.tar.gz 10 years ago
fs.c df53846368 Import Dev86src-0.16.2.tar.gz 10 years ago
fs_dos.c 65da95772d Import Dev86src-0.15.1.tar.gz 10 years ago
fs_min.c 3d4957c86f Import Dev86src-0.14.8.tar.gz 10 years ago
fs_tar.c df53846368 Import Dev86src-0.16.2.tar.gz 10 years ago
help.c e62b35169c Import Dev86src-0.14.7.tar.gz 10 years ago
i86_funcs.c 5613ba3c07 Import Dev86src-0.16.12.tar.gz 10 years ago
i86_funcs.h 673f690a37 Import Dev86src-0.16.4.tar.gz 10 years ago
killhd.s 5613ba3c07 Import Dev86src-0.16.12.tar.gz 10 years ago
lsys.c 3d4957c86f Import Dev86src-0.14.8.tar.gz 10 years ago
makeboot.c 5613ba3c07 Import Dev86src-0.16.12.tar.gz 10 years ago
mbr.s 5613ba3c07 Import Dev86src-0.16.12.tar.gz 10 years ago
minix.c 352e3b3230 Import Dev86src-0.16.3.tar.gz 10 years ago
minix.h 3d4957c86f Import Dev86src-0.14.8.tar.gz 10 years ago
minix_elks.c ec5f28e3f1 Import Dev86src-0.14.3.tar.gz 10 years ago
monitor.c 22950ba3df Import Dev86src-0.16.13.tar.gz 10 years ago
monitor.h 5613ba3c07 Import Dev86src-0.16.12.tar.gz 10 years ago
msdos.s 5613ba3c07 Import Dev86src-0.16.12.tar.gz 10 years ago
noboot.s e62b35169c Import Dev86src-0.14.7.tar.gz 10 years ago
readfs.h 48f0b3eb83 Import Dev86src-0.13.5.tar.gz 10 years ago
relocate.c 5613ba3c07 Import Dev86src-0.16.12.tar.gz 10 years ago
skip.s 352e3b3230 Import Dev86src-0.16.3.tar.gz 10 years ago
sysboot.s dfab97edd0 Import Dev86src-0.15.3.tar.gz 10 years ago
tarboot.s df53846368 Import Dev86src-0.16.2.tar.gz 10 years ago
unix.c 5613ba3c07 Import Dev86src-0.16.12.tar.gz 10 years ago
zimage.s ec5f28e3f1 Import Dev86src-0.14.3.tar.gz 10 years ago

README


Contents

1.0 ) Boot sectors
1.1 ) Master boot sector
1.2 ) Dosfs boot sector
1.3 ) Minixfs boot block
1.4 ) Tar boot sector
1.5 ) Skip boot sector
1.6 ) Panic boot sector

2.1 ) Booting i86 standalone executable
2.2 ) Booting Elks kernel
2.3 ) Booting Linux-i386 [b]zImage

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

1.0 ) Boot sectors

These boot sectors are mostly designed for floppy use, the exceptions
being the MinixFS and Master boot sectors.

The makeboot program makes them very easy to install just format the
disk add the correct filesystem then run a command like ...

$ makeboot minix /dev/fd0

As far as I know all boot sectors and programs are 8086 clean, with
the exception that, obviously, the Linux-i386 loader needs access to
extended memory.

1.1 ) Master boot sector

This MBR is a very simple one with no frills by default.

The actual code is less that 254 bytes long so it can be used as
an MBR for a disk with old style 'Disk manager' partitions. All 16
partitions are bootable.

Option 2 is a boot message that displayed as soon as the MBR loads.

Option 3 is code to accept a keypress from the user to select which
partition to boot (or the floppy).

1.2 ) Dosfs boot sector

Install with makeboot, there is also a version for 16 bit FAT
filesystems for big floppies (eg LS-120 disks) or hard disk
partitions. This boot sector loads and executes a binary BOOTFILE.SYS
from the root directory of the floppy. The file can be any length
and is loaded at $07C00. Because of the load address this boot sector
can be configured to load another boot sector, for example LILO can
be succesfully used in this way.

In fact LILO can be succesfully used in this way on a 2M disk, but
you must create the floppy with the real dos 2M package as superformat
does not create correct bootable 2M disks. Also beware that mounting
a 2M floppy can ... be interesting ...

Note this boot sector loads the executable 1 sector at a time, as far
as my testing has gone this is only significant on 8086 machines, all
others (286 8Mhz +) are fast enough to keep up at a 1-1 interleve.

But some versions of superformat can defeat this because they do
not correctly calculate intersector gaps. I suggest using fdformat
as this uses a 'safe' layout for standard 1440k disks.

1.3 ) Minixfs boot block

This boot block has varients for floppy and harddisk and works similarly
for both. For the hard disk it must be installed in the partition boot
block with a normal MBR in sector zero of the disk. This boot sector can
be installed with makeboot or simply by copying the 1k file to the start
of the partition (or floppy) to be booted.

The sector looks for a file or directory called 'boot' if it's a
directory it loads that and does the search again. When it finds a
file it loads it at location $10000 and executes it, note this
is limited to a file size of 519k.

There is also support for a helper boot which mean this is the only
boot sector able to load an ELKS image (almost) directly.

1.4 ) Tar boot sector -- Cool Man!!

This boot sector converts a tar file with a GNU Volume label into a
bootable floppy image. The boot sector loads and executes the first
item in the tar file after the label:

$ tar cvfV the_file.tar ENIAC monitor.sys item2 item3
$ makeboot tar the_file.tar
$ cp the_file.tar /dev/fd0

This sequence makes a bootable floppy that tar sees as a normal labeled
tar file but when booted from will load and execute 'monitor.sys' at
location $00800 (Yes thats 2k!)

Warning: the tar boot sector moves the BPB to the location $666.

1.5 ) Skip boot sector

This bootsector displays a message then loads and executes the hard disk
MBR at location $07C00

1.6 ) Panic boot sector

Displays the message 'PANIC! NO OS Found!' (or the message specified
on install) and freezes.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

2.1 ) Booting i86 standalone executable

All the boot sectors (dos, minix, tar) check for a ELKS-i86 magic number
at the start of the file they load and will correctly set the segment
registers before calling. The executable should be a 'standalone'
executable compiled with 'bcc -Ms ...' or similar.

2.2 ) Booting Elks kernel

Only the minix boot sector can directly boot an elks kernel and even that
needs a helper function because of the complexity. The helper is called
'minix_elks.bin' and needs to be copied onto the disk as '/boot/boot'
with the ELKS image copied on as '/boot/linux'. This works, with the
correct boot block, on either floppy or harddisk.

2.3 ) Booting Linux-i386 [b]zImage

None of the boot blocks can _directly_ boot a Linux-i386 kernel the
program 'monitor.sys' must loaded by the boot sector and this can
load a zimage or bzimage from an MSDOS, Minix or Tar floppy. It can
also load the image from a minix hard disk filesystem.

This example is for and MSDOS floppy, Tar is very similar except that
'monitor.sys' must be the first file in the tar and can have any name.

Note also for a tar file the 'ramdisk.gz' file must start on the first
disk but can extend across as many floppies as is needed.

$ mformat a:
$ makeboot dos /dev/fd0
$ mount -t msdos /dev/fd0 /mnt
$ cp monitor.sys /mnt/bootfile.sys

$ cp /usr/src/linux/arch/i386/boot/zImage /mnt/vmlinuz
$ echo 'root=/dev/ram ramdisk_file=ramdisk.gz mem=80M' > /mnt/vmlinuz.cfg
$ cp /archive/ramdisk.gz /mnt/ramdisk.gz
$ umount /dev/fd0

The stuff about ramdisk is only if you want an init ramdisk. If
the ramdisk isn't on this floppy monitor.sys will ask for the
right floppy. If you specify multiple ramdisk files then will be
concatenated and passed to the kernel as one ramdisk, each file
can be on a different floppy.

If the file isn't called 'vmlinuz' you can still boot it by typing "=linux"
at the prompt '>' where 'linux' is the name of the bzImage file.

Escape or ^C will interrupt the boot and drop you to the '>' prompt.
^C at the '>' prompt will reboot

A file called 'help.txt' will be displayed upto the first line that starts
with a '%', chunks after that (seperated by '%'s) will be displayed when
the user presses a function key, home, page up or page down.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Robert de Bath