Prev: WiFi how to send OIDs from user mode (windows vista)
Next: How to eject removable devices programmatically?
From: Ashish13 on 9 Jan 2007 00:34 Hi, anton bassov wrote: > ........................... > It does not work this way...... > > Before you start thinking about FS, first of all, you have to emulate a > virtual disk and its partitions. Therefore, I suggest you should start > from emulating the storage stack, and reporting your (unpartitioned, > for the time being) disk to PnP Manager. If you do it properly, your > virtual disk will appear in the control panel as unpartitioned one - > you don't have to "interface it to Windows Explorer".... what is a storage stack? > ............................ > At this point you can add the code to emulate its partition(s) and > appear them as being formatted (for the time being you can format them > with FAT), so that logical volumes and FS may get mounted on them. At > this point it will appear on MyComputer panel, so that users will be > able to access it. > In other words, you have to interface your virtual disk to the system, > rather than to Windows Explorer. Yes this is what we want. So how to go about this thing? > When you start feeling comfortable with the storage stack (it may take > quite a while before it happens), you can already start thinking about > formatting your virtual disk with a custom file system and writing an > FS driver, and, as Skywing already told you, this is one of the most > complex projects that can be possibly imagined. Actually we want to show linux file system called ReiserFS which cant be seen in windows if you have any partition formatted by this FS. And ReiserFS specific read call writing is under progress, which will be completed soon. [The analogy here is of a Nokia Smart Phone: When we install Nokia PC suite, and then connect Phone to PC through a data-cable, we can see phone memory as a drive in windows explorer. We can browse through that drive same as we browse through the other actual drives on the HDD. And we can copy paste data between phone and PC]
From: Ashish13 on 9 Jan 2007 00:42 Hi, anton bassov wrote: > David, > I somehow presume that the OP is a reasonable person, so that he wants > his custom FS to be on a separate partition, while the boot partition > is formatted with NTFS Yes this is the case. The boot partition is foramatted with NTFS or FAT. While the FS we want to show in Windows Explorer is of linux-native ReiserFS, which will be present in extended partition or in non-bootable primary partition. > ...........Certainly, he can try to play around with actual disk's partition table > so that he has to emulate only a separate partition, rather than > virtual disk, but this is quite dodgy - if you make a mistake here (and > any newbie is bound to make PLENTY of them), you risk crewing up your > disk. Well we are not writing anything to disk. Only reading will be performed. So I think disk will be safe. Please comment on this, if I am wrong. > If I was in his place, I would start with creating a virtual disk and > FAT partitions on it (physically > it would be stored in a huge file on NTFS-formatted partition). After I > reach the stage when it all works, I would start thinking about writing > a file system driver, and mounting a custom FS, rather than FAT, on > partitions of this virtual disk. Ya this looks reasonable plan. So what I will need to that? ****Thanks everybody for commenting on this topic.
From: anton bassov on 9 Jan 2007 02:52 David, Actually, VMWare is even better option - no risk to the host system whatsoever. Even more, if you don't want to crew up your guest OS either, you can just add a new disk to it right on the fly, and do all your "experiments" only with this disk.... However, in our case it does not really matter. Let's face it - you just don't start your kernel-mode experience with writing a file system. As I can see, for the time being the OP is confused about the very term "storage stack", so that writing a custom FS is just infeasible task for him..... Therefore, emulation of the storage stack is just a kind of introduction part - by the time the OP feels comfortable with it (it it may take quite a while before it happens), he will already know the basics of kernel-mode development. At this point he can start thinking about writing a FS driver.... Anton Bassov David J. Craig wrote: > This is why you use a test system. Use Ghost to save the OS partition > before the driver being tested is loaded. Since you don't need to write to > strange partition it should be safe, but having a backup of it would be a > good idea. If you are want you can have two identical hard drives. Prepare > one with both partitions on it without the driver being tested. Then just > use a simple program to copy one to the other. Ghost is much quicker, but > the copy drive logic will work. > > "anton bassov" <soviet_bloke(a)hotmail.com> wrote in message > news:1168295395.905339.288040(a)11g2000cwr.googlegroups.com... > > David, > > > >> Partitions are presented to the file systems and file system recognizers > >> as > >> long as they follow the basic partition layout created by IBM and > >> Microsoft. > >> Nothing to do at the storage level unless he needs to mount a file that > >> looks like a drive. > > > > I somehow presume that the OP is a reasonable person, so that he wants > > his custom FS to be on a separate partition, while the boot partition > > is formatted with NTFS ( if he wants his boot partition to be formatted > > with a custom FS as well...... well, I hope he does not want it, > > because it would increase the complexity of his task dramatically). > > Certainly, he can try to play around with actual disk's partition table > > so that he has to emulate only a separate partition, rather than > > virtual disk, but this is quite dodgy - if you make a mistake here (and > > any newbie is bound to make PLENTY of them), you risk crewing up your > > disk. > > > > > > > > If I was in his place, I would start with creating a virtual disk and > > FAT partitions on it (physically > > it would be stored in a huge file on NTFS-formatted partition). After I > > reach the stage when it all works, I would start thinking about writing > > a file system driver, and mounting a custom FS, rather than FAT, on > > partitions of this virtual disk. In other words, I would prefer that > > the OS as a whole does not depend on my "experimentation" in any > > possible way...... > > > > > > Anton Bassov > > > > David J. Craig wrote: > >> Partitions are presented to the file systems and file system recognizers > >> as > >> long as they follow the basic partition layout created by IBM and > >> Microsoft. > >> Nothing to do at the storage level unless he needs to mount a file that > >> looks like a drive. This is the wrong group because file systems are not > >> part of the win32 subsystem. > >> > >> "anton bassov" <soviet_bloke(a)hotmail.com> wrote in message > >> news:1168237412.548657.247470(a)v33g2000cwv.googlegroups.com... > >> > David, > >> > > >> >> Wrong group, wrong answer. > >> > > >> > Why is the answer wrong??? > >> > > >> >> His 'virtual' is not really virtual, at the the way this thread has > >> >> gone. > >> >> He needs a file system. Not a file system filter or minifilter. > >> > > >> > Sorry, but no one on this thread, apart from you, ever mentioned FS > >> > filters or minifilters - both Skywing and me said that the OP needs his > >> > own FS driver...... > >> > > >> > > >> >> That is two years of work if you have the specs for the layout of the > >> >> disk. > >> > > >> > This is why I said that the OP speaks about one of the most complex > >> > projects that can be possibly imagined..... > >> > > >> > > >> > But before the OP starts even thinking about his file system driver, he > >> > has to emulate a disk and its partitions - after all, his custom file > >> > system has to be mounted on some non-existing partition, so that he has > >> > to emulate the storage stack, in the first place.... > >> > > >> > In other words, what is wrong with the anwers in this particular NG??? > >> > > >> > If you mean getting some precise advise...... well, I bet everyone on > >> > OSR forum will tell the OP just to forget the whole thing....... > >> > > >> > Anton Bassov > >> > > >> > > >> > > >> > > >> > David J. Craig wrote: > >> >> Wrong group, wrong answer. His 'virtual' is not really virtual, at > >> >> the > >> >> the > >> >> way this thread has gone. He needs a file system. Not a file system > >> >> filter > >> >> or minifilter. That is two years of work if you have the specs for > >> >> the > >> >> layout of the disk. If you can salvage some code from another source > >> >> that > >> >> knows that part, you still will need from six to eighteen months > >> >> getting > >> >> all > >> >> the interactions correct between the FSD, Cache Manager, and Memory > >> >> Manager. > >> >> The biggest problem is that there is no documentation on how to write > >> >> a > >> >> file > >> >> system driver. > >> >> > >> >> You have three samples in the WDK. CDFS is comprised of thirty seven > >> >> files > >> >> of 950KB. It is mostly read-only with some provisions for some of the > >> >> new > >> >> writing capabilities. SMBMRX is a 'fully functional network provider, > >> >> with > >> >> the ability to communicate with any server that supports NT4 level of > >> >> CIFS, > >> >> including working with a domain or workgroup server'. The driver > >> >> contains > >> >> 61 files of 1MB. It also requires a DLL and an executable. Not very > >> >> useful > >> >> for writing a local filesystem, but some have done so. Fastfat has > >> >> 42 > >> >> files in 1MB, but a lot of it requires being stripped out because of > >> >> the > >> >> various old fat formats that it contains. > >> >> > >> >> What you don't have is NTFS which is the filesystem on Windows most > >> >> closely > >> >> resembling a Unix/Linux filesystem. The newest version supports > >> >> transactions, compression, and encryption. A lot of the OS is written > >> >> specifically for the requirements of the various filesystems that > >> >> Microsoft > >> >> ships. They have quirks and 'features' that you must know to get a > >> >> file > >> >> system to work properly. Supporting booting is another issue in that > >> >> even > >> >> more of the OS must be modified to handle a new filesystem during > >> >> boot. > >> >> I > >> >> don't think he needs to support that feature, but just getting the > >> >> TopLevelIrp handling correct will be fun. The OSR kit works and they > >> >> have > >> >> source code access to ensure it continues to work. If your company > >> >> has a > >> >> Windows source license you can get the source to the OSR kit, but not > >> >> otherwise as it reveals too many OS internals. > >> >> > >> >> Now these discussions should be in ntfsd as that is the only group > >> >> where > >> >> the > >> >> Microsoft filesystem folks answer questions. Tony Mason from OSR > >> >> doesn't > >> >> seem to appear in any of the Microsoft newsgroups, but he does read > >> >> and > >> >> sometimes answer in ntfsd. > >> >> > >> >> "anton bassov" <soviet_bloke(a)hotmail.com> wrote in message > >> >> news:1168228763.453951.166920(a)38g2000cwa.googlegroups.com... > >> >> > ****What we dont know > >> >> >> 1. how to show those reiserFS partitions in Windows Explorer? > >> >> >> 2. even if we show reiserFS partition in windows explorer as a > >> >> >> drive, > >> >> >> how our read call will be called when user tries to browse through > >> >> >> this > >> >> >> drive? > >> >> >> 3. thus the main question is what should we do in order to achieve > >> >> >> above result? > >> >> >> ***How to show partitions in windows explorer? > >> >> >> ***Do we have to write a file system driver to interface our read > >> >> >> call, > >> >> >> with windows explorer clicks? > >> >> > > >> >> > It does not work this way...... > >> >> > > >> >> > Before you start thinking about FS, first of all, you have to > >> >> > emulate a > >> >> > virtual disk and its partitions. Therefore, I suggest you should > >> >> > start > >> >> > from emulating the storage stack, and reporting your (unpartitioned, > >> >> > for the time being) disk to PnP Manager. If you do it properly, > >> >> > your > >> >> > virtual disk will appear in the control panel as unpartitioned one - > >> >> > you don't have to "interface it to Windows Explorer".... > >> >> > > >> >> > At this point you can add the code to emulate its partition(s) and > >> >> > appear them as being formatted (for the time being you can format > >> >> > them > >> >> > with FAT), so that logical volumes and FS may get mounted on them. > >> >> > At > >> >> > this point it will appear on MyComputer panel, so that users will be > >> >> > able to access it. > >> >> > > >> >> > > >> >> > In other words, you have to interface your virtual disk to the > >> >> > system, > >> >> > rather than to Windows Explorer. > >> >> > > >> >> > When you start feeling comfortable with the storage stack (it may > >> >> > take > >> >> > quite a while before it happens), you can already start thinking > >> >> > about > >> >> > formatting your virtual disk with a custom file system and writing > >> >> > an > >> >> > FS driver, and, as Skywing already told you, this is one of the most > >> >> > complex projects that can be possibly imagined. > >> >> > > >> >> > Anton Bassov > >> >> > > >> >> > > >> >> > > >> >> > Ashish13 wrote: > >> >> >> Yup, may be it is very difficult to do this type of *Fully > >> >> >> functional* > >> >> >> project for > >> >> >> newbies like us. [We are group of 3 students.] > >> >> >> > >> >> >> But, > >> >> >> even if we can create a prototype for this concept, > >> >> >> then it will be very good achievement for us. > >> >> >> > >> >> >> Our minimal goals are > >> >> >> 1. Able to give only *read* access to say Reiser file system > >> >> >> 2. Try to show these reiserFS partitions in windows explorer for > >> >> >> easy > >> >> >> browsing > >> >> >> > >> >> >> *****What we have now > >> >> >> 1. We already have coded file system recogniser [by reading > >> >> >> partition > >> >> >> tables n then magic strings-- this required Raw access to HDD] > >> >> >> 2. Coding for ReiserFS read i.e. traversing ReiserFS tree, > >> >> >> retrieving > >> >> >> data from direct and indirect items is under progress and we will > >> >> >> complete in coming 10 to 15 days. > >> >> >> > >> >> >> ****What we dont know > >> >> >> 1. how to show those reiserFS partitions in Windows Explorer? > >> >> >> 2. even if we show reiserFS partition in windows explorer as a > >> >> >> drive, > >> >> >> how our read call will be called when user tries to browse through > >> >> >> this > >> >> >> drive? > >> >> >> 3. thus the main question is what should we do in order to achieve > >> >> >> above result? > >> >> >> ***How to show partitions in windows explorer? > >> >> >> ***Do we have to write a file system driver to interface our read > >> >> >> call, > >> >> >> with windows explorer clicks? > >> >> >> > >> >> >> Please share any links/ name of books you have, which will help in > >> >> >> such kind of activities. > >> >> >> > >> >> >> Many thanks to Skywing for Commenting on this topic. :-) > >> >> >> _______________________________________________________________________ > >> >> >> Skywing [MVP] wrote: > >> >> >> > Full-blown filesystem drivers are extremely complicated and > >> >> >> > involve > >> >> >> > a > >> >> >> > lot of > >> >> >> > subtleties relating to getting things like locking and right with > >> >> >> > the > >> >> >> > rest > >> >> >> > of the system. I would not recommend it as a first project for > >> >> >> > someone > >> >> >> > new > >> >> >> > to Windows kernel programming. > >> >> >> > > >> >> >> > -- > >> >> >> > Ken Johnson (Skywing) > >> >> >> > Windows SDK MVP > >> >> >> > http://www.nynaeve.net > >> >> >> > "Ashish13" <ashishbagate13(a)gmail.com> wrote in message > >> >> >> > news:1168195001.753632.308120(a)51g2000cwl.googlegroups.com... > >> >> >> > > Hello, > >> >> >> > > > >> >> >> > > I am new to Windows Device Drivers/Internals. > >> >> >> > > > >> >> >> > > > >> >> >> > > We (a group of friends) want to do a project for windows XP, > >> >> >> > > which > >> >> >> > > can > >> >> >> > > be summarised as follows > >> >> >> > > > >> >> >> > > > >> >> >> > > 1. When our code will run, it will identify all the hard-disk > >> >> >> > > partitions, and will detect the file systems in the each > >> >> >> > > partition > >> >> >> > > 2. After that, for ReiserFS partitions, ( virtual ) drives > >> >> >> > > [like > >> >> >> > > C: > >> >> >> > > D: > >> >> >> > > etc.] will be created, which can be seen in Windows Explorer. > >> >> >> > > 3. When user will double click on this drive or > >> >> >> > > directories/files > >> >> >> > > in > >> >> >> > > this drive a reiserfs-read-call [coded by us in this utility] > >> >> >> > > will > >> >> >> > > be > >> >> >> > > called to read the contents of the directory/files. > >> >> >> > > > >> >> >> > > > >> >> >> > > Thus an user can browse ReiserFS (a linux file system) from > >> >> >> > > Windows > >> >> >> > > XP > >> >> >> > > in windows explorer. > >> >> >> > > > >> >> >> > > > >> >> >> > > *** So Question is How To proceed about writing such kind of > >> >> >> > > File > >> >> >> > > System Driver? > >> >> >> > > *** How much time will be required to code such a driver? > >> >> >> > > > >> >> >> > > > >> >> >> > > Please help, suggest some links because we all are new to this > >> >> >> > > type > >> >> >> > > of > >> >> >> > > work. > >> >> >> > > > >> >> >> > > > >> >> >> > > Thanking You and Hoping for reply, > >> >> >> > > Ashish > >> >> >> > > > >> >> > > >> > > >
From: Doron Holan [MS] on 9 Jan 2007 03:00 the storage stack (IDE, SCSI buses with the devices attached to them) is the stack that implements block level access to the disk. the FS sends I/O to the storage stack to store files and FS data, an FS does not directly access the disk. rather it uses PIRPs and let's the storage stack communicate with the device itself. d -- Please do not send e-mail directly to this alias. this alias is for newsgroup purposes only. This posting is provided "AS IS" with no warranties, and confers no rights. "Ashish13" <ashishbagate13(a)gmail.com> wrote in message news:1168320863.501189.114970(a)s34g2000cwa.googlegroups.com... > Hi, > > anton bassov wrote: >> ........................... >> It does not work this way...... >> >> Before you start thinking about FS, first of all, you have to emulate a >> virtual disk and its partitions. Therefore, I suggest you should start >> from emulating the storage stack, and reporting your (unpartitioned, >> for the time being) disk to PnP Manager. If you do it properly, your >> virtual disk will appear in the control panel as unpartitioned one - >> you don't have to "interface it to Windows Explorer".... > > what is a storage stack? > >> ............................ >> At this point you can add the code to emulate its partition(s) and >> appear them as being formatted (for the time being you can format them >> with FAT), so that logical volumes and FS may get mounted on them. At >> this point it will appear on MyComputer panel, so that users will be >> able to access it. >> In other words, you have to interface your virtual disk to the system, >> rather than to Windows Explorer. > > Yes this is what we want. > So how to go about this thing? > > >> When you start feeling comfortable with the storage stack (it may take >> quite a while before it happens), you can already start thinking about >> formatting your virtual disk with a custom file system and writing an >> FS driver, and, as Skywing already told you, this is one of the most >> complex projects that can be possibly imagined. > > Actually we want to show linux file system called ReiserFS which cant > be seen in > windows if you have any partition formatted by this FS. > And ReiserFS specific read call writing is under progress, which will > be completed soon. > > [The analogy here is of a Nokia Smart Phone: > > When we install Nokia PC suite, and then connect Phone to PC through a > data-cable, > we can see phone memory as a drive in windows explorer. > We can browse through that drive same as we browse through the other > actual drives on the > HDD. And we can copy paste data between phone and PC] >
From: anton bassov on 9 Jan 2007 03:04 Don, > The OP posted in multiple places, look at > microsoft.public.development.device.drivers In fact, I find this practice pretty annoying - people post the same stuff to multiple NGs at once, and never relate their threads. As a result, we have some "gaps" in our discussions.... Concerning the thread you have mentioned, I checked it, and found it pretty funny - as I can see, there is some "FS guru" who believes he can write A FILE SYSTEM (!!!!) in a matter of days. I hope the OP is going to ignore this stupid post altogether.... Anton Bassov Don Burn wrote: > Anton, > > The OP posted in multiple places, look at > microsoft.public.development.device.drivers I've been telling them to go do > a file system in a lot of posts. Also, Skywing did discuss file systems in > the original response. > > > -- > Don Burn (MVP, Windows DDK) > Windows 2k/XP/2k3 Filesystem and Driver Consulting > http://www.windrvr.com > Remove StopSpam from the email to reply > > > "anton bassov" <soviet_bloke(a)hotmail.com> wrote in message > news:1168237412.548657.247470(a)v33g2000cwv.googlegroups.com... > > David, > > > >> Wrong group, wrong answer. > > > > Why is the answer wrong??? > > > >> His 'virtual' is not really virtual, at the the way this thread has > >> gone. He needs a file system. Not a file system filter or minifilter. > > > > Sorry, but no one on this thread, apart from you, ever mentioned FS > > filters or minifilters - both Skywing and me said that the OP needs his > > own FS driver...... > >
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: WiFi how to send OIDs from user mode (windows vista) Next: How to eject removable devices programmatically? |