*BSD News Article 34723


Return to BSD News archive

Xref: sserve comp.os.386bsd.misc:3343 comp.os.linux.misc:22374
Newsgroups: comp.os.386bsd.misc,comp.os.linux.misc
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!constellation!convex!insosf1.infonet.net!yeshua.marcam.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!EU.net!sun4nl!rnzll3!sys3.pe1chl!rob
From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: OS Boot sector select
Reply-To: pe1chl@rabo.nl
Organization: PE1CHL
Message-ID: <CuvMKx.Dy1@pe1chl.ampr.org>
References: <Cuo5KE.CnL@avalon.chinalake.navy.mil>
Date: Sun, 21 Aug 1994 08:36:32 GMT
Lines: 48

In <Cuo5KE.CnL@avalon.chinalake.navy.mil> gspiegel@archimedes.chinalake.navy.mil (Greg Spiegelberg) writes:

>I seem to remember there being a program that replaces the boot sector
>on the primary drives 0 partition that allows you to select from a list
>of possible OS's on one system.  Anyone know where this is at and if
>it'll agree with DOS 6.2, NetBSD, and Linux?

Long ago, I wrote this simple bootselector.  I am still using it as
my MBR...:

begin 644 mbr
M^C/`CM"\`'R+]%`'4!_[_+\`!KD``?*EZAT&``"^O@>S!(`\@'0.@#P`=1F#
MQA#^RW7OS1BP!"K#@\80_LMT#8`\`'3TOD<'Z+P`Z_Y0OA@'Z+,`6%`$,;L'
M`+0.S1"^0`?HH@#K"+L'`+@'#LT0,N3-&H'"M@"#T0!14K0!S19U%#+DS1J+
MP8O:6ED[VG7J.\%UYNL86%@RY,T6/"!T#CP-=`HL,7*_/`1SN^L!6%`$,;L'
M`+0.S1"^1`?H2`!8,N2Q!-/@!;X'B_"R@(IT`8M,`HONOP4`NP!\N`$"5\T3
M7W,0,\#-$T]U[;Y?!^@6`.DI_[Y^![_^?8$]5:IU[HOUZ@!\``"L/`!T"U:[
M!P"T#LT07NOPPPT*"E-E;&5C="!"3T]4(%!A<G1I=&EO;B`H,2TT+"!D969A
M=6QT(``I.B``#0H`26YV86QI9"!P87)T:71I;VX@=&%B;&4`17)R;W(@;&]A
M9&EN9R!O<&5R871I;F<@<WES=&5M`$UI<W-I;F<@;W!E<F%T:6YG('-Y<W1E
+;0````````````!I
`
end

Using Linux, just copy this to your disk using something like:

	dd if=mbr of=/dev/hda

It will replace the bootstrap loader contained in the master boot record
with one that prompts you for a partition number (1-4), and then boots
that (primary) partition, whatever is in it.
After a timeout, it just boots the marked "active partition", which is
just what would happen when you have not installed this program.

When using it, you must put LILO on the partition bootsector of the
partition where you have Linux (e.g. /dev/hda2), not on the MBR.

There are much more sophisticated bootselectors available, but I still
use this one because it only requires some space in the MBR, no extra
space on the disk.  (compare with OS/2 which requires 1MB for its
bootselector...)

Rob
-- 
-------------------------------------------------------------------------
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
-------------------------------------------------------------------------