mbldr (Master Boot LoaDeR)
|
|
Table of contents:
- News
- Summary
- License
- Documentation
- Screenshots
- Features
- Download
- ToDo
- Help needed
- Translation status
- Building instructions
- Contacts
- Links
News
September 30, 2009
At this point I see no other useful features that can be added to mbldr. MBR sector is almost full, the code seems to
self-sufficient, stable and rock-solid. If you have any ideas, bug reports, questions or comments feel free to contact
me using forum. The project is now in maintenance mode which means I will help users and get back to development if
there are new interesting features to add. I would also be happy if somebody is interested to participate in
development or interface translation to other languages. Stay tuned, mbldr is surely not dead - it is obviously still
in the zone of my interest. At the time being I don't expect new releases in the nearest future.
December 12, 2008
mbldr 1.46 has been released. New chainload feature (refer to FAQ section,
question #13), fix of hanging with timer interrupt, Czech translation, "restore from backup" changes.
May 30, 2008
mbldr 1.45 has been released. Boot-timer fix, French translation, partitions hiding/not hiding, few other improvements.
December 19, 2007
Mbldr sources are now available in Subversion repository
on Sourceforge. Use "svn co https://mbldr.svn.sourceforge.net/svnroot/mbldr mbldr" command to get the source tree.
Initial version in Subversion corresponds to mbldr-1.44, I have not added earlier versions.
November 29, 2007
I posted new open position to
"Help wanted" section on the sf.net web-site. It asks for new translations.
November 23, 2007
mbldr version 1.44 has been released. It introduces multilanguage interface (only Russian translation is available now).
June 6, 2007
mbldr version 1.43 has been released. It introduces new GUI configuration program.
January 11, 2007
mbldr version 1.42 has been released (changes are only in Windows version of installation program).
November 29, 2006
mbldr version 1.41 has been released. It introduces the support of Microsoft Windows Vista.
November 15, 2006
mbldr version 1.40 has been released. It contains no code developed by Thomas Wolfram anymore, so the
project is now totally covered with BSD license.
The only significant difference is that I have removed the line "All advertising materials mentioning features
or use of this software must display the following acknowledgement: This product includes software developed by
Thomas Wolfram."
October 31, 2006
mbldr version 1.39 has been released
August 18, 2006
mbldr version 1.38 has been released
June 13, 2006
mbldr version 1.37 has been released
March 10, 2006
mbldr version 1.36 has been released
Summary
About
mbldr is yet another boot loader which fits into first sector of an HDD (MBR). It allows to choose which partition
to boot and is intended to replace an MBR coming with DOS/Windows (fdisk /mbr). It may boot OSes above 1024cyl,
Linux/BSD are also supported. mbldr is based on OS Boot Select (OS-BS) by Thomas wolfRAM (see below).
mbldr is not an operating system loader. I can not boot Linux or Windows directly (thus it is not a replacement of
LILO for example), but it can boot appropriate loader from a boot record of a particular partition (again LILO or
GRUB for instance).
mbldr can be installed and configured using special tool. Before version 1.43 there was only one choice: to use a
command-line installation tool which supports DOS (MS-DOS, FreeDOS, etc.), Windows 98/ME, Windows 2000/XP/Vista,
Linux and BSD-flavours (FreeBSD, OpenBSD and NetBSD). Now it is also possible to use graphic version of this tool.
It uses wxWidgets toolkit and supports Windows 2000/XP/Vista, Linux and BSD
(DOS and Windows 98/ME are not supported, you need to use command-line version).
History
Current mbldr project is a successor of relatively old project named OS-BS (OS Boot Select) written by Thomas
Wolfram. Its homepage seems to be lost now. I have
found a copy of these pages thanks to excellent Web archive engine.
That project had at least two official versions: 1.35 and 2.0b8. Since both are very old (the latest is dated
October, 1993) and then the project evolved into commercial System Selector described at
BootManager website, I have decided to continue the open source
development. However you may download older versions of OS-BS at
BootManager or
FreeBSD FTP sites.
As a starting point of my development I have decided to use 1.35 release of OS-BS by Thomas Wolfram because it
fits into 1 sector. Version 2.0 uses more than 1 sector what is not my goal. Since I use different tricks to
fit into MBR, newer versions of mbldr WILL BE INCOMPATIBLE with OS-BS releases by Thomas (against his recommendation
in the source code). However I believe it would not lead to problems since it is always possible just to reinstall
the bootloader from scratch. The uninstallation of the boot loader is very simple. You may use a special menu item
in the installation program pointing it to a previously stored MBR. The another way is to use programs like
"fdisk /mbr" under MS-DOS. The original releases of this software were included into the distribution of a FreeBSD
(see /tools directory, for example in
release 5.4) and I believe it
was tested thoroughly enough. I hope at some point the updated versions will be included into FreeBSD distribution
as well.
Project name
I have contacted Thomas by e-mail and asked him whether I may continue the development using the same project
name, but he denied it. This is because some software publishing company owns "OS-BS" name. Since I definitely
want to avoid legal issues that was the reason why the name has been changed to "mbldr". In addition, Thomas
insisted keeping his license with no changes (I would like to use BSD license). From the version 1.40 all code
written by Thomas is eliminated, so at the time being mbldr is fully covered with
BSD license. Below here are our e-mails
related to this topic:
Hi,
I'm sorry. I do not allow to use the name OS-BS for
an open source project or any other purpose. Also
I do not allow redistribution of my source code under
any other copyright or license terms than my own.
It is not possible for me.
The software OS-BS has become a commercial product since
1997 and is sold in several versions in Germany, France,
Spain and elsewhere. It has evolved much since the
early 1.x and 2.x versions.
The rights are hold by a large software publishing house
and I continue development of the product for them.
regards,
Thomas Wolfram
> -----Original Message-----
> From: Arnold Shade
> Sent: Tuesday, March 07, 2006 4:45 PM
> To: Thomas Wolfram
> Subject: OS-BS
>
> Hello,
>
> My name is Arnold Shade. I have found your nice program called OS-BS in /tools directory
> on one of FreeBSD distribution disks. It's really nice, but since it seems you are not
> supporting it now (2.0b8 release was done in October 1993), I would like to continue
> open-source development of this program.
> [ ... skip ... ]
> As a starting point of my development I have decided to use 1.35 release of OS-BS
> because it fits into 1 sector. Version 2.0 uses more than 1 sector what is not my goal.
>
> As far as I understand you tried to evolve OS-BS to commercially
> available software available at http://www.bootmanager.com/
>
> Thus, my question is: Do you allow the existence of successor of OS-BS? May I be current
> maintainer? May I use BSD license for it? May I create an appropriate project of
> sourceforge and publish all the details there? I promise to leave current name without
> modifications (OS-BS) and write your name wherever acceptable (README files, about boxes,
> web-site, etc.) However your signature ("wolfRAM") will be lost in MBR and I will break
> the compatibility with older versions (location of some data structures in MBR will be
> changed) because I'm optimizing the code much.
>
> Thank you in advance.
>
> Best regards,
> Arnold Shade
|
Project goals
- To maintain a boot loader which fits into master boot record (only 446 bytes, some place is occupied by partition
table) of a hard disk. There are lot of boot managers occupying almost whole track #0 of cylinder #0. I don't want to
compete with them. The unused sectors on track #0 are also often used by recovery software, so the chance to break
something is relatively high.
- To allow a user to choose which operating system to boot with a simple textual interface (no graphics, icons, mouse,
etc.) with timeout and default boot
- To support booting of operating systems which are located beyond 1024 cylinder boundary
- To support as many operating systems as possible (however I'm focused on modern ones)
- To support partitions hiding according to rules used on OS/2 boot manager (applied to different FAT and NTFS), so
partitions are marked correctly from the point of view of PowerQuest Partition Magic (commercial software managing
partitions).
- Booting from any primary partitions or logical disks on extended partition
What probably never will be a goal
I have no plans to support all unnecessary (from my point of view) features listed below in future (there is no space
in MBR to locate a complex code):
- no special code to support booting from CD/floppy: Floppies are obsolete, booting from CD could be activated by
pressing Esc (for Award BIOS) or F11 (for AMI BIOS) at boot time. However modern BIOSes allow booting from CD after
calling interrupt 18h (what corresponds to "Skip boot" menu item)
- no rich GUI interface with icons and mouse support for the boot loader
- no boot-time password protection
- no boot manager configuration directly from boot menu (like autosearch of partitions in Smart boot manager)
- no binding to operating system types, their boot loaders, filesystem formats and other implementation-specific
details
- no support for non-x86 platforms
License
The initial license and copyright that were included in OS-BS by Thomas Wolfram are now not used since mbldr currently
contains no code inherited from OS-BS. At the time being (since version 1.40) mbldr is fully covered with
BSD license.
Copyright (c) 2006-2008, Arnold Shade
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Arnold Shade nor the names of contributors may be used
to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Every new piece of code (patches, fixes, improvements, etc.) submitted for inclusion into mbldr should satisfy the
license shown above.
Documentation
Requirements
- So-called IBM PC-compatible computer with Intel 386 architecture CPU is required. It will not run on Sun Sparc or
PowerPC-based Macintosh.
- Relatively modern BIOS that allows to use new functions of interrupt 13h for loading/saving sectors (in order to
support booting from >1024cyl). Mbldr is incompatible with older BIOSes (even when booting operating systems below
1024cyl)
- The CLI version of installation/configuration program could be compiled and run under MS-DOS/FreeDOS, Windows 98/ME,
Windows 2000/XP/Vista, Linux and BSD. GUI version supports Windows 2000/XP/Vista, Linux and BSD (DOS and old Windows-family
are not supported), it requires wxWidgets development toolkit for building. DOS version requires DPMI interface (it also
works under Windows 98 or ME in DOS-emulation mode). DOS version does not work under NT-family of Windows in DOS emulation
mode, you need to use special version for Windows 2000/XP/Vista.
Installation, uninstallation and configuration
The mbldr project is intended to be used by advanced users on their desktop computers. If you have several operating
systems and want to be able to boot either of them, you may use mbldr. It is a replacement of the default boot loader
in MBR which for instance could be written there by Microsoft Windows installation.
The instruction below addresses CLI version of installation/configuration utility running under MS-DOS or FreeDOS (other
versions are very close to what is described here for DOS):
- Download .zip archive with a binary corresponding to the latest release of mbldr
- Unzip the contents of the archive to some directory on a hard drive. The directory should be located on a partition
accessible by DOS, i.e. it should be either FAT or FAT32. You may also copy it on a floppy or a CD.
- Download and unzip the contents of DPMI server. If you are using CWS DPMI, make sure that CWS executables are
located either in the same directory as mbldr executable or in a directory listed in PATH environment variable
(under Windows 98/ME you don't need DPMI engine)
- If you are running Windows NT-based operating system (2000/XP/Vista) reboot from DOS-bootable floppy.
El-torito CD could be used as well. Under Windows 98/ME you may use DOS-emulation box without rebooting into DOS.
(of course you do not need this step if you are using Windows 2000/XP/Vista version of installation program)
- Run "mbldr.exe -h" to get command line help (in Windows 2000/XP/Vista or Linux/BSD name of the command-line
executable is mbldrcli)
- Run "mbldr.exe" (mbldr.com for very old versions) to enter interactive configuration mode (you may need to specify
device name to manage under Linux or BSD with the help of -d command-line switch, however autodetection is supposed
to be working properly)
- The navigation through menus is done with command-like interface. You should read a list of bullets, make a
choice and then type the appropriate symbol (usually a digit or a lower-case letter, but could also require typing
numbers and labels) and then press <Enter> to confirm.
- Use special boot menu item "Skip boot" if you want to instruct BIOS to try another boot device. Mbldr calls int 18h
what usually leads either to network boot or CD-ROM boot (depending on a boot sequence configured in BIOS).
- Use special boot menu item "Try next hard disk" if you want to load MBR from a next hard disk (increasing BIOS device
number: the first is 80h, then 81h, etc.). Please note that this option is dangerous and may lead to data corruption.
If configured improperly your MBR may be mistakenly overwritten by other boot managers. Use with caution and thoroughly
read the following warning: New master boot loader gets a number of drive being used as a parameter. Theoretically this
scheme should work fine assuming that all boot loaders respect this input parameter. Unfortunately several boot loaders
ignore it assuming that the drive number used to boot is always 0x80 (what is incorrect according to EDD3 specification).
It may lead to impossibility to boot for so called "passive" master boot loaders (that just try to boot not updating MBR
each time). But even worse for so called "active" master boot loaders (that modify MBR each time you boot) you may
overwrite MBR on the wrong disk. Please note that "Next HDD" feature is not the same as the one provided by BIOS (boot
from either of installed hard disks). BIOS does the renumbering of hard drives making bootable disk always 0x80, while
mbldr does not. Use this feature at your own risk! It is dangerous and may lead to data loss if you have master boot
loaders others than mbldr with version 1.37 or above! However I have tried following combinations successfully:
mbldr+mbldr, mbldr+LILO, mbldr+GRUB, mbldr+standard MBR from DOS/Windows. Any others probably don't work,
in particular mbldr136 and os-bs. Use this feature at your own risk, it's DANGEROUS!
- You always may use 'q' to immediately quit from a program without saving any changes. Also try Ctrl-C if
something goes wrong.
- Before making any changes on your hard disk the program will ask for a confirmation
- Always do a backup of the old MBR. Better to store this file somewhere on a bootable floppy or El-torito CD together
with appropriate version of mbldr installer. Please note that uninstallation of mbldr is impossible if you have not saved
the backup copy of MBR first.
- The length of particular label for a bootable partition is not limited. Only total number of characters used
for boot menu makes sense. You will get a warning when you exceed it.
- Don't use non-standard native charsets when typing labels. Even if they are visible at the time of configuration
these symbols are not yet available at boot time. Instead you will see unreadable sequence of pseudographic characters
garbling the display.
- Please note that mbldr overwrites MBR not only at the time of installation but as well each time you boot
(setting "active" flag for current partition and hiding inactive FAT/NTFS partitions). You have to switch off MBR
boot-virus protection in BIOS in order to boot correctly
- Mbldr installation program does not modify the partition table in MBR (except restoration from backup) thus it is
not mandatory to reboot after you have installed mbldr
- When restoring from a backup mbldr recognizes if the partition table has been changed. It could be a moved "active"
flag but also a real different partition table (you are informed about that). Here you have two options: full overwriting
of existing MBR with a backup file (could be dangerous since an out-of-date table may be restored, but useful if your
master boot sector is destroyed) or restoring only the master boot loader program keeping partition table untouched.
For Linux or BSD you deal with tar.bz2 archive, you need to compile the program using Makefile.unix and you need
to be root in order to run the installation (this is because you are modifying disk directly using something
like /dev/hda). For Windows and Linux/BSD all DPMI-related stuff is not needed, file-system type restrictions are
also not applied. Please take in account that you have to properly reconfigure your main boot-loader (like
LILO) to avoid conflicts with mbldr and allow them to coexist.
To avoid an inconsistent state of MBR contents it is necessary to reconfigure mbldr each time you move any of the
bootable partitions (for example with a help of PartitionMagic). Resizing operation (without movement) of bootable
partitions does not affect mbldr internal tables. Movement, deletion etc. of non-bootable partitions also does not
affect the configuration of mbldr.
Note: the active id does not have its usual meaning to mbldr. "Active" is only a flag in the partition table that may be
analyzed by respective operating system. Mbldr sets it to appropriate primary partition marking the OS as "active" at
boot time. Logical drives are never marked as "active". Hiding of logical drives is also not performed.
"fdisk /mbr" doesn't affect the partition table. It puts only an ordinary master boot program back. This is another way
to uninstall mbldr. But please note that there are some differences in the master boot loaders placed by different
operating systems, so be careful. For example, if you call "fdisk /mbr" from MS-DOS 7.1 (part of Windows 98/ME) MBR
is initialized with a boot code that is unable to boot operating system above 1024cyl.
If you are unfamiliar with mbldr yet and don't like command line, it is suggested to begin with GUI version (mbldrgui.exe
under Windows 2000/XP/Vista), take a look on screenshots section.
Frequently asked questions (FAQ)
Q1: Yet another boot manager? What are the advantages of mbldr over others?
A1: If you want a boot manager which is not bound to any of operating systems you have installed - mbldr is at your
service. It will not fail to boot your secondary operating system if you completely destroy the primary. Consider a
situation when you have 2 primary partitions: one with Windows XP and another one with Linux. What are options to boot
either of them? Using LILO which is able to boot both OSes you will loose an ability to normally boot a system to Windows
XP if you completely fill Linux partition by zeroes. The same with standard Windows loader + loadlin executable. In this
case you should not break Windows partition otherwise you will loose an ability to load Linux. Of course there are many
other third-party managers which are not parts of the operating systems above. Several alternatives to mbldr are listed
in Links section. However almost all of them require either separate partition (like OS/2 boot
manager) or a directory in FAT partition (like PQBoot) or occupy almost the whole track #0 on cylinder #0 (it is unused
on most systems). mbldr requires only the space which is reserved for the master boot loader by definition, only 446
bytes of 1st sector are used. Nevertheless there are some drawbacks: simplicity leads to low quality of user interface
(only text with minimum usability), less features could be included: no partitions autosearch and password protection,
there are other problems as well.
Q2: I have set up mbldr and then booted my Windows XP. But it accidentally shown me a dialog with something like
that: "New hardware has been found. Would you like to reboot?" What is this all about?
A2: At the time of Windows installation MBR is updated with the boot loader and 4 bytes presenting a DiskSignature
(or so-called NT Driver Serial Number) of a hard drive which is issued by Windows installer. Installation of mbldr
overwrites these bytes. Most probably it leads Windows to redetect and possibly enumerate partitions on this HDD what
causes updating of internal hardware database. As a result of that you see this dialog. I believe it could be safely
ignored (just press "No" there) since no actual changes have happened in system's hardware. This applies to mbldr 1.40
and below, all newer versions should keep DiskSignature untouched.
Q3: When I run mbldr.exe I see "Load error: no DPMI - get csdpmi*b.zip", what should I do?
A3: It seems you are running mbldr.exe in a pure DOS environment. You need to get DPMS extender in order to run
mbldr.exe. You may use free CWS DPMI server (redistributable under the GPL). Release 5 of CWS DPMI could be found at
ftp.delorie.com or
here is a local copy. Unpack binaries to the same directory where mbldr.exe is stored and run
it once again.
Q4: When I run mbldr.exe I see "Warning: cannot open swap file c:\cwsdpmi.swp" but then the execution continues.
Is there something wrong with it?
A4: You may safely ignore this warning produced by CWS DPMI server. Usually it happens when no disk C: is found
in a system (for instance all FAT/FAT32 drives are hidden or disk is not yet partitioned). Since mbldr does not require
too much memory swap is not needed in general.
Q5: When I try to boot one of my operating systems the boot menu just redraws itself ignoring boot attempt. What
is going wrong and how to boot my OS?
A5: There are at least two reasons that may cause this issue. One of them is that you have moved (or deleted and
then created in another place) the partition with the operating system you want to boot. In this case you have to
reconfigure mbldr (delete the entry marked as "[!!!BROKEN!!!]" and then add it once again). The another reason of this
problem maybe in the limitation of BIOS. For example some motherboards don't detect hard disks bigger than 128Gb. This
limitation is also applied to BIOS EDD3 calls (enhanced int 13h) therefore you cannot load boot record of a partition
above this boundary. Anyway the common explanation of boot menu reappearance is either an error of BR sector reading or
an absence of 0x55AA magic number at the end of sector being read.
Q6: Compilation breaks with "error: argument to ORG should be numeric" message in mbldr.err. What am I doing
wrong?
A6: Till mbldr 1.44 the version of nasm required for building was greater or equal to 0.98.36. Release .35 which
is often shipped in many popular (but rather old) distributions could not be used. Please note that starting on version
1.45 of mbldr nasm 2.x. is required.
Q7: When trying to update the MBR contents on /dev/ad0 under BSD I get "Operation not permitted" error. How to
overcome this?
A7: This protection of BSD is active because hard disk is available for writing at the moment. Try to issue a
command "sysctl kern.geom.debugflags=16" to temporarily disable it. Update your MBR and then return this value back to 0.
Q8: I am using two items in my boot menu: "1. Windows XP" and "2. Skip boot". I have configured the default menu
item to be the last OS I booted to. So I expect "Skip boot" should be the default one after I tried to use it once. But
it seems that mbldr always boots Windows XP. Why?
A8: "Skip boot" and "Next hard disk" are special boot menu items that are associated neither with particular
partition nor with an operating system. They are not remembered as default boot menu items unlike usual partitions.
However you may still mark them as default ones manually.
Q9: I had 2 hard disks in my PC, both have Windows XP installed, I used dual boot with the help of NTLDR. When I
switched off first HDD, second one did not boot alone. I installed mbldr onto a second hard disk but when I choose the
item in boot menu system just hangs. How to boot second Windows without my first hard disk?
A9: This is not a problem of mbldr, you need to reconfigure Windows boot loader in order to boot properly. When you
installed second Windows on the old PC configuration (with two hard disks), Windows installer has configured the
existing boot loader on the first HDD. Both MBR and boot record on the second HDD was left intact. So, after you removed
the first HDD system was unable to boot and it is expected. In addition to installation of mbldr on the second hard disk
you should repair Windows loader in first sector of a bootable partition. It could be done via system recovery console.
Please refer to
How to use fixboot,
Why Windows XP does not boot (Problem #6) and
Recovery console overview
Q10: I have one hard disk with 3 primary partition: one for Windows, one for my personal data and one for a
backup image of Windows. I used mbldr so I can be able to boot Windows or restore the image. The problem is that when I
use mbldr partitions 2 and 3 become hidden including partition 2 which contains my personal data.
A10: You are right, mbldr can hide all other primary FAT/NTFS partitions when booting either of configured operating
systems. So, in your case partitions 2 and 3 are hidden and it is expected behavior. You can disable partitions hiding
if you want to (this is a global setting, not applicable for individual partitions). You may also convert your primary
partition #2 into logical disk on extended partition - this will let you to aviod hiding of this particular partition
(please note that conversion operation may cause data loss). Also please note that if you are using Windows 2000/XP
(not 98/ME) as your main operating system, you may ask it to access hidden primary partitions in the same manner as for
visible ones. Go to Start->Settings->Control_Panel->Administrative_Tools->Computer_Management. There you
should choose Disk_Management in the Storage tree branch and use Change_Drive_Letter_and_Path item in context menu on a
desired partition. Unfortunately Windows 98/ME do not support this.
Q11: I have plugged second hard disk to my home PC. My main HDD has mbldr installed, but second one also contains
Windows operating system (no mbldr there). I wanted to reconfigure mbldr in a way to add one more option for booting from
another HDD but this feature does not function properly. Windows on second HDD is not booted at all while all others remain
ok. How can I boot an operating system from second hard disk?
A11: This is true, sometimes "Try to boot from next hard disk" option does not result in normal boot of operating
systems on any HDD except the first one. This is not because of improper functioning of the mbldr code in MBR, but mainly
because of bad implementation of OS-specific boot-loaders (like ntldr). The workaround in this case could be the following:
instead of using "Try to boot from next hard disk" try "Skip boot attempt and try another device" menu option. In this case
you need of course to adjust the settings in your BIOS accordingly - your first HDD should be first boot-device, your second
HDD should be the second (floppies, network boot and CD-ROM boot should be below hard disks). You probably also need to
check another BIOS option called like "Boot other device" or "Try other boot devices" to disable the limitation of booting
only from the first configured device (first HDD in our scenario) - it is usually located near the definition of boot
devices priority.
Q12: What is the difference between system and user timers in the section of timed boot configuration?
A12: The main and most reliable way to configure timed boot is to use so-called "user timer" which corresponds to
interrupt 1Ch. But unfortunately some buggy BIOSes (mainly on modern laptops) do not call this interrupt causing timer in
mbldr to stand in idle. If you experience problems with timed boot while all other methods work fine (immediate boot, boot
by request typing a key, etc.) try to change the timer from "user" to "system" in mbldr configuration.
Q13: How can I use chainload feature?
A13: This feature is inspired by
forum thread about TrueCrypt, where
it was suggested to allow mbldr to coexist with other software which occupies MBR. So, typical scenario includes installation
mbldr after the software like TrueCrypt, saving the contents of MBR to another sector (safest way is to use one of empty
sectors from first track on first cylinder). As mbldr allows to backup and restore MBR to/from any sector or a file you are
free to manage the contents of any sector you need without other tools. So, the example with TrueCrypt is: install TrueCrypt
in full-disk encryption mode (this affects MBR), boot Windows, run mbldr installation/configuration tool, save current
contents of MBR (including partition table of course) to one of the empty sectors on first track (mbldr provides you with a
list of empty sectors), add chainload entry to the list of bootable entries. You may need to disable partitions hiding and
disable marking bootable primary partition as active to let TrueCrypt copy of MBR think it resides in MBR (otherwise it
informs you about differences in partition tables). Please note that every time you move, create, delete or resize partition
you need to resync partition table between actual MBR and chainloaded copy.
Useful hints and advices
- Disable all MS-DOS disk caching programs before installing/configuring master boot sector with mbldr.
- Disable BIOS write-protection on boot sector and master boot sector. It may block mbldr from updating "active"
flag and hiding unused partitions. Remember - the master boot sector is written back every time you boot.
- Always keep bootable floppy or CD with a backup of MBR. If for some reasons the MBR loader or (what is even worse)
partition table is broken, you may restore it with the help of mbldr.
- All known versions of fdisk program running under MS-DOS (including MS-DOS 7.1 with fdisk taken from Windows ME)
do not support booting of an operating system which resides above 1024 cylinder. Thus "fdisk /mbr" may not help you
in some cases. At the same time MBR boot loader included into Windows XP supports that.
- When using Linux with LILO it is reasonable to install LILO into boot record of a chosen partition, not MBR.
Of course if you want to use mbldr ;-)
- Installation of all known Windows operating systems overwrites MBR. You have to reinstall mbldr after you install
any Windows on any partition. Since boot record of a target partition is also updated by Windows installation routine
it is safe to overwrite MBR contents with mbldr.
- Mbldr behaves correctly in a configuration with two HDDs or even more. The configuration program allows you to
choose target hard disk, so you may install mbldr on even all of them.
- Since mbldr is able to boot operating systems from logical disks you may configure MS-DOS and Windows to work in
that way. Install Windows to primary partition and then convert it to logical drive (for example using Partition Magic
by PowerQuest). It was tested for Windows 98, ME and XP but others should work fine as well.
- When installing mbldr you may use empty boot menu text and very low timeout value (let's say 1 second). Default
operating system will be booted almost immediately but those people who know this trick may press "magic" button to
modify the boot behavior. For others it would seem like no mbldr is installed at all (invisible mode).
- You may use custom menu to hide particular operating systems in a boot menu. Let's say visible choices are
"1. MS-DOS" and "2. Windows XP" but the remaining operating systems will be wiped from the boot menu text manually.
So you always may press "3" to boot for example FreeBSD.
- Despite the fact that mbldr does not support booting from CD-ROM directly, you always may try to configure the
bootable sequence in BIOS like "try HDD0 and then try CD-ROM if failed". In this configuration you may use boot menu item
labeled "Skip hard disk boot" to boot from a CD-ROM.
- Use <Enter> key to immediately boot default partition instead of pressing appropriate numbers like '1' or
'2'.
- mbldr may even be useful for servers that do not need multi-boot into different operating systems. Imagine the
following situation: you have a standalone server protected by a universal power-supply. After a long electricity outage
the capacity of UPS battery has been depleted, server detected that and went to shutdown until the power is off
completely. Then external voltage has been recovered just to be switched off again after few minutes. During this period
our server becomes operational, but the capacity of a UPS battery was not restored yet. Thus after second outage the
server will not have enough time to shutdown - weak battery will not handle that. Bringing mbldr into the picture we may
initiate a delay before server begins to boot (let's say 10 minutes). During this time battery will be recharged and it
is safe for server to boot. Otherwise the power will be switched off at the time of mbldr waiting what is not dangerous
for data.
- If you run mbldr configuration tools (CLI or GUI) under Microsoft Windows Vista please note that by default all
programs have reduced abilities even if you are logged under a user with an administrator priviledges. So if you just
launch mbldr configuration utility with a double-click it will be unable to detect your local hard disks (mbldrcli will
immediately exist, mbldrgui will have left part of "device choice" dialog disabled). You need to right-click on a
mbldrcli/mbldrgui executable and choose "Run as administrator" option from popup context-menu.
- Please note that you can install mbldr neither on CD-ROM/RW nor on DVD-ROM/RW drives, they have completely different
structure of data-storage and use another boot methods. If you want to make compact disks bootable you may find
ISOLINUX project interesting.
- While compact disks can not be used with mbldr, USB flash drives can be. Usually (if formatted from Windows) USB flash
drives have an MBR and one primary partition occupying whole flash-card (which can be used for a bootable operating system).
- You can not install mbldr onto floppy disks as they do not have MBR.
- If you use chainload feature it is recommended to keep partition tables (in the main MBR and secondary chainloaded copy
of MBR) in sync. So, every time you create, delete, move or resize partitions you need to copy new partition table to
chainloaded copy of MBR.
Important notices and limitations
There are following limitations and configurations that have never been tested yet. All information related to the topics
below is welcome (test cases, links to appropriate documentation,
patches, etc.)
- mbldr supports so-called DOS-style partition tables (4 primary partitions or 3 primary + 1 extended with 1 logical
disk per extended partition). non-DOS partition tables are not supported.
- SCSI hard disks were tested only in VMware virtual machine.
- It is unknown how mbldr works in configuration with RAID.
- I don't know whether it works with LVM.
- Microsoft Windows "dynamic disks" technology is also not tested yet.
- Mbldr is unable to load and run boot records from partitions on another drive (not the same as the one used for
loading MBR with this mbldr). Instead try installing mbldr on each hard drive and configure them independently.
- mbldr installation/configuration program does not detect whether the particular partition contains bootable
operating system. You may try to boot from any partition even from Linux swap despite it is odd.
- mbldr does not check partition table for errors like standard DOS/Windows MBR does. Neither integrity of binary code
of mbldr itself nor partition table values are checked. This is because I have to keep the code as small as possible.
- All information related to "what to boot" and "where to find it" is saved by installation program directly in the
internal structures of mbldr. Small assembly code is not intended to search through list of partitions to find the ones
suitable for booting (or the one marked "active"). Autodetect of logical disks is also not supported.
- If you are using "Next HDD" option you may experience difficulties trying to boot different operating systems from
second HDD (and all others except the first one) since their loaders should respect "hard disk number" input parameter.
For example MS-DOS and Microsoft Windows could be loaded from the first hard disk only (which has a number 80h). LILO
is able to boot Linux from the second hard disk.
- Mbldr is able to detect either ASCII or scan-codes while being in boot menu. Thus some keys that generate neither
ASCII nor scan-codes (like multimedia keys) could not be assigned to boot operating systems from a list.
- GUI version of mbldr configuration utility does not support DOS and Windows 98/ME.
Known issues
Here is a list of already known but still unresolved issues and problems in the current release:
- mbldr does not work with VMware ESX operating system
- Mbldr can not be compiled with nasm
2.04 and 2.05, need to downgrade nasm to version 2.03.01 or earlier
- Mbldr 1.45 may hang during boot if system timer is enabled. This is a bug in timer interrupt handling routine, fixed in 1.46.
If you experience issues with such hanging, try user-timer option or roll-back to 1.44. You can also try newer versions like mbldr 1.46.
- It has been reported that mbldr configuration program for DOS hangs at the stage of hard disks detection. The known configuration
is one of the modern (as of end of 2008) motherboards with Intel CoreDuo CPU and PATA devices. The workaround for this problem is to
use mbldr under Linux or Windows. However detailed reports of similar issues are welcome (not yet fixed as of mbldr 1.46).
Please feel free to report any bugs you have found.
I'll try to fix them as soon as I can.
Troubleshooting
If mbldr does not work for some reason you may ask for support. What do you need to provide in order to get help:
- Run the program with "-v" command line switch and send me a log file
- Do a screenshot of a problematic menu (if the problem is in configuration program)
- Send me an explanation of sequence of steps (in particular what you type in configuration program)
- Describe hardware configuration (disks subsystem: number of drives, their types (ATA, SATA, etc.), primary
or secondary, sizes, etc.)
- Report OS version where you execute mbldr configuration program
- Report the version of mbldr you are using
- Explain the problem (crash, hanging, incorrect behavior, etc.)
- Send me a file with custom boot menu text if you use it
- Describe partitioning scheme of your hard drives (sizes and filesystems on primary partitions and logical disks).
Appropriate screenshots of fdisk or PQMagic may help as well.
- Provide a description of OSes you want to boot: where are they, how many oses you want to boot, what are they
(brands+versions)
- What other boot-related software do you use (other boot managers for example on other hard disk, OS loaders like
LILO, etc.)
- If the problem is in GUI tool, send me a screenshot
Not all items above are mandatory, but however if you provide quality feedback with much info describing your problem,
I may help you with greater probability.
But please don't forget - mbldr is my hobby, there is no guarantee this software will work properly. I'm not responsible for
any damage it may cause. Immediate support is also not guaranteed.
Screenshots
Here are some screenshots of mbldr version 1.43:
Mbldr boot menu is shown when PC is powered on or rebooted. Please note that it could easily be customized or hidden:
(It appears on the screen immediately after Power-On-Self-Test (PoST) is passed):
Mbldr boot menu itself
|
|
CLI version of mbldr installation/configuration program running under FreeDOS:
Main menu
|
Adding a partition
|
|
|
CLI version of mbldr installation/configuration program running under Windows 98:
Configuring timed boot
|
|
GUI version of installation/configuration program under Windows2000/Vista, FreeBSD and Linux:
Under Windows 2000
|
Under Windows Vista
|
Under FreeBSD with GTK
|
Under Linux with X11
|
|
|
|
|
|
|
|
|
Of course mbldrgui also works fine under Windows XP and looks similar to Windows 2000 and Vista. Also please note that under
Linux/BSD it is recommended to use wxGTK engine of wxWidgets since X11/Universal works quite kludgy (at least for wxWidgets 2.8.3).
Features
- May boot up to 9 operating systems from primary partitions or logical disks in custom order (including chainload feature)
- MBR boot loader is written in Assembly language and compiled with NASM
- Installation/configuration program is written in C language and compiled with free tools (DJGPP under MS-DOS or FreeDOS;
GCC under Linux and BSD; MinGW under Windows)
- Installation/configuration program could be run under MS-DOS or FreeDOS and requires DPMI extension.
Since mbldr 1.38 Linux and BSD are also supported. Since 1.39 Windows is also supported.
- Uses text-mode for both boot and installation/configuration modes
- Supports MBR backup/restore operations with partition table checks
- Supports user-defined boot by pressing a configurable key ("1", "2", etc. or "F1", "F2", etc.) and showing boot timer
activity in a form of progress-bar
- Supports switching of an active flag on primary partitions
- Supports boot timeout with loading of the default operating system (which is also configurable)
- Fully customized boot menu indicating timer and default operating system
- Supports booting of the operating systems which reside above 1024 cylinder
- Hiding of inactive primary partitions (for FAT/FAT32/NTFS) like it is done in PQ PartitionMagic/OS-2 Boot Manager
(i.e. only the partition being booted is visible, all others are hidden). This is done to prevent problems happening
with MS-DOS and Microsoft Windows when living simultaneously on one hard disk. Please note that if you boot an
operating system from logical disk all FAT/NTFS primary partitions will be marked invisible and inactive.
- Detects most modern partition types properly (including hidden ones, NTFS, Linux native, LBA partitions, etc.)
- It fits into first 446 bytes of a 1st sector on a hard disk, not requiring separate partition to be allocated
- Supports all kind of hard disks supported by BIOS: ATA, SATA and SCSI
- Customizable interrupt key of a boot timer. It may be useful if the default <Esc> conflicts with a hot-key
reserved by BIOS
- Development and packaging of mbldr requires only free software: FreeDOS, DJGPP, GCC, InfoZIP, NASM, UPX, wxWidgets, etc.
- May be installed on any of the available HDDs found in a system
- The installation/configuration program has multilanguage interface
Download
Since version 1.37 mbldr requires DPMI server in order to be run under MS-DOS or FreeDOS. You may use free
CWS DPMI server (redistributable under the GPL). Release 5 of CWS DPMI could be found at
ftp.delorie.com or
here is a local copy.
GUI version of mbldr may require mingwm10.dll file. You may find it either in MinGW distribution or
locally.
Version number
|
Date
|
Status
|
Release short description
|
1.46
[Win98/ME, DOS],
[Win2K/XP],
[*nix]
|
December 12, 2008
|
Testing (may be unstable)
|
Chainload feature, fix of hanging with timer interrupt, Czech translation, "restore from backup" changes.
|
1.45
[Win98/ME, DOS],
[Win2K/XP],
[*nix]
|
May 30, 2008
|
Issues reported
|
Boot-timer fix on buggy BIOSes, French translation, hide/not hide other primary partitions,
better description for drives under Windows, extra warning if no active partitions, few bug-fixes.
|
1.44
[Win98/ME, DOS],
[Win2K/XP],
[*nix]
|
November 23, 2007
|
Stable
|
Initial version which supports interface localization using gettext
(Russian is the only available translation for now except English) for
DOS, Windows and *nix. Both GUI and CLI versions are affected.
|
1.43
[Win98/ME, DOS],
[Win2K/XP],
[*nix]
|
June 6, 2007
|
Stable
|
New GUI configuration program (mbldrgui) which is based on wxWidgets library. Command-line
mbldr renamed to mbldrcli (except DOS-version). Support for disks autodetection under Linux
and FreeBSD.
|
1.42
[Win98/ME, DOS],
[Win2K/XP],
[*nix]
|
January 11, 2007
|
Stable
|
Windows version of mbldr installation program is now able to detect hard disk size, bus type,
vendor and model. DOS and Linux/BSD versions are not affected by this change.
|
1.41
[Win98/ME, DOS],
[Win2K/XP],
[*nix]
|
November 29, 2006
|
Stable
|
The support of Microsoft Windows Vista has been introduced.
|
1.40
[Win98/ME, DOS],
[Win2K/XP],
[*nix]
|
November 15, 2006
|
Stable
|
Now mbldr is fully covered with BSD license, all code written by Thomas is wiped out. Customizable progress-bar
showing delay before timed boot that could also be used to indicate whether the timer is running/stopped.
Maximum timeout was increased from 30 minutes to 10 hours. Some fixes and maitenance work described in changelog.
|
1.39
[Win98/ME, DOS],
[Win2K/XP],
[*nix]
|
October 31, 2006
|
Stable
|
Installation/configuration program has been ported under Microsoft Windows, Boot loader is now able to remember the last
booted OS as a default one for next boot, Configurable keys used to choose an operating system to boot (either '1', '2',
etc. or 'F1', 'F2', etc.) (suggested by XM)
|
1.38
[Win98/ME, DOS],
[*nix]
|
August 18, 2006
|
Stable, obsolete
|
Ported under Linux and FreeBSD while compatibility with MS-DOS/FreeDOS has been kept.
|
1.37
|
June 13, 2006
|
Stable, obsolete
|
Boots OSes from logical disks on extended partition, TASM to NASM migration, Boot menu now supports up to 9 items,
'Skip boot' and 'Next HDD' menu items, much more free space for boot menu text, Installer was rewritten on C using
DJGPP and RHIDE under FreeDOS, May configure any HDD, UPX compression of a binary
|
1.36
|
March 10, 2006
|
Stable, obsolete
|
First release of mbldr, after more than 13 years. Includes 1024 cylinder fix and partition hiding.
|
1.35
|
December, 1992
|
Stable, obsolete
|
It is actually OS-BS, stored here just as a starting point
|
Original release (1.35) of OS-BS project has been branched to create first official version (1.36) of mbldr (please note,
that versions of mbldr below 1.36 do not exist).
The changelog for each version is available inside each package. However, the latest changelog is
available here. For complete set of files available for download,
look here.
ToDo
There are some plans for the future. Feel free to suggest
new features, send patches and improvements:
- Automatic detection of difference between partition tables in main MBR and chainloaded copy of MBR. Need to suggest
user to keep them in sync every time the difference is found (at configuration time, not at boot time).
Help needed
- Starting from version 1.44 mbldr became localizeble. This means that user interface of graphic and text-based console
configuration programs can be translated to other languages. Since I am Russian native speaker, it is very difficult for
me to support anything except Russian and English. So I posted new
open position to "Help wanted"
section on the sf.net web-site which asks for new translations. But of course updates to existing translations are always
welcome.
Here are basic guidelines and hints for making and updating translations:
- Mbldr uses gettext() interface (with .mo
and .po files), thus no source code modification is needed at all
- There is no requirement on skills in C programming language for translator
- You don't need to recompile mbldr sources when you add or modify translation-related files. Hence you don't need
compilers and SDKs. No need to follow building-related steps. There is only one exception - msgfmt utility used to convert
po-files to mo-files (compile translations)
- Both GUI and text-based console configuration programs use one united translation file per language to get
localized strings. There is no need to translate same sentences twice. Thus every time you update a translation it
may affect both configuration programs.
- There are only two tools you need to translate strings: the UTF-8 capable text editor and msgfmt utility to
compile translations.
- You may use any operating system to create new or modify existing translation. It could be Windows, Linux
or even MS-DOS (if there are UTF-8 aware text editors).
- You need to download the latest release of mbldr package (even if it is marked as "Unstable"). There is no
difference, which OS it is targeted for - DOS, Windows and Linux/BSD packages are fine.
- I recommend VIM or GVIM as a free UTF-8 aware text editor
- The result of your work should be new (or existing, but updated) .po file. You should send it to me by e-mail,
in compressed form (either zip or gzip or bzip2). Also please provide me with your name - I would like to inform
mbldr users about author of new translation. Please note, the po-file must be in UTF-8 encoding.
- When making new translations you should take ru.po file from po/ directory and modify it accordingly. My goal is
to keep Russian translation up-to-date with all current strings used in latest version of mbldr, so Russian po-file
always has complete set of required strings.
- Your translation must be covered with BSD-license.
- When you finish updating po-file you should generate proper mo-file (a binary compiled translation). This should
be done with msgfmt program. The command line for compilation is "
msgfmt ru.po -o ru.mo
". The resulting
mo-file should be placed into "mo/ru/LC_MESSAGES
" directory. Here "ru" should be replaced with the
shortened form of language you are working on. Refer to
Language codes to determine the
abbreviation you need (usually called "locale").
- Please note that Windows version of mbldr configuration utilities searches for available translations in current
directory, thus "
mo/ru/LC_MESSAGES
" should appear in the same directory where mbldr utilities reside.
The same is applied to MS-DOS, but since long file names are not supported LC_MESSAGES
should be
replaced with LC_MESSA
(not LC_MES~1
). For Linux the path used to store translations is
usually "/usr/share/locale/ru/LC_MESSAGES
", but this usually depends on the installation prefix of mbldr
package.
- For MS-DOS msgfmt utility could be found on DJGPP web-site. Go to
downloads section, choose one of the available mirrors, then
download latest gtxtXXXb.zip package (for example
gtxt040b.zip in "
current/v2gnu
"
directory)
- For Windows msgfmt utility could be found on MinGW web-site. Go to
downloads section, then choose Sourceforge downloads, then download
latest gettext-X.XX.X-X-bin.tar.bz2 package (for example
gettext-0.16.1-1-bin.tar.bz2 in
"Technology Preview: Tools for MSYS-1.0.11" from "MSYS Supplementary Tools" section).
- For Linux msgfmt utility could be either installed using package manager from your distribution (usually belongs
to gettext package) or compiled from source. In the latter case you need to download the package from
(one of GNU mirrors).
- The structure of po file is described
here
- When doing translation please leave printf-specific and other special character-sequences intact in translated
strings. In particular take care about stuff like "\n", "\r", "%s", "%i", "&" (used for hotkeys), etc.
- Case of letters should be kept untouched, trailing spaces, commas, colons, and all other symbols should be kept
as well
- Lines should be terminated with 0x0A only (Unix style). 0x0D-0x0A (DOS/Windows style) could also work, but better
to keep the line-ends consistent across all available translations
- If you deal with DOS version of mbldr under Windows 98/ME you probably will need to manually restore long name
of LC_MESSAGES directory from LC_MESSA which fits into DOS-limitation.
- If you see English interface instead of the one you expected there could be several reasons of that. One common
reason applicable to all platforms is that mbldr could not find language resources (mo-files) where they should be.
For Windows you may need to specify proper locale in Regional Settings (in Control Panel). For DOS you may need to
load country.sys driver in config.sys (
country=007,866,c:\country.sys
for Russian). This is needed to
properly set locale and codepage. For DOS you may also need to load fonts into video-memory (for Russian this could
be done for example with keyrus utility - usually launched from autoexec.bat). One common method (for all platforms)
to force mbldr to use the language you want is to set one of the following environment variables: LANG, LC_MESSAGES
or LC_ALL. This could be done in bat-file or a shell-script prior to launching mbldr iself. Russian example for
MS-DOS is: set LANG=ru
(only language) or set LANG=ru_RU.CP866
(language and encoding).
LC_MESSAGES overlaps LANG, LC_ALL overlaps all of them.
- If you have questions, contact me using
"Translation and localization" forum on
sourceforge project site. Please don't do work on translation before contacting me. I would appreciate any help,
even with incomplete translations. Do not hesitate to ask about technical details if you are not familiar with
translation procedure - I explain everything you need to make the work fast and efficient. Looking forward to work
with you.
- It is needed to perform intensive testing on different hardware and software platforms and configurations
- Mbldr needs help in attempts to be compiled on different "non-standard" software configurations and operating systems
- Help in testing how HDD model/vendor detection mechanism works is also needed under different operating systems
(especially different flavor or *nixes), with different controllers and hard disks
Also you can take a look on ToDo section if you want to help with something else.
Translation status
Please note that even if translation is in "Complete" status it may require minor update as new strings appear in
new versions of mbldr.
Building instructions
This section describes how to compile, link and package mbldr tools under different software platforms. Although it is really
needed only for Linux/BSD, it could also be helpful under DOS and Windows if you decide to debug or improve mbldr:
Building under Linux and BSD-flavours
This step is mandatory since I don't distribute binary packages for Linux and BSD.
- Download the latest mbldr.tar.bz2 package to your local machine
- Untar and decompress it with "tar jxf mbldr.tar.bz2" command
- Minimal requirements for the building tools are: gcc, ld, nasm and xxd (is a part of vim package). You may also need
strip, upx, ndisasm, tar and install. To build GUI version you will need installed development version of wxWidgets
(including headers and libraries), g++ and wxrc (is a part of wxWidgets utilities).
- Invoke "./make_unix.sh" shell script or simply type "make". Please note that under BSD you need to use "gmake" instead
of "make", so "./make_unix.sh" most probably will not work. Also please note that if you don't want to build GUI version
of mbldr configuration program (or if you simply don't have wxWidgets) type "make mbldrcli" (similarly you may build only
GUI version with "make mbldrgui").
- Be sure there is no compilation-time and linking-time errors on the screen
- To prepare Linux/BSD source-distribution package (similar to what you have downloaded) type "make dist" (you don't need
this step, it is only for maintainers)
- To clean temporary object files and binary executable files type "make clean" (please note that "make distclean" is not
implemented)
- To install/uninstall binary and documentation you may use "make install" or "make uninstall" respectively. The target
directories are defined by DESTDIR and PREFIX environment variables so it is usually /usr.
- To begin using mbldr configuration program type "./mbldrcli" or "./mbldrgui". Append "-h" command-line switch to get
on-line help.
That's it, I believe not too complex. I would be very appreciated if somebody undertakes the work of bringing mbldr to some
modern Linux-distribution. Creating and keeping RPMs, ebuilds, Debian packages etc. up-to-date is really annoying for me.
Building under DOS and old Windows
This step is optional, mbldr archive for DOS contains precompiled binaries.
- DOS-version of mbldr supports command-line interface only (the binary is called mbldr.exe). Same binary should be used
under Windows 98 and Windows ME
- Use MS-DOS or FreeDOS. I use "0.84 pre" version of FreeDOS, any newer version can also be used.
- Make sure cwsdpmi.exe is located in the directory listed in PATH environment variable (for example c:\tools\)
- Unzip all DJGPP archives (binary packages of bnu2161b, djdev203, gcc410b, gtxt040b, licv111b, mak3791b, rhid15ab, txi48b, fil41b)
to c:\djgpp\ folder (uze unzip32.exe binary shipped with DJGPP to uncompress). You can use ZIP-picker for this and browse FTP folders
on DJGPP web-site
- Make sure c:\djgpp\bin and c:\tools are in your PATH environment variable
- Add DJGPP environment variable to autoexec.bat and reboot ("set DJGPP=C:\DJGPP\DJGPP.ENV")
- Unzip upx.exe, xxd.exe (from VIM package for DOS), nasm.exe, ndisasm.exe, zip.exe (from InfoZIP package for DOS) from appropriate
DOS packages to c:\tools\
- Go to the folder where you have unpacked sources of mbldr
- Type make_dos.bat
Building under NT-family of Windows
This step is optional, mbldr archive for Windows contains precompiled binaries.
- Similarly to Linux/BSD you may build either mbldrcli or mbldrgui or both. The requirements for GUI version are little bit
more complex
- Download the latest mbldr.zip package to your local machine (please note that you need Windows zip-package. If you have
downloaded zip archive for DOS, you will not be able to build Windows version)
- Unzip the package with the help of free InfoZIP or 7-ZIP archivers (under Windows XP you may use built-in ZIP
decompressor - right-click on archive and choose "Extract all" item from context-menu)
- Install a recent GCC (gcc-core), binutils and mingw-runtime from MinGW web-site (you need to download binary packages
from current/release branch and then unpack it to c:\mingw\ directory with the help of 7-ZIP archiver). Please note that if
you are using Microsoft Internet Explorer it tends to rename .tar.gz archives to strange .tar.tar combination, so you need to
rename them manually.
- Add c:\mingw\bin\ path to the %PATH% environment variable (this could be done using System applet in Control Panel, where
you need to choose Advanced tab and then Environment Variables)
- Install GNU make package from MinGW web-site (it is distributed as executable, so there is no need to unpack it manually)
Again, the target directory should be c:\mingw
- Install nasm into the same directory by unpacking zip archive (choose Win32 binaries in the download page). Check that
nasm binaries appear in c:\mingw\bin directory.
- Install vim, the easiest way to do it is to install gvim package which is distributed as a Windows executable. Mbldr
requires only xxd utility, so you need to copy xxd.exe from c:\Program Files\Vim\VimXX\ to c:\mibgw\bin\ directory (where XX
is a version ov vim/gvim).
- Download Windows 32 API package from MinGW web-site and extract it in the same way.
- Download Libiconv and Gettext (can be found in section of MSYS Supplementary Tools) bin and dll packages from MinGW
web-site and unpack them all to c:\mingw directory (please note that contents of /usr/local/ folders in archives should
appear directly in c:\mingw\ for all 4 packages).
- You may also want to compress the result mbldr binary with UPX compressor (this is optional). Download the Win32 console
version of compressor and unzip in into c:\mingw\bin\ (in fact you need only upx.exe file).
- Invoke a command-line interpreter (click on "Start" button, then "Run...", then type "cmd" in the edit-field) and switch
to the directory where unpacked files of mbldr have been stored (this can be done with "cd" command)
- Type "make_win.bat mbldrcli.exe" to build command-line version of mbldr. If you don't need GUI version this is a last step.
Store mbldrcli.exe somewhere and remove all intermediate directories (c:\mingw\, etc.). Roll-back changes in your %PATH%
environment variable
- If you want to build GUI version of mbldr you need to download and compile wxWidgets library. There are several ways to
perform wxWidgets compilation, I recommend to use MSYS and MinGW as described in
wxWiki. wxWidgets is written in C++,
so you need to download and extract G++ (gcc-g++) compiler from MinGW web-site.
- It is also needed to simulate Unix environment. It could be done with MSYS - install it from MinGW web-site (you need the
main MSYS package, not the developer's toolkit). Use default target directory for installation (c:\msys\1.0\). In the console
window that appears after MSYS installation process you need to agree to perform port-installation configuration steps. Then
point it to c:/mingw/ directory (not c:/mingw/bin/). Note the type of slashes - these are forward in Unix-style.
- Update your %PATH% environment variable with c:\msys\1.0\bin\. Please note that MSYS path should be after MinGW path.
- Download wxMSW package in the form of executable from the wxWidgets web-site (Microsoft Windows port of wxWidgets
library). Install it into default directory.
- Define new environment variable %WXWIN%. It should point to a directory where wxWidgets is installed (for example
"c:\wxWidgets-2.8.4"). This should be done in the same way as for %PATH% environment variable. Please note that command-line
interpreper should be reopened to use newly added environment variables.
- Run MSYS shell in a console window (using the desktop icon) and switch to wxWidgets directory using command like
"cd c:wxWidgets-2.8.4/". Please note that there is no slash or backslash after disk specification ("c:").
- Use "./configure --enable-monolithic" script to adjust Makefiles. You may pass some parameters in order to enable or
disable debugging, reduce the size of result binary by switching off some components, etc. For wxWidgets 2.8.4 I use
"./configure --enable-monolithic --disable-shared --enable-optimise --disable-debug --disable-mem_tracing --disable-profile
--enable-no_rtti --disable-no_exceptions --disable-compat24 --disable-compat26 --enable-image --enable-gif --disable-pcx
--disable-tga --disable-iff --disable-pnm --disable-xpm --disable-icocur --without-libpng --without-libjpeg --without-libtiff
--without-libxpm --without-libmspack --without-opengl --without-regex --without-zlib --without-odbc"
- If the previous step was completed successfully, use "make" to build the wxWidgets library.
- There is no need to invoke "make install", instead check (and update if necessary) values of CXXFLAGS and LIBRARIES
variables in Makefile.win file (which is a part of mbldr distribution package). You may do it with vim or gvim that you have
recently installed.
- If you want to create a Windows package of mbldr (in zip-archive) you need to install InfoZIP. Download ZIP (not UnZIP)
utility and unpack zip.exe binary into c:\mingw\bin\ folder.
- Run command-line interpreper, switch to directory with mbldr sources and type "make_win.bat mbldrgui.exe" to build GUI
version of mbldr configuration utility. You may also invoke "make_win.bat" without parameters to build both mbldrcli and
mbldrgui.
- Copy mbldrgui.exe file to some place, uninstall unused software and wipe intermediate directories out. Also don't forget
to restore your %PATH% and delete %WXWIN% environment variables.
There is no need to use Cygwin to compile mbldr under Windows, however you may try, it could work in theory. Also I have not
checked whether mbldr could be built using Microsoft Visual C++. Feel free to try and report the results.
Contacts
I would appreciate any feedback from users of mbldr. I am mostly interested in bugs (crashes, hangings, etc.), but of course
I am also interested in success stories. The recommended way to contact current maintainer is to use an appropriate mechanism on
sourceforge project site (forum, tracker, bugs, feature requests, etc.).
There is no hypertext references in the e-mail addresses below due to spam bots protection:
Current maintainer of mbldr is Arnold Shade (what is a nickname due
to several reasons being anonymous). Use it to refer mbldr 1.36 and above.
- arnold_shade __at__ users __dot__ sourceforge __dot__ net
The author of OS-BS is Thomas Wolfram. Use it to refer os-bs 1.35 and below (which is also called mbldr 1.35):
- Thomas __dot__ Wolfram __at__ BootManager __dot__ com
- thomas __at__ aeon __dot__ in-berlin __dot__ de
- thomas __at__ wolfram __dot__ net
- wolf __at__ prz __dot__ tu-berlin __dot__ de
Note: you need to replace " __dot__ " with "." and " __at__ " with "@" before using the addresses above.
Links
Project related resources:
Pages related to OS-BS project:
Similar projects (other boot managers):
Assembly language descriptions and CPU instructions set
Partition tables and boot loaders
Development and packaging stuff
Operating-systems related
BIOS and ATA specifications
Last updated: December 12, 2008