lkml.org 
[lkml]   [1998]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Exit from linux Kernel back to dos.
On Thu, 17 Dec 1998, Kenny Thomas wrote:

> I am working on a project where I would like to be able to load up a
> minimum linux kernel with a small ramdisk similer to what is used for
> install puposes. But I need to be able to shutdown linux and return
> back to dos without rebooting. Is this possible, practical or remotely
> doable?
> Kenny Thomas
> ADMINKT@flint.umich.edu
>

``BACK to DOS?'' Unless you use ``jboot'', a DOS program I wrote several
years ago, you do not start at DOS, so regardless of what you do, you
can't get ``back''. Jboot only works with zImage, not bzImage, so you
are limited here.

Further, in MS-DOS, if you have a memory manager installed, it will
prevent you from entering protected mode (you are really in Virtual
86 mode and the memory manager is in protected mode), unless you
play some tricks which really mess up the MS-DOS environment so,
even if you ``got back'' the system would not work properly.

That said, it IS possible to get back from protected mode to real-mode.
You can even restore the whole 16-bit environment (IDTs, GDTs, etc),
if you saved them somewhere. The problem is that Linux may have used
your secret memory location(s) for something else, and the state of
the hardware in undefined. To reinitialize the hardware, you've got
to either let the BIOS do it (cold boot), or do it all yourself from
some launch/restore program.

If you are interested, I can send you some code that starts at
MS-DOS, hoists itself into 32-bit protected mode, executes some 32-bit
benchmark code, then returns to 16-bit mode (and MS-DOS) without
hurting anything. Contact me off-the-list.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.1.131 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.123 / U:0.016 seconds]
©2003-2011 Jasper Spaans. Advertise on this site