How to read an entire disc?

Miscellaneous Forums/General Discussion/How to read an entire disc?

How can I read all the bytes off a disc including boot sectors etc, rather than opening individual files?

I know some hex editors can do it, but how would you write something like this in BlitzMax (or C)?

You are wanting to do something like this, correct?

http://www.theabsolute.net/sware/dskinv.html

these might help

http://hdldump.ps2-scene.org/source.html
http://www.geocities.com/mvea/bootstrap.htm

You are wanting to do something like this, correct?
Correct.

Thanks Scott there's plenty of info for me to look at there. I'll let you know if I have any success.

Gee... why would somoene want to read AN ENTIRE DISK??? Copy Protection maybe???

Gee... why would somoene want to read AN ENTIRE DISK??? Copy Protection maybe???


There are plenty of other uses as well, like:

1) Data Recovery. Reading an entire disk will allow to to recover (a large part of) deleted files after they are removed from the trashcan, or in the case of a corrupted file allocation table.

2) Disk Cloning. By doing a sector-by-sector reading of a drive, you can make an exact image of it, which you can use for backup/restore purposes.

I'm sure that there's some other uses as well -- but bottom line is that there are plenty of perfectly legit uses for such techniques.

I'm sure that there's some other uses as well -- but bottom line is that there are plenty of perfectly legit uses for such techniques.
Copy protection isn't a legit use? It's not practical, but it's perfectly legit.

Want to read the boot sector of a flash disk to make it appear as 'fixed' to the system. I think I can probably get hold of pre-made s/w to do this, and I've found hex editors that can open a disc (rather than individual files), but out of interest I would like to know how to write a program to do the same.

Copy protection isn't a legit use? It's not practical, but it's perfectly legit.


It is -- I may have misunderstood the posting, I thought he was insinuating that the only reason would be circumventing copy protections, hence my comment.

Never mind.

Want to read the boot sector of a flash disk to make it appear as 'fixed' to the system. I think I can probably get hold of pre-made s/w to do this, and I've found hex editors that can open a disc (rather than individual files), but out of interest I would like to know how to write a program to do the same.


IIRC, that is a function of the driver file that addresses the controller that the device is connected to.

For example, If I take a normal fixed harddrive and put it in a removable drive tray, it will automagically appear as a removable drive under windows...

I may have misunderstood the posting, I thought he was insinuating that the only reason would be circumventing copy protections, hence my comment
What!!! Me insinuate??? lol! No but I do remember how useful it was to know that. I think there may be a few white papers at Microsoft on how NTFS works... Of interest also (and probably easier to find) are pages on how the various file systems in Linux are constructed AND there still may be resources online fromthe book Designing Your Own 32 bit Operating System out and about and the chapters therein that detail this and how the OS uses this etc.

Still have a copy of that book (and the CD C++ Code Disk) I think... If the wife hasn't Spring Cleaned it!