— jayk wrote:
> > Subject: Booting from virtual device…
> > From: Manoj Paul Joseph
> > Date: Sat, 25 Oct 2003 14:34:49 +0100 (BST)
> >
> > Hi,
> >
> > This is the scenario. I have an image of a WinNT
> > installaion. I want to boot from it - boot from a
> > virtual device.
> >
> > I write the boot code and a ‘driver’ that creates
> > this virtual hard-disk for the os to boot from.
> >
> > Now is this possible? I am not very sure if it is.
> > Is it possible to have a ‘driver’ like this that
> > can work with Windows NT/XP/2K??
> >
> > Could you guys tell me what you think about it?
> > Any ideas at all would be welcome.
> >
> > Thanks in advance!
> >
> > Regards,
> > Manoj
>
> Surely you can do this by:
> still have c:\boot.ini and c:\ntldr on a regular
> fat or ntfs volume,
> but like d:\Windows in your image
> have your virtual disk driver be a scsi miniport
> driver, copy it to
> c:\ntbootdd.sys, making the appropriate scsi entry
> in boot.ini
> merging your virtual image into the driver
>
> - Jay
Hi,
I have some queries regarding this scsi miniport
driver.
1. Since it (ntbootdd.sys) is loaded very early in the
boot-up process, could I still debug it using WinDbg?
2. Would it be regular miniport driver? Any gotchas?
3. To read from a IDE hard disk (for the virtual drive
image), could I call the IDE driver? Or would I have
to resort to using the BIOS or resort to programming
the IDE controller?
Thanks!
Manoj
PS: Cross posting to ntdev and ntfsd and ntfsd
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online.
Go to http://yahoo.shaadi.com
Hi,
– jayk wrote:
> > Subject: Booting from virtual device…
> > From: Manoj Paul Joseph
> > Date: Sat, 25 Oct 2003 14:34:49 +0100 (BST)
> >
> > Hi,
> >
> > This is the scenario. I have an image of a WinNT
> > installaion. I want to boot from it - boot from a
> > virtual device.
> >
> > I write the boot code and a ‘driver’ that creates
> > this virtual hard-disk for the os to boot from.
> >
> > Now is this possible? I am not very sure if it is.
> > Is it possible to have a ‘driver’ like this that
> > can work with Windows NT/XP/2K??
> >
> > Could you guys tell me what you think about it?
> > Any ideas at all would be welcome.
> >
> > Thanks in advance!
> >
> > Regards,
> > Manoj
>
> Surely you can do this by:
> still have c:\boot.ini and c:\ntldr on a regular
> fat or ntfs volume,
> but like d:\Windows in your image
> have your virtual disk driver be a scsi miniport
> driver, copy it to
> c:\ntbootdd.sys, making the appropriate scsi entry
> in boot.ini
> merging your virtual image into the driver
>
> - Jay
Hi,
I have some queries regarding this scsi miniport
driver.
1. Since it (ntbootdd.sys) is loaded very early in the
boot-up process, could I still debug it using WinDbg?
2. Would it be regular miniport driver? Any gotchas?
3. To read from a IDE hard disk (for the virtual drive
image), could I call the IDE driver? Or would I have
to resort to using the BIOS or resort to programming
the IDE controller?
Thanks!
Manoj
PS: Cross posting to ntdev and ntfsd
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online.
Go to http://yahoo.shaadi.com
You will most certainly have problems with the swap file, registry, etc
if the image is read only.
Manoj Paul Joseph wrote:
Hi,
– jayk wrote:
>
>
>>>Subject: Booting from virtual device…
>>>From: Manoj Paul Joseph
>>>
>>>
>
>
>
>>>Date: Sat, 25 Oct 2003 14:34:49 +0100 (BST)
>>>
>>>Hi,
>>>
>>>This is the scenario. I have an image of a WinNT
>>>installaion. I want to boot from it - boot from a
>>>virtual device.
>>>
>>>I write the boot code and a ‘driver’ that creates
>>>this virtual hard-disk for the os to boot from.
>>>
>>>Now is this possible? I am not very sure if it is.
>>>Is it possible to have a ‘driver’ like this that
>>>can work with Windows NT/XP/2K??
>>>
>>>Could you guys tell me what you think about it?
>>>Any ideas at all would be welcome.
>>>
>>>Thanks in advance!
>>>
>>>Regards,
>>>Manoj
>>>
>>>
>>Surely you can do this by:
>> still have c:\boot.ini and c:\ntldr on a regular
>>fat or ntfs volume,
>>but like d:\Windows in your image
>> have your virtual disk driver be a scsi miniport
>>driver, copy it to
>>c:\ntbootdd.sys, making the appropriate scsi entry
>>in boot.ini
>> merging your virtual image into the driver
>>
>> - Jay
>>
>>
>
>Hi,
>
>I have some queries regarding this scsi miniport
>driver.
>
>1. Since it (ntbootdd.sys) is loaded very early in the
>boot-up process, could I still debug it using WinDbg?
>
>2. Would it be regular miniport driver? Any gotchas?
>
>3. To read from a IDE hard disk (for the virtual drive
> image), could I call the IDE driver? Or would I have
>to resort to using the BIOS or resort to programming
>the IDE controller?
>
>Thanks!
>Manoj
>PS: Cross posting to ntdev and ntfsd
>
> ________________________________________________________________________
>Yahoo! India Matrimony: Find your partner online.
>Go to http://yahoo.shaadi.com
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@bitdefender.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
— Andrei Zlate-Podani
wrote:
> You will most certainly have problems with the swap
> file, registry, etc
> if the image is read only.
Yes.
But I guess I can handle that by accepting writes but
not putting the changes back into the image.
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online.
Go to http://yahoo.shaadi.com
On Thu, 30 Oct 2003 10:35:20 +0000 (GMT), Manoj Paul Joseph
wrote:
>
>Hi,
>
>I have some queries regarding this scsi miniport
>driver.
>
>1. Since it (ntbootdd.sys) is loaded very early in the
>boot-up process, could I still debug it using WinDbg?
No. The OS kernel, debuggers and all boot drivers will all be loaded
via your ntbootdd.sys driver.
The bootstrap code in the disk boot record loads NtLoader via the
ROMBIOS. NtLoader has a built in driver that can switch between real
and protect mode to access the hard drive using the ROMBIOS. NtLoader
uses this built in driver to load the OS kernel which in turn uses the
NtLoader driver to load all of the device drivers marked for boot
load.
When ntboodd.sys is present NtLoader will load it into memory using
the built in driver and then disable the built in driver and access
the boot device using ntbootdd.sys. After ntboodd.sys is loaded
NtLoader will load the OS kernel from the virtual image by talking to
ntbootdd.sys. The kernel will also talk to ntbootdd.sys to load all
boot drivers from the virtual image.
>2. Would it be regular miniport driver? Any gotchas?
Yes a regular miniport should work. There shouldn’t be any problems if
your miniport driver does not attempt to use anything other than the
SCSIPORT interfaces.
>3. To read from a IDE hard disk (for the virtual drive
> image), could I call the IDE driver? Or would I have
>to resort to using the BIOS or resort to programming
>the IDE controller?
You can’t call the IDE driver because your ntbootdd.sys driver will be
used to load the IDE driver. You will also have a problem using the
BIOS because ntbootdd.sys will be running in protect mode and the
ROMBIOS will not be accessible.
>Thanks!
>Manoj
>PS: Cross posting to ntdev and ntfsd
>
> ________________________________________________________________________
>Yahoo! India Matrimony: Find your partner online.
>Go to http://yahoo.shaadi.com
>
— John Hensley wrote:
> You can’t call the IDE driver because your
> ntbootdd.sys driver will be
> used to load the IDE driver. You will also have a
> problem using the
> BIOS because ntbootdd.sys will be running in protect
> mode and the
> ROMBIOS will not be accessible.
Hi John,
Thanks a lot for the information.
So any idea what the way out is??
Regards,
Manoj
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online.
Go to http://yahoo.shaadi.com
I hadn’t jumped into this before, but if you really want to do this you
could look at the idea of loading a RAM image of a “disk controller bios”
into the system to access your drive. The BIOS specifications provide
support for a third party BIOS to be called, and by limiting this to the
addresses where BIOS is normally mapped (avoiding the pieces used by the
real BIOS) you can have your code. Of course this is grungy BIOS code, but
it does work, I was on a project where all disks were virtual, and we had
the BIOS team do this trick with to load a “disk controller bios”.
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Or on a similar note, you could have a replacement MBR that installs
a real mode INT 13 disk hook which would intercept all requests
to, say, drive 0x81 and redirect it to the virtual image. The boot.ini
would then need to reference the second (virtual) drive. That would be
enough to get the drivers loaded and after the switch to protected
mode, a normal disk driver could take over.
The INT 13 could probably be placed anywhere in the low 640K of memory,
but the normal thing to do is “steal” memory from the BIOS by looking
at address 0x0000:0x0413 for the WORD number of K available, putting
the hook at the top and decrement it by the amount used.
Shaun
Thursday, October 30, 2003, 12:59:17 PM, you wrote:
DB> I hadn’t jumped into this before, but if you really want to do this you
DB> could look at the idea of loading a RAM image of a “disk controller bios”
DB> into the system to access your drive. The BIOS specifications provide
DB> support for a third party BIOS to be called, and by limiting this to the
DB> addresses where BIOS is normally mapped (avoiding the pieces used by the
DB> real BIOS) you can have your code. Of course this is grungy BIOS code, but
DB> it does work, I was on a project where all disks were virtual, and we had
DB> the BIOS team do this trick with to load a “disk controller bios”.
DB> Don Burn (MVP, Windows DDK)
DB> Windows 2k/XP/2k3 Filesystem and Driver Consulting
DB> —
DB> Questions? First check the Kernel Driver FAQ at
DB> http://www.osronline.com/article.cfm?id=256
DB> You are currently subscribed to ntdev as: xxxxx@sdlabs.net
DB> To unsubscribe send a blank email to
DB> xxxxx@lists.osr.com
> -----Original Message-----
From: Manoj Paul Joseph [mailto:xxxxx@yahoo.com]
Sent: Thursday, October 30, 2003 6:57 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Booting from virtual device…— Andrei Zlate-Podani
> wrote:
> > You will most certainly have problems with the swap file, registry,
> > etc if the image is read only.
> Yes.
> But I guess I can handle that by accepting writes but not
> putting the changes back into the image.
>
You could do that but your system would be operating outside of its
specified behavior, and any program that depended on, for example, the value
of a data object, would be problematic.
=====================
Mark Roddy
> ____________________________________________________
>
> Yahoo! India Matrimony: Find your partner online.
> Go to http://yahoo.shaadi.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@stratus.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
And what FSD will be reading the image file?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Shaun
Sent: Thursday, October 30, 2003 5:29 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Booting from virtual device…
Or on a similar note, you could have a replacement MBR that installs
a real mode INT 13 disk hook which would intercept all requests
to, say, drive 0x81 and redirect it to the virtual image. The boot.ini
would then need to reference the second (virtual) drive. That would be
enough to get the drivers loaded and after the switch to protected
mode, a normal disk driver could take over.
The INT 13 could probably be placed anywhere in the low 640K of memory,
but the normal thing to do is “steal” memory from the BIOS by looking
at address 0x0000:0x0413 for the WORD number of K available, putting
the hook at the top and decrement it by the amount used.
Shaun
Thursday, October 30, 2003, 12:59:17 PM, you wrote:
DB> I hadn’t jumped into this before, but if you really want to do this
you
DB> could look at the idea of loading a RAM image of a “disk controller
bios”
DB> into the system to access your drive. The BIOS specifications
provide
DB> support for a third party BIOS to be called, and by limiting this to
the
DB> addresses where BIOS is normally mapped (avoiding the pieces used by
the
DB> real BIOS) you can have your code. Of course this is grungy BIOS
code, but
DB> it does work, I was on a project where all disks were virtual, and
we had
DB> the BIOS team do this trick with to load a “disk controller bios”.
DB> Don Burn (MVP, Windows DDK)
DB> Windows 2k/XP/2k3 Filesystem and Driver Consulting
DB> —
DB> Questions? First check the Kernel Driver FAQ at
DB> http://www.osronline.com/article.cfm?id=256
DB> You are currently subscribed to ntdev as: xxxxx@sdlabs.net
DB> To unsubscribe send a blank email to
DB> xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
I don’t know the details of where the image is stored, but
if the image was in it’s own partition, you wouldn’t need an
FSD (the question then of course is why would you bother?).
If it was hosted on another file system, I suppose you could
build your own code into your driver that understands that host
file system. Alternatively you could find the sector locations
of the image’s host file during it’s creation and build a sector map
of the image file for the driver to use.
Shaun
Thursday, October 30, 2003, 6:49:14 PM, you wrote:
JK> And what FSD will be reading the image file?
JK> -----Original Message-----
JK> From: xxxxx@lists.osr.com
JK> [mailto:xxxxx@lists.osr.com] On Behalf Of Shaun
JK> Sent: Thursday, October 30, 2003 5:29 AM
JK> To: Windows System Software Devs Interest List
JK> Subject: [ntdev] Re: Booting from virtual device…
JK> Or on a similar note, you could have a replacement MBR that installs
JK> a real mode INT 13 disk hook which would intercept all requests
JK> to, say, drive 0x81 and redirect it to the virtual image. The boot.ini
JK> would then need to reference the second (virtual) drive. That would be
JK> enough to get the drivers loaded and after the switch to protected
JK> mode, a normal disk driver could take over.
JK> The INT 13 could probably be placed anywhere in the low 640K of memory,
JK> but the normal thing to do is “steal” memory from the BIOS by looking
JK> at address 0x0000:0x0413 for the WORD number of K available, putting
JK> the hook at the top and decrement it by the amount used.
JK> Shaun
JK> Thursday, October 30, 2003, 12:59:17 PM, you wrote:
DB>> I hadn’t jumped into this before, but if you really want to do this
JK> you
DB>> could look at the idea of loading a RAM image of a “disk controller
JK> bios”
DB>> into the system to access your drive. The BIOS specifications
JK> provide
DB>> support for a third party BIOS to be called, and by limiting this to
JK> the
DB>> addresses where BIOS is normally mapped (avoiding the pieces used by
JK> the
DB>> real BIOS) you can have your code. Of course this is grungy BIOS
JK> code, but
DB>> it does work, I was on a project where all disks were virtual, and
JK> we had
DB>> the BIOS team do this trick with to load a “disk controller bios”.
DB>> Don Burn (MVP, Windows DDK)
DB>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
DB>> —
DB>> Questions? First check the Kernel Driver FAQ at
DB>> http://www.osronline.com/article.cfm?id=256
DB>> You are currently subscribed to ntdev as: xxxxx@sdlabs.net
DB>> To unsubscribe send a blank email to
DB>> xxxxx@lists.osr.com
JK> —
JK> Questions? First check the Kernel Driver FAQ at
JK> http://www.osronline.com/article.cfm?id=256
JK> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
JK> To unsubscribe send a blank email to
JK> xxxxx@lists.osr.com
JK> —
JK> Questions? First check the Kernel Driver FAQ at
JK> http://www.osronline.com/article.cfm?id=256
JK> You are currently subscribed to ntdev as: xxxxx@sdlabs.net
JK> To unsubscribe send a blank email to
JK> xxxxx@lists.osr.com
> 1. Since it (ntbootdd.sys) is loaded very early in the
boot-up process, could I still debug it using WinDbg?
- Would it be regular miniport driver? Any gotchas?
A copy of your SCSI miniport, nothing more.
- To read from a IDE hard disk (for the virtual drive
image), could I call the IDE driver?
Try NT4’s ATAPI.SYS, and rename it NtBootDd.sys. Works on NT4.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com