Subject: Re: Bootloader questions
To: Pete Bentley <pete@demon.net>
From: Zdenek Salvet <salvet@horn.ics.muni.cz>
List: port-i386
Date: 03/14/1996 21:55:07
> In message <199603131622.KAA16213@linkdead.paranoia.com>, VaX#n8 writes:
> >> As a first x86 assembler project (I've done other assemblies before), I'm
> >> considering working on the bootstrap/loader code.  I'm looking for suggestions
> >> on possible improvements, bugfixes, etc.  Please send me any.
> >> Multiboot compliance is a main point right now.
> 
> * 'config' strings on the kernel command line, like Linux, eg you
>   could type in 'netbsd -s ed0.port=0x280' ... could maybe nicely tie
>   in with Jason Thorpe's userconfig stuff.

BSDI can read config and boot info from file, I like it very much:

    If the file /etc/boot.default exists, the /boot program reads this as a
     series of commands to be executed, one command per line, just as if they
     were typed from the keyboard.  This can be used to boot the kernel from a
     different device than the BIOS uses to boot, or to change various parame-
     ters listed in the next section.

     The commonly-used boot commands are the following:

     -changedisk    Pause to request changing of floppy disks prior to execu-
                    tion of the kernel.  This is useful when the root filesys-
                    tem is not on the same floppy disk as the kernel.

     -console dev   Set the console to be dev. Valid device names are:

                    kbd   The standard keyboard and display (the default).

                    com   [X [ port [speed]]]
                          The serial device comX where X refers to the given
                          port, default 0.  Note that BSD/OS starts with com0
                          where as DOS labels this COM1. The port address can
                          be specified, or the standard PC values for com0
                          through com3 will be used.  The speed defaults to
                          9600.

     -dev devname ioconf=value ...
                    Reconfigure the device specified by devname to have the
                    field specified by ioconf set to value. Valid ioconf
                    fields are:

                    port    Base port address for device; if -1, the device is
                            not probed.
                    iosiz   Number of ports used by device
                    maddr   Base address of memory mapped by device.
                    msize   Amount of memory mapped by device.
                    irq     The IRQ interrupt used by device; if the value is
                            IRQNONE, no IRQ is used.
                    drq     The DRQ (DMA) channel used by device
                    flags   The flags field for the device

     The following boot commands are used primarily for debugging problems:

     -autodebug val
                    Enable debugging of autoconfiguration in the kernel.  The
                    available values for val are:

> Look closely at the LILO source and how it passes things on to the
> kernel. It might be worth considering combining the some of the
> features of os-bs into a boot loader like LILO. I can't think of any
> overriding reasons not to add that functionality into the BSD boot
> loader (apart from size, complexity and the awkwardness of finding and
> booting a different OS once you're in protected mode)

I think it's  better *not* to merge boot partition chooser and OS loader 
into one LILO lookalike. I don't need any code to load Linux,SCO,DOS,....
in my NetBSD machine.

--
Zdenek Salvet                                              salvet@ics.muni.cz 
----------------------------------------------------------------------------
           If God had meant for us to be in the Army,
         we would have been born with green, baggy skin.