This is the README for nuni and nunimbr
License: GPL version 2 or later. See nuni.c, nuni.asm, and nunimbr.asm.
nuni is a boot loader for Linux, using ext2 file system and IDE drives. The reason for this particular loader is to avoid bios limitations by not using the bios. For example, there is no 1024 cylinder problem because the concept of cyliders is not used. There is also no problem with a difference in geometry between the bios and linux because the concept of geometry is not used. We can boot from any place on the drive, up to 137gb. Also any drive up to hdk (or higher) can be used.
nunimbr is a small multi-boot selector for use in the mbr. Like nuni, it does not use the bios, so any partition of any IDE drive can be selected. This . It will execute a loader that resides in the boot sector of any partition. Selection is by name of partition. You answer with names like hda1 or hde11, and it executes whatever loader resides there. It is self contained, so it could be carried to other computers on a floppy and boot those machines with no setup or installation. Since it occupies only one sector, there is no problem if linux is removed; it will continue to boot windows normally without the familiar 'LI' problem.
- COMPONENTS
- nuni.asm
This is the boot loader. It may reside in the boot sector of a floppy
or the boot sector of a hard drive partition (not for use in the MBR).
nuni.c This passes some data to nuni.asm by means of 'equ' statements. Therefore, nuni.asm is assembled every time it is used.
nunimbr.asm This is a multi-boot selector. nunimbr can be placed in the MBR for use in selecting various copies of the nuni loader or other loaders.
nuni.asm and nunimbr.asm are assembled with the nasm assembler: http://www.web-sites.co.uk/nasm/ver.html
Installation instructions:
(1) put the nuni-0.08.tar.gz file in a convenient place
(2) tar zxf nuni-0.08.tar.gz
(3) cd nuni-0.08
(4) ./c (this is a script with a gcc command in it)
Configuration and installation instructions (for nuni):
(1) cd /path/nuni-0.08
(2) edit nuni to set the following items:
(a) path to kernel image
(b) target partition for installing the boot loader
(c) command line for kernel
(3) ./nuni
Additional editing instructions are imbedded in the nuni script.
Configuration and installation instructions (for nunimbr):
(1) cd /path/nuni-0.08
(2) edit nunimbr.asm to set the following items:
(a) io ports for IDE drives
(b) default partition to find & execute a loader
(3) edit target partition in the nunimbr script
(4) ./nunimbr
This package contains a pre-assembled binary nunimbr.bin which can be used as-is on any PC computer if you are using the default ide0 or ide1 port addresses.
The edit area of nunimbr.asm looks like this: ;-------------------------edit these for your system---------
io_ab dw 0x1f0,0x3f6 ;ide0 motherboard primary io_cd dw 0x170,0x376 ;ide1 motherboard secondary io_ef dw 0x6b00,0x6f00 ;ide2 (e.g. Ultra66 primary) io_gh dw 0x7300,0x7700 ;ide3 (e.g. Ultra66 secondary) Command db 'hde11' ;default partition to boot
;------------------------------------------------------------
Note: You will need to find the correct io port addresses for ide2 or higher. One place to look is in /proc/pci. There is curently enough space to add additional lines for ide4 and ide5.
USAGE (nunimbr):
nunimbr uses it's default unless you hold down a shift, control, or
alt key while the bios sequence is finishing up. If one of these keys is
held down, the prompt is issued. You can make it always prompt by using a
default of 'hda0'. The prompt looks like this:
Partition to boot: hd_
The user will then complete the name to select a partition such as hda1 or hde11. Then nunimbr loads the first sector of the named partition and executes it.
Errors (nunimbr):
If nunimbr detects an error, such as a non-existing partition or a
drive-reported error, it repeats the prompt. If you select a partition
that does not contain a boot loader, it will hang.
Kernel command line (nuni):
nuni accepts file-based and interactive input for the kernel command line.
These are concatenated at boot time. The file-based kernel parameters are
placed in the nuni script. Editing instructions are included in the
script. The parameters or commands can be placed on separate lines for
readability if desired. To obtain a prompt at boot time, hold down any
shift, control, or alt key while the bios boot sequence is proceeding. A
prompt of the form:
Cmd:
will appear. Type any desired kernel parameters using the syntax described
in the BootPrompt HOWTO.
Note: Both nuni and nunimbr use the technique of holding down one of those keys to get a prompt. If you are using nunimbr to execute nuni, and want a prompt in nuni, hold down the shift key when pressing 'enter' in nunimbr.
Progress Indicator:
When nuni is loading the kernel, it prints a string of '.........' one for
each ext2 block that is loaded.
Errors (nuni):
If nuni receives an error code form the drive, it prints an 'E' and halts.
Nuni can't really tell the difference between garbage and correct data.
In the case of garbage, it will happily load blocks until it happens to
attempt to fetch a block beyond the end of the drive. Then it will get an
error code form the drive.
Ontrack Disk Manager:
If you have Ontrack on the drive, use this in nuni.c
#define ontrack 63
If Ontrack is not present use
#define ontrack 0
Real-soon-now[tm] this will be made automatic.
ATA66 cards (nuni):
If you have an add-on IDE interface, its i/o ports may not be the same as
those assumed in nuni.c. If you want to boot from such a card, do the
following:
(1) Find the statement that starts with 'switch (major)' and put your port
addresses in the lines containing the 'e' and the 'g'.
(2) In the script, nuni, add some kernel parameters to the command line such
as:
ide2=0x6b00,0x6f00
ide3=0x7300,0x7700
You should be able to obtain the correct addresses from /proc/pci. This
version of nuni contains the values which work with the Promise Ultra66 card
in my system.
vga=
The kernel doesn't have a vga= command, so if you want to change the
default value in the kernel image, you must use rdev. See man rdev.
Restrictions (nuni):
(1) The kernel image file and the /boot directory must
be in the same partition.
(2) Only LBA-capable drives are supported. If you are booting from a small
drive, lilo is recommended.
Other notes:
(1) Nuni handles various ext2 block sizes, and handles both small and
large kernels.
(2) If you have drives above hdh with custom major numbers, you can add an
additional 'case' line to the 'switch (major)' statement in nuni.c.
(3) The verbosity can be turned on and off by editing this line in nuni.c:
#define verbose 1
- Todo
- Banner message or menu.
- Suggestions
- If you think of something that needs added or said better in this readme, let me know. I'm also interested in suggestions about the functionality of the programs.
Neil Koozer, Roseburg, Oregon
nkoozer@rosenet.net
