Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Win API / March 2008



Tip: Looking for answers? Try searching our database.

Reboot win2k into dos on ramdisk?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mike - 27 Feb 2008 03:11 GMT
I have an application that won't run in a dos box under win2k.
The HD is the only bootable device.
I'd like to have win2k reboot into dos mode and run it
from a ramdisk.
Ghost and other disk imaging programs do this.
Ghost even gives the option to add files to the ramdisk
before the reboot.  But it's cumbersome and there are licensing issues
if I want to do this on multiple machines.

Is there a tutorial on how to accomplish creating and rebooting to
a ramdisk file system?

Dual-boot would work for this task, but I have other ideas
that would require the ramdisk boot solution.
Thanks, mike
Signature

Return address is VALID!

MikeD - 27 Feb 2008 13:00 GMT
>I have an application that won't run in a dos box under win2k.
> The HD is the only bootable device.
[quoted text clipped - 11 lines]
> that would require the ramdisk boot solution.
> Thanks, mike

What does this have to do with VB?
mike - 27 Feb 2008 14:57 GMT
>> I have an application that won't run in a dos box under win2k.
>> The HD is the only bootable device.
[quoted text clipped - 13 lines]
>
> What does this have to do with VB?

If I can't program it in VB, it ain't gonna get done.

Signature

Return address is VALID!

Dave O. - 27 Feb 2008 16:04 GMT
-boot would work for this task, but I have other ideas
>>> that would require the ramdisk boot solution.
>>> Thanks, mike
>>
>> What does this have to do with VB?
>>
> If I can't program it in VB, it ain't gonna get done.

In which case it ain't gonna happen. At least not the way you are
suggesting.

Unless you tell us what the DOS application is doing. It might be easier to
re-write the DOS app for win32 or somebody might know of a loadable
environment which supports the DOS app.

Regards
Dave O.
Karl E. Peterson - 27 Feb 2008 21:26 GMT
>I have an application that won't run in a dos box under win2k.

http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx

Actually, there's better DOS support in VPC2004...

http://www.microsoft.com/downloads/details.aspx?FamilyId=6D58729D-DFA8-40BF-AFAF
-20BCB7F01CD1&displaylang=en


Best group for followup: microsoft.public.virtualpc
Signature

.NET: It's About Trust!
http://vfred.mvps.org

mike - 28 Feb 2008 01:06 GMT
>> I have an application that won't run in a dos box under win2k.
>
[quoted text clipped - 5 lines]
>
> Best group for followup: microsoft.public.virtualpc
Thanks, but VPC is worse than a dosbox.
It doesn't support the hardware at all.  You only get what it emulates,
one step removed.
The reason I can't use a dosbox is cause I want to directly bit-bang the
hardware without restriction.

I really don't want to discuss alternative ways to access the hardware
while running win2k.  What I want is to reboot to a ramdisk in dos.

I was hoping I could create a ramdisk, populate it and reboot.  But
there's likely a bunch of "housekeeping" that needs to happen.

Can I do anything in the runonce registry key? I suspect windows is too
far along by then, but not sure???

Can you suggest a better newsgroup than winapi to ask this question?
Or even a relevant search term?
Google has gotten me nowhere.
Thanks, mike

Signature

Return address is VALID!

MikeD - 28 Feb 2008 02:05 GMT
> I was hoping I could create a ramdisk, populate it and reboot.  But
> there's likely a bunch of "housekeeping" that needs to happen.

No housekeeping in the world is going to accomplish that. Go ahead and
create the Ramdisk.  As soon as you reboot, it's gone.

> Can I do anything in the runonce registry key? I suspect windows is too
> far along by then, but not sure???
>
> Can you suggest a better newsgroup than winapi to ask this question?
> Or even a relevant search term?

I really don't see this as being a programming issue at all (regardless of
what programming language you use).  You just gotta configure the system(s)
to do what you need, if you even can.

Signature

Mike
Microsoft MVP Visual Basic

Karl E. Peterson - 28 Feb 2008 02:12 GMT
>>> I have an application that won't run in a dos box under win2k.
>>
[quoted text clipped - 8 lines]
> Thanks, but VPC is worse than a dosbox.
> It doesn't support the hardware at all.

Ah, shoulda known.  Hardware dependency.  Yep, that's a non-starter then.

> The reason I can't use a dosbox is cause I want to directly bit-bang the
> hardware without restriction.

We keep an old box that dual-boots between DOS 6.22 and Win95 here, for that sort of
thing.  Win95 is there just so it can connect to the network and transfer files
around, then it's rebooted to DOS for the real work.

> I really don't want to discuss alternative ways to access the hardware
> while running win2k.  What I want is to reboot to a ramdisk in dos.

Why a ramdisk, specifically?

