Gujin
From Wikipedia, the free encyclopedia
| This article needs additional citations for verification. Please help improve this article by adding reliable references. Unsourced material may be challenged and removed. (July 2007) |
Gujin is a boot loader for personal computers. It is free software distributed under the GNU General Public License that is written in the C programming language, and is designed to be compiled with the GNU C Compiler and GNU Binary Utilities.
Contents |
[edit] Functionality and design
Gujin is capable both of bootstrapping partitions by reading and invoking their Volume Boot Records and of loading and invoking the Linux kernel directly from a file in a disc volume. Furthermore, Gujin is capable of bootstrapping from disc image files, presenting the disc image to the operating system being bootstrapped as if it were a (bootable) floppy disc.
Gujin locates Linux kernel files by scanning all disc volumes and searching for the usual filenames in the root directory and the "/boot" subdirectory of the volume. When searching volumes for files, Gujin only understands the FAT12, FAT16, FAT32, ext2, ext3, and ISO 9660 filesystem formats. Gujin is capable of reading both the standard Linux file format and GNU zip compressed ELF images (filename extension kgz).
Gujin presents a graphical user interface to the user for selecting which disc volume or operating system kernel to bootstrap. It automatically selects the graphics mode to use. When bootstrapping a Linux kernel, it enables the user to select the video mode before invoking the Linux kernel. It also passes information about the keyboard and mouse to the Linux kernel on its command line.
Like most boot managers, Gujin is designed to be able to bootstrap discs and disc volumes that the machine's BIOS is, by itself, not capable of booting. Gujin can bootstrap ATAPI CD-ROMs and DVDs, for example.
Gujin can only access devices that are supported by the machine's firmware. It is not capable of using USB devices such as keyboards, mice, discs, CD-ROMs, or DVDs unless the BIOS provides access to them.
Gujin is primarily a real mode (or v8086 mode) program. Only a small part of the program, the part that relocates an operating system kernel before invoking it, executes in protected mode.
Gujin can load operating system kernels at different physical addresses to the defaults (with specially compiled kernels and modules) in order to leave ISA DMA-able memory free for other uses by the operating system itself, or to forbid kernel code modification by the legacy DMA.
[edit] Installation and use
Gujin can be installed and invoked in three ways:
- Gujin can replace the Master Boot Record of a fixed disc. It will run when the BIOS bootstraps from that disc.
- Gujin can replace the Volume Boot Record of a disc partition, or of a floppy disc. It will run when the MBR (or a boot manager) boots that disc partition or when the BIOS bootstraps from that floppy disc.
- Gujin can exist as a simple DOS executable program image file on a FAT partition. Like loadlin, this allows Gujin to be invoked from DOS.
Each flavour of Gujin comes in two sizes:
- a "full" version that presents the graphical user interface
- a "tiny" version that presents no user interface and that is controlled solely by its command-line arguments (for the DOS flavour) or compiled-in configuration settings (for the MBR and VBR flavours)
[edit] Gujin when run as a DOS program
When run as a DOS program, Gujin is designed to retain the DOS execution environment intact unless an operating system is selected and bootstrapped. Gujin thus uses normal XMS services available to DOS programs to access extended memory when loading an operating system kernel.
[edit] References
| This article or section needs sources or references that appear in reliable, third-party publications. Primary sources and sources affiliated with the subject of the article are generally not sufficient for a Wikipedia article. Please include more appropriate citations from reliable sources, or discuss the issue on the talk page. This article has been tagged since September 2007. |

