Hi
On Tue, 13 Apr, 1999 à 07:54:29PM +1000, Jiri Baum wrote:
> Hello,
> 
> is there an easy (or canonical) way of (auto)detecting whether a disk is
> partitioned, please?
> 
A valid partition table must contains a signature consisting of the two bytes
AA55 (or 55AA, I'm not sure) as the two last bytes of the MBR. You could test
for this signature (with dd for example).
If not present : definitely it's not a partitionned disk
If present : probably a partitionned disk but you should watch for the 
correctness of the supposed partitions.

> Any suggestions?
> 
HTH

-- 
 ( >-   Laurent PICOULEAU                                      -< )
 /~\       [EMAIL PROTECTED]                                  /~\
|  \)    Linux : mettez un pingouin dans votre ordinateur !    (/  |
 \_|_    Seuls ceux qui ne l'utilisent pas en disent du mal.   _|_/

Reply via email to