how can we get system drive in filter driver

Hi all,

I have filter driver layered over NTFS. But before attaching to the
undelying NTFS drives in my filter’s driverentry(), I would like
to know whether the underlying drive is the OS drive(C:\ for eg.), and act
accordingly.

Does any one how can I find out whether the drive is OS drive from the
filters driverentry?

Thanks
vishnu.

Well, when you attach you will be attaching to the specific volume. One question might be whether you need to be attached at boot time or if later is ok. Also, are you talking about the boot drive or the system drive, these can be different. The boot volume is the volume that contains the NTLOADER, the system driver is where the operating system files are located (at least that is one way of looking at this terminology).

-----Original Message-----
From: vishnu [mailto:xxxxx@lycos.com]
Sent: Thursday, October 17, 2002 8:53 AM
To: File Systems Developers
Subject: [ntfsd] how can we get system drive in filter driver

Hi all,

I have filter driver layered over NTFS. But before attaching to the
undelying NTFS drives in my filter’s driverentry(), I would like
to know whether the underlying drive is the OS drive(C:\ for eg.), and act
accordingly.

Does any one how can I find out whether the drive is OS drive from the
filters driverentry?

Thanks
vishnu.


You are currently subscribed to ntfsd as: xxxxx@inflectionsystems.com
To unsubscribe send a blank email to %%email.unsub%%

Hi,

I am concerned with the system volume and not with the boot volume.

Also, I want to attach to the volumes in my driverentry() itself. ( My
driver has a Start value of 2.)

Thanks
vishnu.

Well, when you attach you will be attaching to the specific volume. One =
question might be whether you need to be attached at boot time or if =
later is ok. Also, are you talking about the boot drive or the system =
drive, these can be different. The boot volume is the volume that =
contains the NTLOADER, the system driver is where the operating system =
files are located (at least that is one way of looking at this =
terminology).

-----Original Message-----
From: vishnu [mailto:xxxxx@lycos.com]
Sent: Thursday, October 17, 2002 8:53 AM
To: File Systems Developers
Subject: [ntfsd] how can we get system drive in filter driver

Hi all,

I have filter driver layered over NTFS. But before attaching to the
undelying NTFS drives in my filter’s driverentry(), I would like
to know whether the underlying drive is the OS drive(C:\ for eg.), and =
act
accordingly.

Does any one how can I find out whether the drive is OS drive from the
filters driverentry?

Thanks
vishnu.


You are currently subscribed to ntfsd as: xxxxx@inflectionsystems.com
To unsubscribe send a blank email to %%email.unsub%%

DO_SYSTEM_BOOT_PARTITION flag on the disk block device object gives
you this information.

Max

----- Original Message -----
From: “vishnu”
To: “File Systems Developers”
Sent: Thursday, October 17, 2002 4:52 PM
Subject: [ntfsd] how can we get system drive in filter driver

> Hi all,
>
> I have filter driver layered over NTFS. But before attaching to the
> undelying NTFS drives in my filter’s driverentry(), I would like
> to know whether the underlying drive is the OS drive(C:\ for eg.),
and act
> accordingly.
>
> Does any one how can I find out whether the drive is OS drive from
the
> filters driverentry?
>
> Thanks
> vishnu.
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>

One simple solution may be simply to read the registry. The system root is contained in HKEY_LOCAL_MACHINE/Software/Microsoft/Windows NT/CurrentVersion in the value SystemRoot. You can also get build numbers etc. from there. I don’t know of a kernel mode system call you can make during driver entry to get the system volume.

-----Original Message-----
From: vishnu [mailto:xxxxx@lycos.com]
Sent: Thursday, October 17, 2002 9:46 AM
To: File Systems Developers
Subject: [ntfsd] RE: how can we get system drive in filter driver

Hi,

I am concerned with the system volume and not with the boot volume.

Also, I want to attach to the volumes in my driverentry() itself. ( My
driver has a Start value of 2.)

Thanks
vishnu.

Well, when you attach you will be attaching to the specific volume. One =
question might be whether you need to be attached at boot time or if =
later is ok. Also, are you talking about the boot drive or the system =
drive, these can be different. The boot volume is the volume that =
contains the NTLOADER, the system driver is where the operating system =
files are located (at least that is one way of looking at this =
terminology).

-----Original Message-----
From: vishnu [mailto:xxxxx@lycos.com]
Sent: Thursday, October 17, 2002 8:53 AM
To: File Systems Developers
Subject: [ntfsd] how can we get system drive in filter driver

Hi all,

I have filter driver layered over NTFS. But before attaching to the
undelying NTFS drives in my filter’s driverentry(), I would like
to know whether the underlying drive is the OS drive(C:\ for eg.), and =
act
accordingly.

Does any one how can I find out whether the drive is OS drive from the
filters driverentry?

Thanks
vishnu.


You are currently subscribed to ntfsd as: xxxxx@inflectionsystems.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntfsd as: xxxxx@inflectionsystems.com
To unsubscribe send a blank email to %%email.unsub%%

Vishnu,

Tom got his description backwards which is easy to do because the names
are not intuitive.

System Volume –> contains ntloader and boot.ini
Boot Volume –> contains the operating system (windows directory tree)

There is a flag in the device object called DO_SYSTEM_BOOT_PARTITION
which identifies which volume the OS was loaded from. According to what
you said below (and adjusting for the name confusion) I believe testing
for that flag will meet your needs.

Neal Christiansen
Microsoft File System Filter Group

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: vishnu [mailto:xxxxx@lycos.com]
Sent: Thursday, October 17, 2002 6:46 AM
To: File Systems Developers
Subject: [ntfsd] RE: how can we get system drive in filter driver

Hi,

I am concerned with the system volume and not with the boot volume.

Also, I want to attach to the volumes in my driverentry() itself. ( My
driver has a Start value of 2.)

Thanks
vishnu.

Well, when you attach you will be attaching to the specific volume.
One =
question might be whether you need to be attached at boot time or if =
later is ok. Also, are you talking about the boot drive or the system
=
drive, these can be different. The boot volume is the volume that =
contains the NTLOADER, the system driver is where the operating system
=
files are located (at least that is one way of looking at this =
terminology).

-----Original Message-----
From: vishnu [mailto:xxxxx@lycos.com]
Sent: Thursday, October 17, 2002 8:53 AM
To: File Systems Developers
Subject: [ntfsd] how can we get system drive in filter driver

Hi all,

I have filter driver layered over NTFS. But before attaching to the
undelying NTFS drives in my filter’s driverentry(), I would like
to know whether the underlying drive is the OS drive(C:\ for eg.), and
=
act
accordingly.

Does any one how can I find out whether the drive is OS drive from the
filters driverentry?

Thanks
vishnu.


You are currently subscribed to ntfsd as:
xxxxx@inflectionsystems.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to ntfsd as: xxxxx@Windows.Microsoft.com
To unsubscribe send a blank email to %%email.unsub%%