Discussion:
Copy sectors from USB disk w/No MBR|part boot sector to new disk
(too old to reply)
Lamont
2007-08-12 18:58:03 UTC
Permalink
Not sure if this is the right forum.

I clicked the wrong disk when formatting and blew away the MBR and Partition
Boot Sectors of my 160GB USB drive.

I understand I must not do fixes on this drive, but copy sector by sector to
another disk and do fixes on the "image" of the data there.

So, I just got a 750 GIG USB drive for recovery use.

I am under the impression that code which accesses a physical device must
run in the kernel, so I would like to learn how to do this.

(I took a C++ programming course about 100 years ago.)

I suppose that when I know how to make my code run in the kernel, then I
don't use CREATEFILE, because I am reading 1 sector at a time.

I am under the impression that to make a process run in the kernel requires
requires setting bit 13, the I/O privilege level in the EFLAGS register.

But when I read about calling device IO control and about file management
functions I find no mention of setting the privilege level in the EFLAGS
register.

I wonder if I am on the right track or going the wrong direction. Do I
need to get the Driver Development Kit and use its special compiler to access
a USB disk?

Thank you for kind assistance.
--
Lamont Phemister
Gary Chanson
2007-08-13 09:14:36 UTC
Permalink
Post by Lamont
Not sure if this is the right forum.
I clicked the wrong disk when formatting and blew away the MBR and Partition
Boot Sectors of my 160GB USB drive.
I understand I must not do fixes on this drive, but copy sector by sector to
another disk and do fixes on the "image" of the data there.
So, I just got a 750 GIG USB drive for recovery use.
I am under the impression that code which accesses a physical device must
run in the kernel, so I would like to learn how to do this.
(I took a C++ programming course about 100 years ago.)
I suppose that when I know how to make my code run in the kernel, then I
don't use CREATEFILE, because I am reading 1 sector at a time.
I am under the impression that to make a process run in the kernel requires
requires setting bit 13, the I/O privilege level in the EFLAGS register.
But when I read about calling device IO control and about file management
functions I find no mention of setting the privilege level in the EFLAGS
register.
I wonder if I am on the right track or going the wrong direction. Do I
need to get the Driver Development Kit and use its special compiler to access
a USB disk?
By the time you've learned enough to write the program, you won't need it
because the damaged drive and its files will be obsolete. ;)

You can probably reconstruct the partition table using a program such as
DiskTest. I'd suggest downloading "The Ultimate Boot CD" which contains a
variety of test programs and other tools. If you can't save your data with
these tools, it's probably beyond hope.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
Lamont
2007-08-20 05:02:01 UTC
Permalink
Hello Gary and Nathan,
Thank you for kindness to respond. I did buy some recovery programs. Most
cannot "see" the disk since the partition table seems to be gone. One
permits recovery of lots of files (about 25GB total lost) but over half are
scrambled. So, I suppose that means it the MFTs are blown and it is doing
some kind of guess work. Or, it is retrieving stuff that has been deleted
and some of the sectors have been reused.

