Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Sep 1997 08:34:48 +0930
From:      Matthew Thyer <thyerm@box.net.au>
To:        Tom Bartol <bartol@salk.edu>
Cc:        current@FreeBSD.ORG
Subject:   Re: modifying boot mgrs FROM FREEBSD
Message-ID:  <340F3E90.41C67EA6@box.net.au>
References:  <Pine.BSF.3.95.970806153805.1888E-100000@pauling.salk.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
I do this...

Because I have a plug and pray sound card in a non plug and pray
motherboard, I have to 'activate' the sound card from DOS with the
"Intel Configuration Manager" before booting FreeBSD or the sound
card will not be detected in the device probes.  To do this I have
set things up to default to booting my previous version of md-dos
which has DWCFGMG.SYS in its config.sys (thus activating the card)
then the autoexec.bat will re-write the boot block and reboot the
machine thus booting into FreeBSD.

I use the bootblock restore program from a utility called BOOTSAVE
in DOS to manipulate the boot blocks and in FreeBSD on shutdown I
use a script called "shutit" which is:

dd if=/dos/boot.dos of=/dev/wd0 ibs=1 skip=4 count=512
sleep 1
shutdown -r now

For those who dont know further details are:

In my C:\MSDOS.W40 (msdos.sys in W95) in the [Options] section:

BootMenu=1               ; show the W95 boot menu
BootMenuDefault=8        ; default to previous version of ms-dos
BootMenuDelay=5          ; give me 5 seconds to load W95 if I want

then my C:\AUTOEXEC.BAT (autoexec.dos whilst in Win95 I think) I have:

CHOICE /N /Ty,5 Rebooting to UNIX in 5 seconds (or press 'N' to stay
with the DOG)
IF ERRORLEVEL 2 GOTO SkipReboot
ECHO Writing the FreeBSD bootblock and rebooting
C:\UTILITY\BOOTSAVE\BOOTREST C:\BOOT.BSD
REBOOT /F
GOTO TheEnd
:SkipReboot
ECHO EGAD! You really want to use the DOG!
:TheEnd

You have to find a reboot utility also... its not standard with the DOG
!

It seems to work most times for me... Sometimes bootrest wont write the
bootblock.  But FreeBSD has never failed to put my /dos/boot.dos
bootblock
back (on shutit) and I've never had a disk corruption problem.

Use at your own risk naturally.

Tom Bartol wrote:
> 
> Would it be too weird to do the following quick and dirty thing completely
> without the need for any documentation on which boot manager you're using:
> 
> 1) setup your boot manager from dos or wherever necessary to do the
> initial install.
> 
> 2) boot into freebsd or linux and use dd to read the boot blocks off the
> disk and into a file.
> 
> 3) boot back into whatever environment can be used to "tune" your boot
> manager and do whatever "tuning" strikes your fancy.
> 
> 4) boot back into freebsd or linux and use dd to read the modified boot
> blocks into a second file.
> 
> 5) use diff or cmp to find out what effect your "tuning" had on the boot
> blocks and try to deduce the logic (i.e. reverse engineer) the mods.
> Hopefully this will not be very complicated.
> 
> 6) you might then be able to use patch on your snap-shot copy of the boot
> blocks to "tune" it from within freebsd of linux.  If you're really
> confident of your work you can then use dd to write your "tuned" boot
> blocks back to where they belong.
> 
> Just a thought...
> 
> Tom
> 
> On Thu, 7 Aug 1997, George Michaelson wrote:
> 
> > Four things:
> >
> >       1) at next boot, which of the menu of boot choices is to be the
> >          default ie under reboot, do you boot back into THIS unix or into
> >          W95, DOS, NetBSD, Linux etc
> >
> >       2) change the flag marking if the MBR is to be updated to reflect
> >          the current boot choice as the live preference. This is different
> >          to the above which states WHICH secondary boot is to be used, this
> >          marks if any alternate boot is actually taken because of keyboard
> >          selection, that the selection becomes the active default boot
> >
> >       3) change the textual stringprompts against each option
> >
> >       4) change which bootable partitions appear in the menu of choices
> >
> > -George
> >

-- 
/=====================================================================\
|  Work: Matthew.Thyer@dsto.defence.gov.au | Home: thyerm@box.net.au  |
\=====================================================================/
"If it is true that our Universe has a zero net value for all conserved
quantities, then it may simply be a fluctuation of the vacuum of some
larger space in which our Universe is imbedded. In answer to the
question of why it happened, I offer the modest proposal that our
Universe is simply one of those things which happen from time to time."
 E. P. Tryon   from "Nature" Vol.246 Dec.14, 1973



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?340F3E90.41C67EA6>