It can be done: Running Linux from within Windows

It can be done: Running Linux from within Windows

Post by Ido Bar-ta » Sat, 07 Jan 1995 05:58:47



Several people contacted me with respect to my earlier post
advocating Linux using DOS FAT filesystem.

Here is how I implement a windows procedure that will
fire-up linux without a need to reboot, just a double-click
on a progman icon.  Very handy, IMHO:

1. Ingredients:
 - Linux using umsdos, on the same DOS partition.
 - PC Magzines wincmd windows batch language (available at your
        nearset cica mirror, as wincmd.zip or similar.).
 - exitw.exe - a program that exits windows immediately,
        no questions asked. Available at above.

2. Procedure:

2.1 in your root directory, make a tiny file, called dummy.flg. It
can be just a single byte, its presense is important, not its contents.

2.2 in your multi-config autoexec have the following:

...
:wfw
cd \wfw
win
if exist c:\rununix.flg goto linux  
goto done

:linux
if exist c:\rununix.flg del c:\rununix.flg
c:\loadlinx c:\linux\vmlinuz root=c: rw

:done
cls

Rem end of autoexec

2.3 make a wincmd file consisting of the following (I call it rununix.wcm):
copy c:\dummy.flg c:\rununix.flg
"c:\windows\exitw.exe"

2.4 make an icon in progman that will run "wincmd.exe rununix.wcm"

3. Principle of operation:
Very simple: when you click on the above icon, wincmd copies dummy.flg to
rununix.flg and then exits windows, into the next statement of autoexec.bat
(I also have a wfw.bat with the same structure). Whats the next statement
of autoexec.bat? Its testing for the existance of rununix.flg. If it exists,
then it goes to the linux portion. If not, it goes to the end of autoexect and
exits as usual. The 'linux:' section checks if rununix.flg exists and deletes it if
so, and fires up linux. The check is necessary since if I run linux directly
from autoexec (at bootup) then rununix.flg won't be there, and del would be
inappropriate.

--

my address index card and PGP public key.

 
 
 

It can be done: Running Linux from within Windows

Post by Viktor T. To » Sun, 08 Jan 1995 02:05:05


[...]

Quote:>Here is how I implement a windows procedure that will
>fire-up linux without a need to reboot, just a double-click
>on a progman icon.  Very handy, IMHO:

[actual procedure deleted]

Just a suggestion: if you use a later version of SMARTDRV.EXE, you may want to
include the line SMARTDRV /c just before calling loadlin. This ensures that
all of SMARTDRV's caches are flushed to disk before Linux takes over. This is
something I actually do every time before shutting down DOS. It is only
relevant with versions of SMARTDRV that do not automatically flush everything
when the DOS prompt appears.

--
Viktor

 
 
 

1. Now run Linux within Windows 95 or NT!

A port of the Bochs PC emulator to Windows has just been released!

Features:
- Now runs Windows 95 or Linux (and more!) from within Windows 95 or
  Windows NT.
- Keyboard and mouse support.
- Standard VGA and text mode support.
- Uses floppy disk images and hard disk images.
- Source code included.  Bochs builds from the same source tree on UNIX,
  BeOS and Windows.
- Easy installation instructions.

Check it out:
http://v.nu/core/Bochs

--
David Ross

2. Using the AC patches

3. Running X session within another Window Manager like kde

4. kernel 2.4.18 final : SET_PERSONALITY fix in rc4 mistake

5. Run Unix script from within Windows???

6. Any software?

7. running xterm from within Windows browser

8. Can you tell me if this is right? And 1 question.

9. Run Unix script from within Windows??

10. "su" segfaults when NOT run from within X-Windows.

11. Linking two PCs running either DOS/Linux/Window/X

12. Running Windows/Dos programs in Linux(SuSE)

13. Linking two PCs running either DOS/Linux/Window/X