> I was hoping I could create a ramdisk, populate it and reboot.  But
> there's likely a bunch of "housekeeping" that needs to happen.

You might find something useful, here: http://www.bootdisk.org (and/or bootdisk.com)

The ones with "universal cdrom drivers" usually also setup ramdisks.

> Can I do anything in the runonce registry key? I suspect windows is too
> far along by then, but not sure???

Yep, after it goes graphical, DOS is out of the picture.

> Can you suggest a better newsgroup than winapi to ask this question?
> Or even a relevant search term?
> Google has gotten me nowhere.

Try that link above.  I'd also be using "dual-boot" in your searches.  Example:

http://www.google.com/search?q=dual+boot+windows+2000+dos
Signature

.NET: It's About Trust!
http://vfred.mvps.org

Scott Seligman - 28 Feb 2008 01:59 GMT
>I have an application that won't run in a dos box under win2k. The HD
>is the only bootable device. I'd like to have win2k reboot into dos
>mode and run it from a ramdisk. Ghost and other disk imaging programs
>do this.

They do? I haven't seen such a feature. I've seen mention of it for the
Mac side, but I didn't know something like that was possible in Windows.
It makes sense on the Mac side since there's built in support for this
sort of functionality.

>Ghost even gives the option to add files to the ramdisk before the
>reboot. But it's cumbersome and there are licensing issues if I want to
>do this on multiple machines.

Unless I'm missing some big piece of this puzzle, to do something like
this, you're going to need to alloc physical RAM, and somehow either
instruct the BIOS to boot off of it, or do some fiddling with the boot
loader to load a ram driver and launch your RAM drive wherever it's been
loaded into memory.

In other words, not something for the faint of heart, and not something
I think you'll find sample code to do, much less code in VB to do.

If I had to do this, I'd look into using something like GRUB to do the
booting for me, and see if there's any way I could point GRUB to use a
configuration file on a FAT drive that can be easily changed as needed
by either the DOS or Win2K side of things.

Signature

--------- Scott Seligman <scott at <firstname> and michelle dot net> ---------
  The American Republic will endure, until politicians realize they can
  bribe the people with their own money.
  -- Alexis de Tocqueville

Ken Halter - 02 Mar 2008 05:25 GMT
>I have an application that won't run in a dos box under win2k.

What does this app do that's not possible while running Windows? Win2k
is/was a great OS.

Is this some kind of "in house" app? You'd be surprised at what you can do
in VB/Windows. You're gonna have to spill it here... you have me wondering
what can't be done in VB/Windows...

If a console app is your only solution, gotta ask, why VB?

> If I can't program it in VB, it ain't gonna get done.

But.... why? <g> There are DOS versions of basic still floating around.
There are also many languages that have shareware/freeware/open source
compilers that'll probably run from DOS...

Signature

Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm

mike - 05 Mar 2008 02:03 GMT
>> I have an application that won't run in a dos box under win2k.
>
[quoted text clipped - 12 lines]
> There are also many languages that have shareware/freeware/open source
> compilers that'll probably run from DOS...

This all started when I was trying to do an OS install on a legacy free
laptop that wouldn't boot from anything but the internal hard drive.
I could load the drive on a different system, but couldn't, at the time,
figger out how to install the os onto the drive it booted from.

So, I'm not interested in how wonderful win2k is or how to run stuff
from win2k.

I'm interested in learning how the drive imaging programs reboot
to an OS on a ramdisk.  It happens every day, but the process
is either secret or immune to my google search terms.

mike

Signature

Return address is VALID!

Larry Serflaten - 05 Mar 2008 04:07 GMT
> I'm interested in learning how the drive imaging programs reboot
> to an OS on a ramdisk.  It happens every day, but the process
> is either secret or immune to my google search terms.

It sounds to me more like a BIOS setting than any sort of
programming endevor....

LFS
Scott Seligman - 05 Mar 2008 04:16 GMT
>This all started when I was trying to do an OS install on a legacy free
>laptop that wouldn't boot from anything but the internal hard drive.
[quoted text clipped - 7 lines]
>to an OS on a ramdisk.  It happens every day, but the process
>is either secret or immune to my google search terms.

Since when do they do this?  Last time I used Norton Ghost, it
certainly didn't, and a quick perusal of the recent manual didn't
mention this feature.

Signature

--------- Scott Seligman <scott at <firstname> and michelle dot net> ---------
  Never do today what you can put off till tomorrow. Delay may give
  clearer light as to what is best to be done.
  -- Aaron Burr

mike - 05 Mar 2008 05:10 GMT
>> This all started when I was trying to do an OS install on a legacy free
>> laptop that wouldn't boot from anything but the internal hard drive.
[quoted text clipped - 10 lines]
> certainly didn't, and a quick perusal of the recent manual didn't
> mention this feature.