Hah, I was in the process of backing up to CDs when the Nero CD/DVD burner
began to repeatedly hand. That's why I woke up in the middle of the night
with the compulsion to reformt the C: drive and reload Windows. In a fog, I
deleted the partition on my external USB backup drive. Groan. I'm 168 years
old. (Well, maybe I exaggerate 100 years) Too late smart, too soon old.
:-((
--
Lamont Phemister
Post by Lamont
Post by Lamont
Not sure if this is the right forum.
I clicked the wrong disk when formatting and blew away the MBR and Partition
Boot Sectors of my 160GB USB drive.
I understand I must not do fixes on this drive, but copy sector by sector to
another disk and do fixes on the "image" of the data there.
So, I just got a 750 GIG USB drive for recovery use.
I am under the impression that code which accesses a physical device must
run in the kernel, so I would like to learn how to do this.
(I took a C++ programming course about 100 years ago.)
I suppose that when I know how to make my code run in the kernel, then I
don't use CREATEFILE, because I am reading 1 sector at a time.
I am under the impression that to make a process run in the kernel requires
requires setting bit 13, the I/O privilege level in the EFLAGS register.
But when I read about calling device IO control and about file management
functions I find no mention of setting the privilege level in the EFLAGS
register.
I wonder if I am on the right track or going the wrong direction. Do I
need to get the Driver Development Kit and use its special compiler to
access
Post by Lamont
a USB disk?
By the time you've learned enough to write the program, you won't need it
because the damaged drive and its files will be obsolete. ;)
You can probably reconstruct the partition table using a program such as
DiskTest. I'd suggest downloading "The Ultimate Boot CD" which contains a
variety of test programs and other tools. If you can't save your data with
these tools, it's probably beyond hope.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
Gary Chanson
2007-08-20 07:48:42 UTC
Permalink
Assuming that it isn't already too late, do what I originally suggested.
Download the "Ultimate Boot CD (from
http://www.ultimatebootcd.com/download.html) and run the "Test Disk" program
or the damaged drive. There is a good chance that it will be able to
reconstruct the damaged partition table and can also probably restore the
formatted volume.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
Post by Lamont
Hello Gary and Nathan,
Thank you for kindness to respond. I did buy some recovery programs. Most
cannot "see" the disk since the partition table seems to be gone. One
permits recovery of lots of files (about 25GB total lost) but over half are
scrambled. So, I suppose that means it the MFTs are blown and it is doing
some kind of guess work. Or, it is retrieving stuff that has been deleted
and some of the sectors have been reused.
Hah, I was in the process of backing up to CDs when the Nero CD/DVD burner
began to repeatedly hand. That's why I woke up in the middle of the night
with the compulsion to reformt the C: drive and reload Windows. In a fog, I
deleted the partition on my external USB backup drive. Groan. I'm 168 years
old. (Well, maybe I exaggerate 100 years) Too late smart, too soon old.
:-((
--
Lamont Phemister
Post by Lamont
Post by Lamont
Not sure if this is the right forum.
I clicked the wrong disk when formatting and blew away the MBR and Partition
Boot Sectors of my 160GB USB drive.
I understand I must not do fixes on this drive, but copy sector by sector to
another disk and do fixes on the "image" of the data there.
So, I just got a 750 GIG USB drive for recovery use.
I am under the impression that code which accesses a physical device must
run in the kernel, so I would like to learn how to do this.
(I took a C++ programming course about 100 years ago.)
I suppose that when I know how to make my code run in the kernel, then I
don't use CREATEFILE, because I am reading 1 sector at a time.
I am under the impression that to make a process run in the kernel requires
requires setting bit 13, the I/O privilege level in the EFLAGS register.
But when I read about calling device IO control and about file management
functions I find no mention of setting the privilege level in the EFLAGS
register.
I wonder if I am on the right track or going the wrong direction. Do I
need to get the Driver Development Kit and use its special compiler to
access
Post by Lamont
a USB disk?
By the time you've learned enough to write the program, you won't need it
because the damaged drive and its files will be obsolete. ;)
You can probably reconstruct the partition table using a program such as
DiskTest. I'd suggest downloading "The Ultimate Boot CD" which contains a
variety of test programs and other tools. If you can't save your data with
these tools, it's probably beyond hope.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
Nathan Mates
2007-08-13 17:14:15 UTC
Permalink
Post by Lamont
I wonder if I am on the right track or going the wrong direction.
Do I need to get the Driver Development Kit and use its special
compiler to access a USB disk?
While this is a noble quest, I feel that it'll be a lot faster to
buy a program specifically designed for this. I've used R-Tools Studio
from http://www.r-tt.com/ to recover pictures from friends camera's
corrupted flash cards. They have a demo you can download. There's also
similar, competing programs if you want to look around.

Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Lamont
2007-08-24 05:14:01 UTC
Permalink
Hello Nathan,
Thanks for kind recommendations. Reading the book "Data Recovery Tips" I am
somewhat alarmed at the possibility of putting my damaged disk beyond reach
trying to fix it. So, I am trying to find how to copy it to another drive
and do my fix attempts on the copy. I have a program that purports to
create an image file of my disk, but it does seem to have worked. I am
under the impression that an image is something that is a sector for sector
copy. I think ordinarily, the term "image" refers to making an installable
operating system, but this is not my problem, as my "C" drive is OK. My
damaged drive was an external USB dirve. Will post the results of my journey.
Best regards,
Lamont
--
Lamont Phemister
Post by Nathan Mates
Post by Lamont
I wonder if I am on the right track or going the wrong direction.
Do I need to get the Driver Development Kit and use its special
compiler to access a USB disk?
While this is a noble quest, I feel that it'll be a lot faster to
buy a program specifically designed for this. I've used R-Tools Studio
from http://www.r-tt.com/ to recover pictures from friends camera's
corrupted flash cards. They have a demo you can download. There's also
similar, competing programs if you want to look around.
Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Loading...