[comp.os.msdos.misc] Boot of A:, switch to C:?

ron@vpnet.chi.il.us (Ron Winograd) (12/01/90)

Item # 1494 by [Ron Winograd] at vpnet.chi.il.us
Subj: Boot of A:, switch to  C:?
Date: 30'th of Nov, 1990
This has 0 responses.


Hello everyone,
 I have a 386, running both MS-DOS 4.01 and UNIX System V.
My question: I have the active hd partition on unix, because that
is the only way I know how to start it. This means that if I want MS-DOS,
I have to boot off a floppy. However, if I do, then I have to keep it in
everytime I exit a program, like Word, or Delux Paint etc.. because it
needs command.com. Is there anyway to "switch control" over to the C:
drive, without having to use fdisk to switch active paritions again and
rebooting?
-Ron
-----------------------------------------------------------------------------

|Ron Winograd       |Some boy scouts were taking a survey. They knocked on a|

|ron@vpnet.chi.il.us|door and asked the gruff man who answered, "Sir, do you|

|-------------------|think that ignorance or apathy are the biggest problems|

|in America?" Annoyed, he answered, "I don't know, and I really don't care!"|

-----------------------------------------------------------------------------

lbr@holos0.uucp (Len Reed) (12/03/90)

In article <2757419a-72comp.os.msdos.misc@vpnet.chi.il.us> ron@vpnet.chi.il.us (Ron Winograd) writes:
= I have a 386, running both MS-DOS 4.01 and UNIX System V.
=My question: I have the active hd partition on unix, because that
=is the only way I know how to start it. This means that if I want MS-DOS,
=I have to boot off a floppy. However, if I do, then I have to keep it in
=everytime I exit a program, like Word, or Delux Paint etc.. because it
=needs command.com.

You need to set the environment variable that tells the system where
the command interpreter is.  The cleanest way to do this it to
put a config.sys file on your boot floppy.  In that file put the following
line:

SHELL=C:\COMMAND.COM

Make sure that your A:autoexec.bat file doesn't set COMSPEC, or if it does,
make sure the drive is specified:

set COMSPEC=C:\COMMAND.COM

I can't count the number of times I've seen variations on this problem;
invariably, COMSPEC is set to "\COMMAND.COM" with no drive given.

You probably have no A:\config.sys or it doesn't have a SHELL line.  In
either case the boot procedure implicitly sets COMSPEC to d:\COMMAND.COM,
where d: is the boot drive.  In your case that's A:.
-- 
Len Reed
Holos Software, Inc.
Voice: (404) 496-1358
UUCP: ...!gatech!holos0!lbr

roy%cybrspc@cs.umn.edu (Roy M. Silvernail) (12/03/90)

ron@vpnet.chi.il.us (Ron Winograd) writes:

> Is there anyway to "switch control" over to the C:
> drive, without having to use fdisk to switch active paritions again and
> rebooting?

The programs you mention overwrite the transient portion of command.com,
and so it needs to reload after they complete. There are 2 ways to take
care of this...

1) simply assign COMSPEC to C:\WHAT\EVER\COMMAND.COM (altered, of
course, to reflect where COMMAND.COM is on your C: drive). This is
easily done in the autoexec.bat file.

2) use a SHELL=C:\WHAT\EVER\COMMAND.COM statement in the config.sys.
This is also a good place to put modifications, like expanding the
environment.

Either way, you don't need to fdisk to accomplish this.
--
Roy M. Silvernail |+|  roy%cybrspc@cs.umn.edu  |+| #define opinions ALL_MINE;
main(){float x=1;x=x/50;printf("It's only $%.2f, but it's my $%.2f!\n",x,x);}
"This is cyberspace." -- Peter da Silva  :--:  "...and I like it here!" -- me

ron@vpnet.chi.il.us (Ron Winograd) (12/03/90)

Thanx to all who responded. The soloution turned out to be incredibly easy.
All I needed to do was put:
set comspec=c:\command.com
in my autoexec.bat. It worked perfectly.
Thanx again
-Ron
-----------------------------------------------------------------------------
|Ron Winograd       |Some boy scouts were taking a survey. They knocked on a|
|ron@vpnet.chi.il.us|door and asked the gruff man who answered, "Sir, do you|
|-------------------|think that ignorance or apathy are the biggest problems|
|in America?" Annoyed, he answered, "I don't know, and I really don't care!"|
-----------------------------------------------------------------------------