I don't understand why you guys are so resistant to this concept.
Two seconds of googling found the following quote:

When you start the cloning operation from within Windows, Ghost
automatically restarts your computer into a DOS environment, performs
the cloning operation, and then restarts the computer into Windows.
Ghost uses a Ghost Virtual Partition to create the DOS environment. The
Ghost Virtual Partition is a file stored on the hard disk. When Ghost
restarts the computer, the computer uses the information from that file
to load DOS and other required files, and to run Ghost.exe.

end quote.

Perhaps the confusion stems from my use of the word "ramdisk".
It's entirely possible that Ghost does not, in fact, create a ramdisk,
but just creates a file system inside a file that is used to load and
execute Ghost and its supporting programs out of ram, without further
need for a hard drive.  If one added a DOS program to create an actual
ramdisk and populate it with content from the hard drive,
my purpose would be served.  That should be trivial.  The hard part is
figuring out how to construct the virtual partition and get the boot
loader pointed at it.

No matter what terms you use to describe it, Ghost reboots into
dos mode and has everything it needs so it can release the hard drive.

LINUX can also be installed to and booted from  a virtual partition
constructed
in a file on a windows hard drive.  The technique is widely used,
I just have not stumbled on the correct search terms to find the info
in the zillion hits of noise that is the internet.

Signature

Return address is VALID!

Scott Seligman - 05 Mar 2008 06:10 GMT
>>> This all started when I was trying to do an OS install on a legacy free
>>> laptop that wouldn't boot from anything but the internal hard drive.
[quoted text clipped - 12 lines]
>
>I don't understand why you guys are so resistant to this concept.

Because you asked how to do the impossible.

>my purpose would be served.  That should be trivial.  The hard part is
>figuring out how to construct the virtual partition and get the boot
>loader pointed at it.

Hard part is an understatement.  As I suggested, you should look into
GRUB, as I understand it, it should do most, if not everything, of
what you want.

If you insist on doing all of this in VB, you'll need to learn how
to possibly modify existing partitions, possibly defragment existing
partitions, modify the master boot record, and not least of all, create
code that can run outside of Windows or DOS. Good luck with that.

If you insist on doing all of this in VB, you should first worry about
writing an assembler in VB to create the boot loader you'll need, since that
clearly can't be pure VB.

>No matter what terms you use to describe it, Ghost reboots into
>dos mode and has everything it needs so it can release the hard drive.
[quoted text clipped - 4 lines]
>I just have not stumbled on the correct search terms to find the info
>in the zillion hits of noise that is the internet.

Signature

--------- Scott Seligman <scott at <firstname> and michelle dot net> ---------
  We all agree on the necessity of compromise. We just can't agree on
  when it's necessary to compromise.
  -- Larry Wall

Stefan Berglund - 05 Mar 2008 04:26 GMT
in <hcnzj.14385$ES.10055@trnddc05>

>This all started when I was trying to do an OS install on a legacy free
>laptop that wouldn't boot from anything but the internal hard drive.
[quoted text clipped - 9 lines]
>
>mike

I used to use Powerquest for drive imaging and it used 2 floppies.  The
boot floppy loaded Caldera DOS and the second floppy ran the imaging
software.  It was great because the first floppy also loaded TCP
networking that allowed saving an image across the network.

They came out with a version that ran in Windows (you could restore
files from the image) but you still had to boot to DOS to image a drive.

Unfortunately, they were swallowed by Symantec and the product is now a
.NET piece 'o crap.

---
Stefan Berglund
Ken Halter - 05 Mar 2008 17:21 GMT
> This all started when I was trying to do an OS install on a legacy free
> laptop that wouldn't boot from anything but the internal hard drive.
> I could load the drive on a different system, but couldn't, at the time,
> figger out how to install the os onto the drive it booted from.

Sounds to me like you've already spent **far** too much time trying to get
this, supposedly "Free" laptop to do what you want. Therefore, it's best to
turn than thing into landfill and buy a *real* laptop.

> So, I'm not interested in how wonderful win2k is or how to run stuff from
> win2k.

Obviously, it's far more capable than that laptop you keep trying to
resurrect... since there seems to be no one to hand you the "magic bullet",
how about a 9mm round right through the screen/keyboard of that "Free"
laptop <g>... I imagine this is the same beast you wanted a way to flip all
windows upside down in, eh?

> I'm interested in learning how the drive imaging programs reboot
> to an OS on a ramdisk.  It happens every day, but the process
> is either secret or immune to my google search terms.

One thing I guarantee... it's not done in VB. VB requires runtime files. VB
can-not run from DOS. There are DOS versions of VB. Buy a new laptop.

