hard drive image

anyone know of a quick and easy utility to make an image of a hard drive to
another hard drive?

I have a hard drive making horrible clunking sounds and have an identical
hard drive I could transfer the image to.

I don’t want to rebuild my hard drive from scratch !

“Andrew” <andrewl@fire.tas.gov.au> wrote in message
news:a95r5u$ple$1@inn.qnx.com

anyone know of a quick and easy utility to make an image of a hard drive
to
another hard drive?

I have a hard drive making horrible clunking sounds and have an identical
hard drive I could transfer the image to.

If they are identical, you can use dd if=/dev/hd0 of=/dev/hd1. (umount
/dev/hd1t* before using dd)

Pavol Kycina

Pavol Kycina wrote:

“Andrew” <> andrewl@fire.tas.gov.au> > wrote in message
news:a95r5u$ple$> 1@inn.qnx.com> …
anyone know of a quick and easy utility to make an image of a hard drive
to
another hard drive?

I have a hard drive making horrible clunking sounds and have an identical
hard drive I could transfer the image to.

If they are identical, you can use dd if=/dev/hd0 of=/dev/hd1. (umount
/dev/hd1t* before using dd)

Beware… Last time I used dd to copy a disk (a couple of years ago) it
would only copy two gigabytes. Four years ago that might have been
enough; I ended up writing my own little dd using block_read and
block_write.

Phil Olynyk

Pavol Kycina

ls /dev prior to slave drive shows:
hd0.0
hd0.0t4
hd0.0t77

and with slave same as above plus
hd0.1

shouldn’t this be hd1.0 ?

will dd if=/dev/hd0.0 of=/dev/hd0.1 work ?

“Andrew” <> andrewl@fire.tas.gov.au> > wrote in message
news:a95r5u$ple$> 1@inn.qnx.com> …
anyone know of a quick and easy utility to make an image of a hard drive
to
another hard drive?

I have a hard drive making horrible clunking sounds and have an
identical
hard drive I could transfer the image to.

If they are identical, you can use dd if=/dev/hd0 of=/dev/hd1. (umount
/dev/hd1t* before using dd)

Pavol Kycina

“Andrew” <andrewl@fire.tas.gov.au> wrote in message
news:a9dd44$36p$1@inn.qnx.com

ls /dev prior to slave drive shows:
hd0.0
hd0.0t4
hd0.0t77

and with slave same as above plus
hd0.1

shouldn’t this be hd1.0 ?

will dd if=/dev/hd0.0 of=/dev/hd0.1 work ?

Looks strange, I would expect these in /dev
hd0
hd0t4
hd0t77
hd1

Pavol Kycina

Pavol Kycina <kycina@microstep-hdo.sk> wrote:

“Andrew” <> andrewl@fire.tas.gov.au> > wrote in message
news:a9dd44$36p$> 1@inn.qnx.com> …
ls /dev prior to slave drive shows:
hd0.0
hd0.0t4
hd0.0t77

and with slave same as above plus
hd0.1

shouldn’t this be hd1.0 ?

will dd if=/dev/hd0.0 of=/dev/hd0.1 work ?

For a complete backup of a disk to identical hardware, it should work.

It might run faster is you specify a larger blocksize with the bs=
option. (I think it defaults to read & write of 512 bytes at a time.)

Looks strange, I would expect these in /dev
hd0
hd0t4
hd0t77
hd1

The default naming style changed.

Old style: /dev/hd0, /dev/hd1, /dev/hd2, /dev/hd3 – but you couldn’t
clearly tell which one matched what.

More recent:

/dev/hd0.0 means controller 0, drive 0 (master on first controller)
/dev/hd1.0 means controller 1, drive 1 (master on 2nd controller)
/dev/hd0.1 means controller 0, drive 1 (slave on first controller)

etc…

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Thanks David and others!

I’ll try that and let you know via this newgroup how it went.


“David Gibbs” <dagibbs@qnx.com> wrote in message
news:a9i6eq$rsk$3@nntp.qnx.com

Pavol Kycina <> kycina@microstep-hdo.sk> > wrote:
“Andrew” <> andrewl@fire.tas.gov.au> > wrote in message
news:a9dd44$36p$> 1@inn.qnx.com> …
ls /dev prior to slave drive shows:
hd0.0
hd0.0t4
hd0.0t77

and with slave same as above plus
hd0.1

shouldn’t this be hd1.0 ?

will dd if=/dev/hd0.0 of=/dev/hd0.1 work ?

For a complete backup of a disk to identical hardware, it should work.

It might run faster is you specify a larger blocksize with the bs=
option. (I think it defaults to read & write of 512 bytes at a time.)

Looks strange, I would expect these in /dev
hd0
hd0t4
hd0t77
hd1

The default naming style changed.

Old style: /dev/hd0, /dev/hd1, /dev/hd2, /dev/hd3 – but you couldn’t
clearly tell which one matched what.

More recent:

/dev/hd0.0 means controller 0, drive 0 (master on first controller)
/dev/hd1.0 means controller 1, drive 1 (master on 2nd controller)
/dev/hd0.1 means controller 0, drive 1 (slave on first controller)

etc…

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

OK!

