Build
The Debugging Environment of Ext2fsd
Building
ext2fsd:
Modified
a ntddk ‘bug’, see the bold part of the following codes.
This parameters will disable any OPTIMIZATION of MSVC, otherwise,
your debugger may not show some local varieties correctly.
file:
$(NTDDK)\bin\setenv.bat
===============================================================
......
:free
rem
set up an NT free build environment
set
BUILD_ALT_DIR=fre
set
NTDBGFILES=1
set
NTDEBUG=ntsdnodbg
set
NTDEBUGTYPE=windbg
set
MSC_OPTIMIZATION=
goto
done
:checked
rem
set up an NT checked build environment
set
BUILD_ALT_DIR=chk
set
NTDBGFILES=1
set
NTDEBUG=ntsd
set
NTDEBUGTYPE=windbg
set
MSC_OPTIMIZATION= /Od /Oi
:done
......
==============================================================
Make
an image file:
Because
the ext2fs driver doesn’t implement the cache routines,
it is slow to access a real linux ext2 partition. Here we use a
virtual file disk instead.
First
of all, you should make an image of ext2 type. If you already
have a linux system, just boot to linux. If not, you can download
the tiny linux system (linux.zip) at http://sys.xiloo.com/software/linux.zip,
extract the zip file, and boot to dos, then goto the dir where your extract the
linux.zip, and run linux.bat to enter linux system.
Under
Linux, do the following commands to create an image file:
1,
dd if=/dev/zero of=./ext2.img bs=1048576 count=50
2,
mke2fs ./ext2.img
3,
mkdir /mnt/v
4,
mount ./ext2.img /mnt/v -o loop=/dev/loop0
5,
copy some files to /mnt/v (/mnt/dosc
is your actual c:.)
6,
umount /mnt/v
Install
filedisk:
Download
filedisk.zip from http://www.acc.umu.se/~bosse
and install it.
If
you want the filedisk.sys automatically loaded when booting, modify
the filedisk.reg file:
===========================================================
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FileDisk]
"ErrorControl"=dword:00000001
"Start"=dword:00000000
"Type"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FileDisk\Parameters]
"NumberOfDevices"=dword:00000010
Install
ext2fsd:
1,
Copy ext2fs.sys to %system32%\drivers.
2,
Import the ext2fs.reg into your system registry.
Start
the drivers:
After
rebooting your system, run these commands in a dos shell:
1,
net start filedisk (if the
filedisk.sys is not automatically started.)
2,
filedisk.exe /mount 0 f:\tools\ext2.img 50M z:
3,
net start ext2fs
Then
your can access driver z: now. Enjoy yourself!
nload
the ext2fsd:
Notes: You must define
the DBG definition in file ext2fs.h as 1, otherwise, the unload routine will be
ignored when compiling.
1,
filedisk /umount z:
2,
unload ext2fs (unload.exe can be downloaded from http://www.acc.umu.se/~bosse)
Matt
Wu mattwu@163.com
Http;//sysinternals.yeah.net
Created at Feb. 02, 2002
Updated
at Feb. 06, 2002
|