Signature

Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm

mike - 05 Mar 2008 23:50 GMT
>> This all started when I was trying to do an OS install on a legacy free
>> laptop that wouldn't boot from anything but the internal hard drive.
[quoted text clipped - 20 lines]
> One thing I guarantee... it's not done in VB. VB requires runtime files. VB
> can-not run from DOS. There are DOS versions of VB. Buy a new laptop.

I HAVE a new laptop.

What I want is a way to boot into dos on a random computer who's OS
can't reboot into native dos...and do it without having to install a
bunch of additional crap.

And I'll spend exactly as much time as I like on the subject.

If you're worried about how much time YOU spend on the project, that can
be easily resolved with YOUR delete key.

You have succeeded in convincing me that if I want ANYTHING off the well
beaten path, I'm not gonna find it here.

Bye for now...but I'll be back next time I have a SIMPLE question.

Press that delete key now, before you get the urge to give me more
"guarantees".

mike

Signature

Return address is VALID!

Thorsten Albers - 06 Mar 2008 00:23 GMT
mike <spamme9@gmail.com> schrieb im Beitrag
<ZkGzj.12762$v47.12480@trnddc08>...
> What I want is a way to boot into dos on a random computer who's OS
> can't reboot into native dos...and do it without having to install a
> bunch of additional crap.
> ...
> You have succeeded in convincing me that if I want ANYTHING off the well
> beaten path, I'm not gonna find it here.

You were given all information a newsgroup called "vb.winapi" is able to
give you:

a) This can't be done with VB since VB isn't a language for low-level
hardware programming - and that is exactly what you needed. And all
applications coded with VB depend on Windwos running.

b) This can't be done with Windows API programming since the Windows API of
course is availabe only as long as Windows is running. The only part of
what you want to do and which can be done with the Windows API is the
reboot.

I don't understand why you don't simply partition the hard disc drive of
your notebook: A partition which shall be bootable with DOS has to be
- a >primary partition< (on a hard disc drive you can have 4 primary
partitions max. or 3 primary and one extended partition)
- on the >1st hard disk drive<
- within the first 1024 cylinders

Then install MS-DOS 6.22, MS Windows 3.x, MS Windows 95, or MS Windows 98
(SE) to this partition. All these Windows versions are DOS based. If none
of these is available to you then get FREEDOS which is for free.
AFAIK the Windows NT 4.0/2K/XP boot manager is able to boot such
partitions. If not you also need a boot manager. A good one is XOSL which
AFAIK is also for free. You can also use GRUB or LILO for this (since these
are not for Linux only).

Of course this isn't a solution which will work on any random computer. But
there isn't a solution which will run on any computer unless you are using
a boot device other than the hard disc drive (its e.g. no problem with a
CD-ROM or a floppy disc drive). Booting from a RAM disc needs manipulation
of the boot sector of the hard disc drive, and this presumably isn't an
option for any random computer...

Signature

----------------------------------------------------------------------
THORSTEN ALBERS                       Universität Freiburg
                                               albers@
                                                      uni-freiburg.de
----------------------------------------------------------------------

Ken Halter - 06 Mar 2008 18:15 GMT
> I don't understand why you don't simply partition the hard disc drive of
> your notebook: A partition which shall be bootable with DOS has to be

Cuz.. if he can't do it his way, he'll gather up his toys and go play
somewhere else. He didn't come here to listen to advice, he came here for
someone to hold his hand while he mangled his computer.

Signature

Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm

Ken Halter - 06 Mar 2008 18:22 GMT
>> One thing I guarantee... it's not done in VB. VB requires runtime files.
>> VB can-not run from DOS. There are DOS versions of VB. Buy a new laptop.
[quoted text clipped - 6 lines]
>
> And I'll spend exactly as much time as I like on the subject.

Go ahead... no one here's stopping you.. but, I'll say again...

>> One thing I guarantee... it's not done in VB. VB requires runtime files.

> If you're worried about how much time YOU spend on the project, that can
> be easily resolved with YOUR delete key.

Already taken care of... but, thanks for pointing out the obvious.

> You have succeeded in convincing me that if I want ANYTHING off the well
> beaten path, I'm not gonna find it here.
>
> Bye for now...but I'll be back next time I have a SIMPLE question.

Back for more hand-holding? You can usually find the power button on the
front of the PC somewhere. That thing you slide around the table... that's a
mouse.

> Press that delete key now, before you get the urge to give me more
> "guarantees".

Bye little boy... don't let the door hit cha where the good lord split cha.

Here's another guarantee... You *ARE NOT* going to be able to do it in VB,
so find the group that supports "Wizard of Oz" programming and one that
won't mind the "I don't have to if I don't want to" attitude you're oozing.

Signature

Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.