prk@planet.bt.co.uk (KnightRider) (12/03/90)

ron@vpnet.chi.il.us (Ron Winograd) writes:

>Item # 1494 by [Ron Winograd] at vpnet.chi.il.us
>Subj: Boot of A:, switch to  C:?
>Date: 30'th of Nov, 1990
>This has 0 responses.


>Hello everyone,
> I have a 386, running both MS-DOS 4.01 and UNIX System V.
>My question: I have the active hd partition on unix, because that
>is the only way I know how to start it. This means that if I want MS-DOS,
>I have to boot off a floppy. However, if I do, then I have to keep it in
>everytime I exit a program, like Word, or Delux Paint etc.. because it
>needs command.com. Is there anyway to "switch control" over to the C:
>drive, without having to use fdisk to switch active paritions again and
>rebooting?
>-Ron

I vaguely remember something about the COMSPEC environment variable being
the path of where COMMAND.COM is loaded from.  Now, don't try entering a
SET command, it is, in effect, a read-only variable, to set.  

In your config.sys file, put a line in :

SHELL=C:\dir\command.com 

However, you have to have a DOS partition on your hard-disk....

Peter Knight

BT Research

#include <std.disclaimer>

LONGSHOT@VAX1.MANKATO.MSUS.EDU ("Rewind, operator gonna kill 'em with sound") (12/03/90)

        At the last company I worked at, the way we set up booting from
a selected partition was to run a script under unix that got its redirected
input from a file and use it to run UNIX fdisk.  This script would set the
active partition to DOS, and call a re-boot(by sending chars to the keyboard
buffer, I think).  We had a batch file under DOS that did pretty much the
same thing.  All we had to do to boot from the other OS was to run the script
or batch file and we would be up and running.  This is a LOT easier than
trying to boot from a floppy and switch command paths.


-Longshot( Erik J. Green)

longshot@att1.mankato.msus.edu

antoniop@cernvax.cern.ch (antonio pastore) (12/04/90)

In article <F5FAB082BF1F202082@VAX1.Mankato.MSUS.EDU> LONGSHOT@VAX1.MANKATO.MSUS.EDU ("Rewind, operator gonna kill 'em with sound") writes:
>
>        At the last company I worked at, the way we set up booting from
>a selected partition was to run a script under unix that got its redirected
>input from a file and use it to run UNIX fdisk.  This script would set the
>active partition to DOS, and call a re-boot(by sending chars to the keyboard
>buffer, I think).  We had a batch file under DOS that did pretty much the
>same thing.  All we had to do to boot from the other OS was to run the script
>or batch file and we would be up and running.  This is a LOT easier than
>trying to boot from a floppy and switch command paths.
>
>
>-Longshot( Erik J. Green)
>
>longshot@att1.mankato.msus.edu


Why do you want to make it so difficult? Use one of the multiboot program
available in the PUBLIC DOMAIN (mine, for example). At boot time simply
chose the partition you want to boot and it is all.

-----------------------------------------

Here follows the uuencoded version of hdboot.com program. When you run
uudecode on it, the resulting file is obviously a BIBNARY file. So if you
plan to move on MSDOS with some comunication system (i.e.: ftp) do not
forget to specify BIN to the program.

The hdboot.com file is 1792 byte long.
To run the program, boot MSDOS (any version from 2.1 up), and
just run 'hdboot'. The program will interactively ask a confirmation
before installing the new boot sector on your hard disk. Answer 'Y'.

Reboot the computer and boot the MSDOS partition to check if
hdboot is properly running. You can manually run any of the
4 partition. Usually, starting a not esisting partition or
without an O.S., a failure message will be printed.

When the new boot sector takes control, it proposes, as 
default partition, the current ACTIVE partition. Press return
to run the default.

XENIX/UNIX must always be the ACTIVE partition, otherwise they
will not boot.

If you know how to doit, (i know) save the old boot sector
before running hdboot. This will prevent the loss of the
disk if something will go wrong.

