| [reply] |
Even if it's there as "P:" ?
| [reply] |
| [reply] |
If this were me, I'd probably boot into linux from a CD and use dd (and maybe strings too, if I was really just looking for the text files.) I think there's a dd that comes with cygwin. And there may be other versions available too. I'm not sure how functional they are.
Good luck.
-sauoq
"My two cents aren't worth a dime.";
| [reply] [d/l] [select] |
With apologies to Janis Joplin,
Oh lord, won't you burn me a Knoppix CD.
Really-- a Live distro like Knoppix is built for this kind of hardware hackery. Boot it off the CD, and you never have to become an expert at dual booting, or even install anything to the hard drive itself.
-- [ e d @ h a l l e y . c c ]
| [reply] |
Perl is just so cool (well, thanks to all those nice modules! :) ).
Anyway, since I havent been lazy waiting for a solution from you monks, Ive managed to do this:
use Win32API::File qw /:Func :IOCTL_DISK_ :MEDIA_TYPE/;
use Data::Dumper;
use strict;
use warnings;
use diagnostics;
my $sDosDeviceName = [];
my $osTargetPath;
my @devices = Win32API::File::QueryDosDevice($sDosDeviceName, $osTarge
+tPath, []) or die "Can't open: $^E\n";
print Dumper($sDosDeviceName);
#foreach (@devices) {
# print $_ . "\n";
#}
my $hObject = createFile( "//./PhysicalDrive3", "r", "rw")
or die "Can't open: $^E\n";
#Usage: Win32API::File::DeviceIoControl(hDevice, uIoControlCode, pInBu
+f, lInBuf, opOutBuf, lOutBuf, olRetBytes, pOverlapped)
my $opOutBuf;
my $olRetBytes;
Win32API::File::DeviceIoControl($hObject, IOCTL_DISK_GET_DRIVE_GEOMETR
+Y, [], 0, $opOutBuf, [], $olRetBytes, []);
# Calculate the number of DISK_GEOMETRY structures returned:
my $cStructs= length($opOutBuf)/(4+4+4+4+4+4);
my @fields= unpack( "L l I L L L" x $cStructs, $opOutBuf );
my( @ucCylsLow, @ivcCylsHigh, @uMediaType, @uTracksPerCyl, @uSectsPerT
+rack, @uBytesPerSect ) = ();
print Dumper(@fields);
my $ucCylsLow = shift @fields;
my $ivcCylsHigh = shift @fields;
my $uMediaType = shift @fields;
my $uTracksPerCyl = shift @fields;
my $uSectsPerTrack = shift @fields;
my $uBytesPerSect = shift @fields;
if ($uMediaType eq FixedMedia) {
print "FixedMedia";
}
Comments?
Well, so far it seems good (although I cant make QueryDosDevice to work!)... But next step? To actually read sector by sector?
(I've had some help from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/calling_deviceiocontrol.asp )
Thanks,
Ace | [reply] [d/l] |