Re: Hibernation Mode
From: Slobodan Brcin \(eMVP\) (sbrcin_at_ptt.yu)
Date: 04/26/04
- Next message: Slobodan Brcin \(eMVP\): "Re: EWF and 0x00000050 BSOD"
- Previous message: Ben Harris: "Re: EWF and 0x00000050 BSOD"
- In reply to: KM: "Re: Hibernation Mode"
- Next in thread: KM: "Re: Hibernation Mode"
- Reply: KM: "Re: Hibernation Mode"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 26 Apr 2004 12:43:22 +0200
Hi Konstantin,
Basically code is simple.
1. It reallocate itself.
2. It hook at vector 13h
3. If ah=03h or ah=43 it returns true, if not it passes the call to BIOS.
4. it load real MBR and resume boot.
Only problem with all this why it won't work on other devices is because I
have searched for empty space of memory that my XPe does not use. Like I
said it was not meant to be used by anyone expect me for testing purposes
only so I forged it to work, nothing more.
My HDD is 120 GB.
> Keep in mind that under Windows the int13/write access will not be
available either. Although it may not be important as Windows has
> it own disk access implementation (SCSI drivers), there might be some
custom (3rd party) drivers/apps that use INT 13 calls
> (especially if they switch to real mode). Slobodan may correct me if I am
wrong here.
I would like to see that driver. I mean I would like to know how to use int
13 calls from my driver. Few months ago I asked the same question in kernel
NG but answer was that it was not possible as I know it was not. Or better
to say it is possible, guy was enthusiast and he said:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=uEU8LXa6DHA
.1968%40TK2MSFTNGP11.phx.gbl
Regards,
Slobodan
"KM" <konstmor@nospam.yahoo.com> wrote in message
news:e#2MUa1KEHA.2952@TK2MSFTNGP10.phx.gbl...
> Hi Slobodan,
>
> I'd appreciate if you could answer one my question.
>
> I was wondering when you stop all INT 13h write calls (new MBR) do you
filter out only AH=03h function? I don't know what ntldr uses
> (I don't think the ntldr uses 0Bh, though). However, in LBA mode I think
the ntldr gets to switch to extended write (43h), does it?
> Then, do you filter this out too?
> In your tests, your system disk is less or more than 8G?
>
> Thank you,
> Konstantin
>
> > Just a couple of adds to Slobodan's reply:
> >
> > Leonid, your questions (statements) showed that you have already read
the thread and understood pretty much everything about our
> > solutions (mine is basically is a repeat of Slobodan's + a hack in
ntldr). There may be some other routes to accomplish what you
> > need to that we have not checked yet. Although, our apps work and this
is a good indication :-)
> >
> > > You can use something from bellow:
> > > 1. Use hack to ntldr that Konstantin described,
> > > 2. Remove int 13 disk write support from BIOS.
> >
> > Keep in mind that under Windows the int13/write access will not be
available either. Although it may not be important as Windows
> has
> > it own disk access implementation (SCSI drivers), there might be some
custom (3rd party) drivers/apps that use INT 13 calls
> > (especially if they switch to real mode). Slobodan may correct me if I
am wrong here.
> >
> > > 3. Create int 13 write filter program and place it in MBR.
> >
> > I haven't done that myself (Slobodan did). But I believe the asm code
that replaces default BIOS interrupt vector for INT 13 (AH =
> > 03). Most likely, just changing an entry in interrupt vector table (in
real mode always at address 00000h). It should be similar
> to
> > DOS INT 21h, 25h function implementation (you can explore/copy the
function code).
> >
> > > > - It's possible to copy MBR to next 512k and put the custom MBR that
> > > > only simulates the write operation. Then change WAKE to HIBR. (What
are WAKE code and HIBR code?)
> > >
> > > 4 Byte flag on the beginning of hibrfil.sys that tell antler what to
do with hibernation file.
> >
> > Get offline access to your target boot partition and explore the
hiberfil.sys. You'll see the flag values.
> >
> > > > - With BIOS source code it's possible to leave out write support
> > > > functions from BIOS. (Do you mean to prevent all write attempts via
int 13?
> > >
> > > Yes. Since XPe will use drivers not BIOS to write data to disk.
> > >
> > > (Doe's BIOS know something about power state?)
> > > This is not relevant for this solution. If you are referring to
Konstantin
> > > mention it in this thread it was a wrong assumption based on some
other problem he had.
> >
> > My guess is still that some BIOS implementations may "know" the state. I
couldn't find anything about that in APM specifications
> but
> > who knows.
> > My current experiments on my laptop show that if I hibernate the machine
it is always resumes on "Power On" regardless of the BIOS
> > boot options (if I have bootable CD in place, e.g.). I can't get to NT
loader menu on "Power On" after I hibernate my XP Pro OS
> > (this is not just XPe problem). The POST, however, is always there.
> > Anyway.. this is only my laptop problem. You will unlikely hit that on
your target.
> >
> > Konstantin
> >
> >
>
>
- Next message: Slobodan Brcin \(eMVP\): "Re: EWF and 0x00000050 BSOD"
- Previous message: Ben Harris: "Re: EWF and 0x00000050 BSOD"
- In reply to: KM: "Re: Hibernation Mode"
- Next in thread: KM: "Re: Hibernation Mode"
- Reply: KM: "Re: Hibernation Mode"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|