DISCLAIMER
----------
I have been running hdboot from 1987 and upgrading it until
the final version you get. I ran it with MSDOS versions
3.x up to 4.x, XENIX 286 (both SCO and OLIVETTI), Venix 86,
SCO XENIX 386, all without problems. I double checked the file
you are receiving uuudeconding it and runnning it again.
BEWARE ANYHOW, BECAUSE HDBOOT IS A DANGEROUS PROGRAM.
I WILL NOT FEEL RESPONSIBLE IF HDBOOT WILL NOT SUPPORT YOUR
HARDWARE/SOFTWARE CONFIGURATION OR IT WILL PRODUCE ANY DATA LOSS.

Enjoy, Antonio

/---------------------------------------------------------------------------\
| Antonio Pastore                  | CERN - CN/CE/MS Microprocessor Support |
| E-Mail: antoniop@cernvax.cern.ch | 1211 Geneva 23, Switzerland (Europe)   |
\---------------------------------------------------------------------------/


----------------------------------------------------------

begin 644 hdboot.com
MN+L!/;T!=@FZG 'HB0#I@@"Z^0'H@ "T#+ (S2$\>706/%ET$KKB NAL +KI
M NAF +@! .M=D,8&X@)9D+KB NA4 +0"L &R@+8 M0"Q 8S;CL.[  3-$[K!
M ;@! '(NOKX%O[X'N4( \Z2T [ !LH"V +4 L0&,VX[#NP &S1.ZW0&X 0!R
M!KK\ K@  %#H!0!8M$S-(;0)S2'#!T)O;W0@<F5C;W)D('-I>F4@97AC965D
M(# Q0D0@:&5X+@T*)$5R<F]R(')E861I;F<@9FEX960@9&ES:RX-"B1%<G)O
M<B!W<FET:6YG(&9I>&5D(&1I<VLN#0HD#0H'2&1";V]T.B!);G1E<F%C=&EV
M92!&:7AE9"!$:7-K($)/3U0@<V5C=&]R(&EN<W1A;&QA=&]R('!R;V=R86TN
M#0I#;W!Y<FEG:'0@*$,I(&)Y($%N=&]N:6\@4&%S=&]R92 M($9E8B Q.3@Y
M("T@5F5R6S)=#0I&<F5E('5S92!G<F%N=&5D('!R;W9I9&EN9R!Y;W4@1$].
M)U0@;6]D:69Y(&-O<'ER:6=H="!M97-S86=E<RX-"@T*5T%23DE.1RP@1$%.
M1T523U53(%!23T=204TL($-/3E1)3E5%/R!;3ET(""1.70T*#0HD3F]T(&EN
M<W1A;&QE9"X-"@T*)$AD0F]O=#H@26YT97)A8W1I=F4@0D]/5"!S96-T;W(@
M:6YS=&%L;&5D(&]N(&9I>&5D(&1I<VLN#0H-"B0                     
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                                                            
M                          #IF0!);G9A;&ED('!A<G0N('1A8FQE(&]N
M $5R<F]R(&QO861I;F<@<WES=&5M(&9R;VT 3F\@3W N(%-Y<RX@;VX (&9I
M>&5D(&1I<VL-"@!(9$)O;W0@=C(@*$,I($%N=&]N:6\@4&%S=&]R90T*4V5L
M96-T($]P97)A=&EN9R!3>7-T96T@6S$M.%TZ(%LQ70@( #%=#0H-"@#Z_+C 
M!X[8!2  CL".T+P (%"XO0!0O@  B_ZY  'SI<O[OP, N[X!N00 NO\ @#\ 
M= V /X!U&('Z_P!U$HO1@\,0XNF!^O\ =1#-&+\: .B8 +]# .B2 .O^N 0 
M*\)0  :0 !ZX0 ".V(L68P"#P@2@90#N'[]1 .AN +0 S19:/#AW"#PQ<@0L
M,8K04@ 6E0"_E0#H4@!;NH  @_L$<AR#ZP13NH$ N0$ !AX'Z$H ![Z^ 8O^
MN2  \Z5;N, 'CL %( ".V+$$T^.(E[X!BY>^ 8O#!;X!4(N/P 'H&P!>N   
M4+@ ?%#+B@5'/ !T";L' +0.S1#K\,.[  "]!0"X 0+-$W,&377VZ3[_OS0 
M)H$^_@%5JG0#Z3+_PP                                          
E                                                    
 
end

bill@bilver.uucp (Bill Vermillion) (12/05/90)

In article <F5FAB082BF1F202082@VAX1.Mankato.MSUS.EDU-> LONGSHOT@VAX1.MANKATO.MSUS.EDU ("Rewind, operator gonna kill 'em with sound") writes:
->
->        At the last company I worked at, the way we set up booting from
->a selected partition was to run a script under unix that got its redirected
->input from a file and use it to run UNIX fdisk.  This script would set the
->active partition to DOS, and call a re-boot(by sending chars to the keyboard
->buffer, I think).  We had a batch file under DOS that did pretty much the
->same thing.  All we had to do to boot from the other OS was to run the script
->or batch file and we would be up and running.  This is a LOT easier than
->trying to boot from a floppy and switch command paths.

And a lot more dangerous if you had a machine hiccup or power failure when
you were writing to that area of the hard drive.

Booting from a floppy with the proper setup to take you to c: and run them
is the prudent way of doing things.

There are some pd programs that permit multi-boots from a prompt also.
Saw something like that in one of the Unix sources areas a couple of month
back.   

You type the os at the boot prompt.  eg   dos, unix, minix, ???
-- 
Bill Vermillion - UUCP: uunet!tarpit!bilver!bill
                      : bill@bilver.UUCP

longshot@ATT1.MANKATO.MSUS.EDU (Erik J. Green) (12/05/90)

	In his earlier post, Antonio Pastore(antoniop@cernvax.cern.ch) wrote:
>>In article <F5FAB082BF1F202082@VAX1.Mankato.MSUS.EDU> LONGSHOT@VAX1.MANKATO.M>>SUS.EDU ("Rewind, operator gonna kill 'em with sound") writes:
>>	At the last company I worked at, the way we set up booting from a 
>> selected partition was to run a script under unix that got its redirected
>> input from a file and use it to run UNIX fdisk.  This script would set the
.... my suggestion deleted.....
>Why do you want to make it so difficult? Use one of the multiboot program
>available in the PUBLIC DOMAIN (mine, for example). At boot time simply
....rest of message deleted

Sorry, I couldn't pass this up.  We tried using one of the multiboot programs
available at the time(about a year ago) and It cost me about 9 hours of work 
and the corresponding amount of pay. It seemed to install and run fine, but 
when the system got out to the customer, it crashed the hard drive and took out
both the partitions and all of the customer's data.  I notice that in the 
tail end of your posting you printed a disclaimer as to any damage your 
program may cause.  This is the bottom line on this type of program as far
as I'm concerned.  It's much safer to just use the fdisk program that came 
with your UNIX version than to play with the boot tracks on the drive. 
You can also have the UNIX script that switches partitions run the shutdown
procedure automagically.  This gives you enough time to run off and get a 
snack while your system shuts itself down and reboots to dos. B-)

-Longshot(Erik Green)

longshot@vax1.Mankato.Msus.edu

  

pyro@casbah.acns.nwu.edu (Leedell Miller) (12/07/90)

While placing the line
set comspec=c:\command.com
in your autoexec solves the problem, you can speed things up measurably by
copying your a:\autoexec.bat to c:\autoexec.bat and changing your
a:\autoexec.bat to the following one line batch file:

@c:\autoexec

This will execute your autoexec from C (which means MUCH faster disk access
to read the batch file's lines).  The @ prevents the command from being
echoed to the screen before execution.  (This was introduced in DOS 3.3, I
believe, so it should also work for your DOS 4.x system.)
-- 
 _[\_______________/]_  | "I've abandoned my search for reality
(:=)> Be Talkin'! <(=:) |  and am looking for a good fantasy."
 ~[/~~~~~~~~~~~~~~~\]~  |                  Leedell Miller - Academic Computing
pyro@casbah.acns.nwu.edu|                Northwestern University - Evanston IL