/ $ dd if=/dev/hd0.0 of=/dev/hd0.1
1065456+0 records in
1065456+0 records out

However! When I
mount /dev/hd0.1
it errors with “mount: invalid number of arguments”.

Any idea of how to correctly mount and then ls the mounted drive?

“Andrew” <andrewl@fire.tas.gov.au> wrote in message
news:a9vg2h$dac$1@inn.qnx.com

Thanks David and others!

I’ll try that and let you know via this newgroup how it went.


“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:a9i6eq$rsk$> 3@nntp.qnx.com> …
Pavol Kycina <> kycina@microstep-hdo.sk> > wrote:
“Andrew” <> andrewl@fire.tas.gov.au> > wrote in message
news:a9dd44$36p$> 1@inn.qnx.com> …
ls /dev prior to slave drive shows:
hd0.0
hd0.0t4
hd0.0t77

and with slave same as above plus
hd0.1

shouldn’t this be hd1.0 ?

will dd if=/dev/hd0.0 of=/dev/hd0.1 work ?

For a complete backup of a disk to identical hardware, it should work.

It might run faster is you specify a larger blocksize with the bs=
option. (I think it defaults to read & write of 512 bytes at a time.)

Looks strange, I would expect these in /dev
hd0
hd0t4
hd0t77
hd1

The default naming style changed.

Old style: /dev/hd0, /dev/hd1, /dev/hd2, /dev/hd3 – but you couldn’t
clearly tell which one matched what.

More recent:

/dev/hd0.0 means controller 0, drive 0 (master on first controller)
/dev/hd1.0 means controller 1, drive 1 (master on 2nd controller)
/dev/hd0.1 means controller 0, drive 1 (slave on first controller)

etc…

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Andrew <andrewl@fire.tas.gov.au> wrote in article <aa07f6$s6v$1@inn.qnx.com>…

OK!

/ $ dd if=/dev/hd0.0 of=/dev/hd0.1
1065456+0 records in
1065456+0 records out

However! When I
mount /dev/hd0.1
it errors with “mount: invalid number of arguments”.

Any idea of how to correctly mount and then ls the mounted drive?

mount /dev/hd0.1 /fs/newdrive
cd /fs/newdrive
ls
Use mount -t option if the file system is not QNXfs.

Andrew <andrewl@fire.tas.gov.au> wrote:

OK!

/ $ dd if=/dev/hd0.0 of=/dev/hd0.1
1065456+0 records in
1065456+0 records out

However! When I
mount /dev/hd0.1

it errors with “mount: invalid number of arguments”.

Any idea of how to correctly mount and then ls the mounted drive?

mount -p /dev/hd0.1

then

mount /dev/hd0.1t77 /hd
ls /hd

(assuming your qnx partition was type 77.)

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Great! Looks like I now have a mirror of the original hard drive… so if it
crashes the swap out time will be simply a matter of changing the jumper
setting on the slave to make it the master!

(I did notice that dev does not appear on the slave drive or pipe.) Is this
an issue?


“David Gibbs” <dagibbs@qnx.com> wrote in message
news:aa24kh$1il$1@nntp.qnx.com

Andrew <> andrewl@fire.tas.gov.au> > wrote:
OK!

/ $ dd if=/dev/hd0.0 of=/dev/hd0.1
1065456+0 records in
1065456+0 records out

However! When I
mount /dev/hd0.1

it errors with “mount: invalid number of arguments”.

Any idea of how to correctly mount and then ls the mounted drive?

mount -p /dev/hd0.1

then

mount /dev/hd0.1t77 /hd
ls /hd

(assuming your qnx partition was type 77.)

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Andrew <andrewl@fire.tas.gov.au> wrote:

Great! Looks like I now have a mirror of the original hard drive… so if it
crashes the swap out time will be simply a matter of changing the jumper
setting on the slave to make it the master!

I’d suggest testing a boot from it just to make sure.

(I did notice that dev does not appear on the slave drive or pipe.) Is this
an issue?

/dev is not on either hard drive. It is a “virtual” directory. Well,
actually all directories are virtual, but there are lots of them around.
/dev represents that hardware “devices” on your machine, not a directory
on your hard drive.

Similarly, I don’t expect that you found a /proc on the slave drive.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Finally!
Got to set the 2nd drive as master and did a reboot.

QNX started and the 3rd party app also started as per start up scripts etc.

So all appears well!

Thanks to all for the help!
“David Gibbs” <dagibbs@qnx.com> wrote in message
news:aa3u5i$d16$1@nntp.qnx.com

Andrew <> andrewl@fire.tas.gov.au> > wrote:
Great! Looks like I now have a mirror of the original hard drive… so
if it
crashes the swap out time will be simply a matter of changing the jumper
setting on the slave to make it the master!

I’d suggest testing a boot from it just to make sure.

(I did notice that dev does not appear on the slave drive or pipe.) Is
this
an issue?

/dev is not on either hard drive. It is a “virtual” directory. Well,
actually all directories are virtual, but there are lots of them around.
/dev represents that hardware “devices” on your machine, not a directory
on your hard drive.

Similarly, I don’t expect that you found a /proc on the slave drive.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.