Partition Table

Is Partition Table information is contained in /dev/hd0?
If I copy /dev/hd0 to a file (on a different node), change the table
and later restore it, will the partition table be restored.

  • Mario

Mario Charest <mcharest@antispam_zinformatic.com> wrote:


Is Partition Table information is contained in /dev/hd0?

Normally, yes. (Unless you ascribe some odd meaning to /dev/hd0
using prefixes, or don’t use a partition table on that drive, or… )

If I copy /dev/hd0 to a file (on a different node), change the table
and later restore it, will the partition table be restored.

Yup, should be.

Note that the “cp /dev/hd0” may fail – if you disk is bigger than
2Gb, it will fail. cp uses open()/read()/write() – these will not
handle a single file larger than 2G. You may have to write you own
“block_copy” that uses block_read()/block_write() [readblock() and
writeblock() under NTO] to do this copy.

-David

QNX Training Services
dagibbs@qnx.com

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:97oll8$8f4$2@nntp.qnx.com

Mario Charest <mcharest@antispam_zinformatic.com> wrote:


Is Partition Table information is contained in /dev/hd0?

Normally, yes. (Unless you ascribe some odd meaning to /dev/hd0
using prefixes, or don’t use a partition table on that drive, or… )

If I copy /dev/hd0 to a file (on a different node), change the table
and later restore it, will the partition table be restored.

Yup, should be.

Note that the “cp /dev/hd0” may fail – if you disk is bigger than
2Gb, it will fail. cp uses open()/read()/write() – these will not
handle a single file larger than 2G. You may have to write you own
“block_copy” that uses block_read()/block_write() [readblock() and
writeblock() under NTO] to do this copy.

Ok thanks, that shouldn’t be a problem since it’s for flash card (32Meg)

-David

QNX Training Services
dagibbs@qnx.com