Re: ntvdm encountered a hard error




"Galbu" <spamtrap@xxxxxxxxxx> wrote in message
news:1162051240.094089.176550@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all. While writing a boot sector reader, I encountered this error:
NTVDM encountered a hard error. That occurs when i call the int 13h
with these parameters:

ah=02h
al=1 ;how many sectors?
ch=0 ;cylinder
cl=0 ;sector to read
dh=0 ;head
dl=80h ;first hard drive
es:bx => buffer 512 bytes long

if I read a floppy drive (dl=0), than everything goes right, but I
cannot read a hd. What is wrong? I'm using windows vista rc1 (but I
don't think it's a beta system bug)
thx everybody


NTVDM encountered a hard error.
This is your problem: you're running int 0x13 code in a protected mode
Windows NT "DOS-box" without file/drive locking code.

As I said to Jay in one of the posts in "LSA Disk Sector Read - using int
13h ah 42 (extended read)" regarding his int 0x13 code: "... If you're
running the code from Windows 3.1/98/98SE/98ME/NT/2k/XP, Linux, Bochs,
VMWare, QEMU, DOSBox, DOSEMU, etc., don't expect the code to work. ... If
you're running from Windows, you'll need to add additional file/drive
locking code to work under Windows."

Since you're attempting to run the code under Windows, you'll need
"additional file/drive locking code." Where do you get that? As I said to
Jay in another post in "LSA Disk Sector Read - using int 13h ah 42 (extended
read)":

"You could look at LFN tools by Ortwin 'Odi' Glueck. In addition to working
for Real Mode DOS, they implement Windows drive locking, and should work for
Protected Mode 'DOS-boxes' and DOS emulators under older Windows OS:
Win95/98/98SE/ME etc. I don't know whether the drive locking will work
under Protected Mode 'DOS-boxes' and DOS emulators for 2k/NT/XP. The source
code is for Microsoft Visual C++ 1.51."
http://lfntools.sourceforge.net/
http://www.odi.ch/prog/lfn/index.php

That's about the only example of drive locking that I know of which works
under some versions of Windows. You're on your own for Windows NT.


Rod Pemberton

.



Relevant Pages

  • Re: SP2 Installation Problem
    ... >something, with modern IDE drives, Windows will never see a bad sector ... If there are problems with a sector, ... >place on the drive, all transparent to Windows. ... If either flag is set, an automatic check of the file system ...
    (microsoft.public.windowsxp.general)
  • Re: Incompetent? was Re: Using Linux to Recover bad NTFS drive.
    ... the ability to nondestructively clone a partition or even an entire ... Back in Windows or BartPE you run SectorSpy to dump the raw ... sector data into text file on a new drive for forensic ... > every linux sysadmin should know about. ...
    (comp.os.linux.misc)
  • Re: Incompetent? was Re: Using Linux to Recover bad NTFS drive.
    ... the ability to nondestructively clone a partition or even an entire ... Back in Windows or BartPE you run SectorSpy to dump the raw ... sector data into text file on a new drive for forensic ... > every linux sysadmin should know about. ...
    (comp.os.linux.hardware)
  • Re: [GIT PATCH] USB autosuspend fixes for 2.6.23-rc6
    ... - REMOVE THE DAMN QUIRK ... that some USB device is broken with more than 64 sectors would seem to ... So why not make the 64 sector limit be the default? ... Windows gives them). ...
    (Linux-Kernel)
  • Re: Cache
    ... Please do not send e-mail directly to this alias. ... > writing to the flash sector by sector. ... > Windows mass storage device driver might still write things to the device. ...
    (microsoft.public.development.device.drivers)