Reading boot sector of PC under Linux

Frank Heckenbach frank at g-n-u.de
Tue May 15 22:41:47 CEST 2001


Martin Liddle wrote:

> To answer my own question, I finally managed to start to think and came
> up with this, which seems to do what I want:
> 
> Var InBuffer: Array[0..511] of Byte;
>     InFile:File;
> 
> Reset(InFile,'/dev/hda',512);
> Blockread(Infile,InBuffer,1);

OK, if you only want the raw data, sure, you can just read them from
the device. I was thinking more complicated -- to get some more
readable information or something ...

Frank

-- 
Frank Heckenbach, frank at g-n-u.de, http://fjf.gnu.de/
GPC To-Do list, latest features, fixed bugs:
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html




More information about the Gpc mailing list