The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Create a Win95/BeOS Boot Menu

Contributed by: Scot Hacker
This tip is valid for: Both BeOS and Haiku

[Editor’s note: It’s far easier and slicker to use BeOS’ bootman to manage a multi-boot system than it is to do it through Windows, which isn’t friendly to multiple operating systems. This tip is here for the curious or masochistic user only.]

Win95 includes a menu of boot options that you can access by hitting F8 when you see “Starting Windows 95” during startup. However, it’s not hard to create a custom menu that will let you choose between DOS, Windows 95, and BeOS. Your custom menu can also be set to boot straight into any of these choices after a given number of seconds. Note that many parts of this process can be done with TweakUI, which you can download for free from Microsoft. I think it’s useful to know what’s going on though, so here are instructions for doing it manually. You’ll also get a much higher degree of customization if you do it manually.

To make this work, you’ll need to get three DOS files all talking to each other: autoexec.bat, which specifies what processes to launch automatically; config.sys, which specifies things about your system configuration (such as loading CD-ROM drivers), and msdos.sys, which specifies things about how to launch Windows95 before the GUI comes up. The first two go all the way back to the earliest versions of DOS, while msdos.sys was added when 95 came along.

Make backup copies of these three files before modifying them, just to be safe. Since msdos.sys is a hidden, read-only system file, you need to turn off these attributes before you can save any changes to it. If you’re working in DOS, type ATTRIB -H -S -R MSDOS.SYS. If you’re in Win, right-click it and choose Properties, then uncheck those attribute boxes. When you’re done editing this file, you need to turn these attributes back on, or the file will be ignored at boot time. From DOS, type ATTRIB +H +S +R MSDOS.SYS, or recheck the boxes in the Property sheet.

Open up msdos.sys in any text editor (from DOS, type EDIT MSDOS.SYS), scroll down to the [Options] section, and set BootGUI to 0 (zero). If you hate the insipid Windows 95 startup screen, add a line reading Logo=0. Make sure BootMulti is set to 1. Add BootMulti=1 if it doesn’t already exist. If you don’t want the default boot menu to appear (and you probably don’t, since we’re going to replace it), add a line reading BootMenu=0. Save the file and restore its attributes as above.

Open up config.sys and add information about the custom menu you want to create. Just paste this text at the top of the file:


[Menu]
MenuItem = Win95
MenuItem = DOS
MenuItem = BeOS
MenuDefault BeOS,10
MenuColor 15,1

[Win95]
DEVICE=DEVTAISATAP.SYS /D:MSCD000 /N:1
[DOS] DEVICE=DEVTAISATAP.SYS /D:MSCD000 /N:1

[BeOS]

Note that any information that was already in config.sys will need to be moved to appropriate areas of the file. For instance, in this example the CD-ROM driver info is added to both DOS and Win sections so that the CD will be available either way. The BeOS section is empty because Be doesn’t need anything special passed to it from DOS (obviously).

The MenuDefault line says that if you don’t do anything, BeOS will be automatically booted in 10 seconds. Season to taste. The MenuColor line gives you white text on a blue background.

Finally, open up autoexec.bat, where we’ll tell it to run different things depending on what was chosen during the config.sys step. Paste in the example below, then customize to suit your own needs:


@ECHO OFF
SET PATH=C:;C:WINDOWS;C:WINDOWSCOMMAND

GoTo %CONFIG%

@ECHO ON

:WIN95
C:WINDOWSCOMMANDMSCDEX.EXE /D:MSCD000
win
goto end

:DOS
C:WINDOWSCOMMANDMSCDEX.EXE /D:MSCD000
goto end

:BeOS
SET PATH=
beos.bat

:end

Note that :beos section loads the beos.bat file specified in the tip Launch Beos x86 from DOS/Win.

You should be all set. If you got everything right, your machine should boot normally, briefly say “Starting Windows 95,” then thrown up a blue and white screen giving you a list of operating system choices. You can choose one by choosing its number, or wait ten seconds to boot straight into BeOS (in this example).

And of course you can extend this to add an option for loadlin, if you’re running Linux.

Many thanks to JoshB (joshb@techie.com) and Braden McGrath (dilbert@lightstream.net) for helping to really dial in this process.

Posted in Miscellaneous


(comments are closed).