Packs a multiboot kernel and modules as a linux-style bzImage
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Changes
GPL
Makefile
README
bootsect.S
buildimage.c
mb_header.h
mb_info.h
mbootpack.c
mbootpack.h
mkhex
setup.S

README

mbootpack
---------

This is a utility to take a multiboot kernel and modules and repackage
them in a form that a standard linux bootloader will be able to load them.
It statically allocates memory addresses based on a 'standard' PC memory 
layout, and then saves the image of the loaded system, along with an 
almost-standard linux bzImage header which takes care of the start-of-day 
requirements of a multiboot kernel (setting up 32-bit protected mode, etc.)

Example invocation, to package a xen VMM and xenlinux guest and initrd:

   mbootpack -o bzImage -m ./xenlinux -m ./initrd.img ./xen-image

You can now boot the 'bzImage' file using your favourite linux bootloader.

The kernel command line will be provided at boot time by the bootloader
(you can specify a kernel command-line using the '-c' flag, but it will
be overridden at boot time unless the bootloder provides an entirely
empty command line).  If you want to override the command line for the
first module (i.e. domain 0 kernel in Xen) at boot time, append ' -- '
and the module commadn line to the bootloader command line, e.g.:

  boot: bzImage com1=9600,8n1 console=com1 dom0_mem=49152 -- root=/dev/sda3 ro console=ttyS0,9600n8 

Everything before the '--' is passed to the kernel (xen) as its command
line; everything after is passed to the first module (xenlinux).

This is ALPHA code: there are execution paths which have *not* been
tested, though it works for loading the Xen hypervisor using GrUB, LILO
or SYSLINUX.  Bug reports and patches are very welcome.

Possible features for future versions (all look possible, if there's any 
demand for them):

    - support for kernels that load below 1MB
    - zImage-style compressed images
    - support for the MULTIBOOT_VIDEO_MODE bit
    - proper support for passing E820h memory-maps from bzImage


Tim Deegan <tjd@phlegethon.org>, April 2005



License and attributions
------------------------

The bzImage header block was originally taken from the Linux kernel.
http://www.kernel.org/

Some parts of the Multiboot loader code are based on GNU GRUB.
mb_info.h and mb_header.h are taken from GNU GRUB.
http://www.gnu.org/software/grub/

All other code is copyright (C) 2003-2017 Tim Deegan (tjd@phlegethon.org)

mbootpack is distributed under the GNU General Public License: see "GPL"

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA