Cloning a QNX hard drive

Is there a method of cloning or imaging a QNX hard drive? Ideally, I’d like
a utility like Drive Image that can clone one HD to another or create a disk
image file that we can backup and restore later. I’ve tried Drive Image but
it doesn’t seem to like QNX partitions.


Allan Williams
Edmonton, Alberta, CANADA

“Al Williams” <ambw.nospam@telusplanet.net> wrote in message
news:a53fnu$ke$1@inn.qnx.com

Is there a method of cloning or imaging a QNX hard drive? Ideally, I’d
like
a utility like Drive Image that can clone one HD to another or create a
disk
image file that we can backup and restore later. I’ve tried Drive Image
but
it doesn’t seem to like QNX partitions.

cp /dev/hd0 /dev/hd1 will work if the HDs are the same geometry.
Or cat /dev/hd0 | gzip -0 >image.file. (the image.file should be
store on a different hd obviously)



Allan Williams
Edmonton, Alberta, CANADA

We would have to handle different geometries, as usually the new drive is
bigger. We wouldn’t need to resize the partition though. Basically, we are
looking for a way to easily replace a failed hard drive by running some sort
of program to restore an image file or copy another drive.

I gather for the second option (which should handle different geometries,
right?) we’d need to initialize the new drive first (it would be nice to
automate that step as well). What command would be used to restore the
image?


Allan Williams
Edmonton, Alberta, CANADA

“Mario Charest” <goto@nothingness.com> wrote in message
news:a53gm6$1j9$1@inn.qnx.com

“Al Williams” <> ambw.nospam@telusplanet.net> > wrote in message
news:a53fnu$ke$> 1@inn.qnx.com> …
Is there a method of cloning or imaging a QNX hard drive? Ideally, I’d
like
a utility like Drive Image that can clone one HD to another or create a
disk
image file that we can backup and restore later. I’ve tried Drive Image
but
it doesn’t seem to like QNX partitions.

cp /dev/hd0 /dev/hd1 will work if the HDs are the same geometry.
Or cat /dev/hd0 | gzip -0 >image.file. (the image.file should be
store on a different hd obviously)


\

Allan Williams
Edmonton, Alberta, CANADA

\

“Al Williams” <ambw.nospam@telusplanet.net> wrote in message
news:a53ht7$288$1@inn.qnx.com

We would have to handle different geometries, as usually the new drive is
bigger. We wouldn’t need to resize the partition though. Basically, we
are
looking for a way to easily replace a failed hard drive by running some
sort
of program to restore an image file or copy another drive.

I gather for the second option (which should handle different geometries,
right?)

No it’s an example showing how to compress the image of the raw device.

we’d need to initialize the new drive first (it would be nice to
automate that step as well).

You can use fdisk with all the requirement argments, then
use dinit to initialise the new drive.

What command would be used to restore the
image?

I would create the image with something like

pax -w / | gzip -9 >imagefile.tgz

The do a restore with

gunzip <imagefile.tgz | pax -rv

If you have licenses store in /etc/licenses that’s a big more complicated,
as they can’t be copied.

I remember people posting script to acheive backup of HD,
hopefully they will drop it and repost their script. Or you could try
search google for those post.


Allan Williams
Edmonton, Alberta, CANADA

“Mario Charest” <> goto@nothingness.com> > wrote in message
news:a53gm6$1j9$> 1@inn.qnx.com> …


“Al Williams” <> ambw.nospam@telusplanet.net> > wrote in message
news:a53fnu$ke$> 1@inn.qnx.com> …
Is there a method of cloning or imaging a QNX hard drive? Ideally,
I’d
like
a utility like Drive Image that can clone one HD to another or create
a
disk
image file that we can backup and restore later. I’ve tried Drive
Image
but
it doesn’t seem to like QNX partitions.

cp /dev/hd0 /dev/hd1 will work if the HDs are the same geometry.
Or cat /dev/hd0 | gzip -0 >image.file. (the image.file should be
store on a different hd obviously)


\

Allan Williams
Edmonton, Alberta, CANADA



\

“Al Williams” <ambw.nospam@telusplanet.net> wrote in message
news:a53fnu$ke$1@inn.qnx.com

Is there a method of cloning or imaging a QNX hard drive? Ideally, I’d
like
a utility like Drive Image that can clone one HD to another or create a
disk
image file that we can backup and restore later. I’ve tried Drive Image
but
it doesn’t seem to like QNX partitions.


Allan Williams
Edmonton, Alberta, CANADA

Al
We’ve used Drive Image to clone QNX4 drives and make CD Images. I’m
also in Edmonton, email me.

Pat

“Al Williams” <ambw.nospam@telusplanet.net> writes:

Is there a method of cloning or imaging a QNX hard drive? Ideally, I’d like
a utility like Drive Image that can clone one HD to another or create a disk
image file that we can backup and restore later. I’ve tried Drive Image but
it doesn’t seem to like QNX partitions.

For same-kind of drives I have taken plain image with dd in linux box.

For different size, there is something called QNX_drive_copy.sh or
something similar in qnx ftp server. Reading it you can get idea how
it’s done.


M. Tavasti / tavastixx@iki.fi / +358-40-5078254
Poista sähköpostiosoitteesta molemmat x-kirjaimet
Remove x-letters from my e-mail address

The Norton Ghost can be easy way to clone entire hard drive. The second disk
should be the same size or bigger.

Adam


“Al Williams” <ambw.nospam@telusplanet.net> wrote in message
news:a53fnu$ke$1@inn.qnx.com

Is there a method of cloning or imaging a QNX hard drive? Ideally, I’d
like
a utility like Drive Image that can clone one HD to another or create a
disk
image file that we can backup and restore later. I’ve tried Drive Image
but
it doesn’t seem to like QNX partitions.


Allan Williams
Edmonton, Alberta, CANADA

Norton Ghost works too, but it sort of depends on the setup. In my setup, I
have a 4GB QNX partition, and the rest of the disk is FAT32. Ghost knows
how to resize FAT32, so I can put a larger drive in, ghost, and have a copy.
If it’s purely QNX4 on your drive, you’ll need to copy to a same size or
larger drive (other methods mentioned by others(using dd, cp, etc) would be
better if you need to resize the QNX4 partition).

-Ron

“Al Williams” <ambw.nospam@telusplanet.net> wrote in message
news:a53fnu$ke$1@inn.qnx.com

Is there a method of cloning or imaging a QNX hard drive? Ideally, I’d
like
a utility like Drive Image that can clone one HD to another or create a
disk
image file that we can backup and restore later. I’ve tried Drive Image
but
it doesn’t seem to like QNX partitions.


Allan Williams
Edmonton, Alberta, CANADA

Make sure that there are no bad blocks on either driver too.


Bill Caroselli – 1(626) 824-7983
Q-TPS Consulting
QTPS@EarthLink.net

“Mario Charest” <goto@nothingness.com> wrote in message
news:a53gm6$1j9$1@inn.qnx.com

“Al Williams” <> ambw.nospam@telusplanet.net> > wrote in message
news:a53fnu$ke$> 1@inn.qnx.com> …
Is there a method of cloning or imaging a QNX hard drive? Ideally, I’d
like
a utility like Drive Image that can clone one HD to another or create a
disk
image file that we can backup and restore later. I’ve tried Drive Image
but
it doesn’t seem to like QNX partitions.

cp /dev/hd0 /dev/hd1 will work if the HDs are the same geometry.
Or cat /dev/hd0 | gzip -0 >image.file. (the image.file should be
store on a different hd obviously)


\

Allan Williams
Edmonton, Alberta, CANADA

\

We’ve used the attached script successfully a few times.

Regards, Tristan.


Tristan Crees B.C.S.E
Robotics Engineer
International Submarine Engineering (http://www.ise.bc.ca)
1734 Broadway St. Port Coquitlam BC Canada V3C 2M8

“Al Williams” <ambw.nospam@telusplanet.net> wrote in message
news:a53fnu$ke$1@inn.qnx.com

Is there a method of cloning or imaging a QNX hard drive? Ideally, I’d
like
a utility like Drive Image that can clone one HD to another or create a
disk
image file that we can backup and restore later. I’ve tried Drive Image
but
it doesn’t seem to like QNX partitions.


Allan Williams
Edmonton, Alberta, CANADA
\

begin 666 QNX_drive_copy.dat
M(R$O8FEN+W-H"B,JBHJBHJBHJBHJBHJBHJBHJBHJBHJBHJBHJ
M
BHJBHJBHJBHJBHJBHJBHJBHJBHJBHJBHJBHJ@HC:69D968@
M7U]54T%‘10HC"B,E0R!D=7!L:6-A=&5S(%%.6"!H87)D(&1R:79E<RX*(PHC
M($9I;&4Z(%%.6%]D<FEV95]C;W!Y"B,@1&5S8W)I<‘1I;VXZ"B,@("!4:&ES
M(’!R;V=R86T@8W)E871E<R!L;V=I8V%L(&-O<&EE<R!O9B!H87)D(&1R:79E
M<RP@87,@;W!P;W-E9"!T;R B9&0B"B,@("!I;6%G92!C;W!I97,N("!4:&5R
M969O<F4@:70@9&]E<R!N;W0@2!O;B!M871C:&EN9R!D<FEV92!G96]M
M971E<FEE<RP*(R @(&1O97,@;F]T(&-O<‘D@=6YU<V5D(’!A<G1S(&]F(‘1H
M92!D<FEV92!A;F0@=&AE(&-O<‘D@:7,@9&5F<F%G;65N=&5D+@HC(" @5&AI
M<R!S8W)I<‘0@87-S=6UE<R!T:&4@9’)I=F5S(‘5S92!,;V=I8V%L($)L;V-K
M($%D9’)E<W-I;F<@$Q"02D@;6]D92P(R @(&%N9"!A<F4@;VYL>2!O;F4@
M<&%R=&ET:6]N+"!A;F0@=&AA="!P87)T:71I;VX@:7,@44Y8(&]F(&-O=7)S
M92X*(R @($QI8V5N<V5S(&%N9" B8F]O=&%B:6QI=‘D@:7,@<’)E<V5R=F5D
M+B @02!L;V<@;V8@:7,@<V%V960@:6X@+W1M<"]L;V<N"B,@2V5Y=V]R9’,Z
M(&1U<&QI8V%T92!H87)D(&1R:79E(&1I<VL@8V]P>2!I;6%G92!F;W)M870@
M;6%S=&5R"B,@5F5R<VEO;CH@,2XP"B,@16YT97)E9"UD871E.B Q,BU86XM
M,3DY. HC($%U=&AO<CH@36%U<FEC92!#:6YQ=6EN:2 \8VEN<75I;FE 86QA
M;6%R+75S82YC;VT^(&]F(%!H:6QI<’,@1%93+@HC($-R961I=’,Z"B,@("!2
M;V)E<G0@4G5T:&5R9F]R9"!A;F0@06YT:&]N>2!796D@;V8@4&AI;&EP<R!$
M5E,L"B,@("!W:71H(&AI;G1S(&9R;VT@2V%R;"!(96EN>B!O9B!(=6=H97,L
M(%-O96YK92!.:65L<V5N"B,@("!A;F0@=&AE(&]U=’!U="!O9B!T:&4@44Y8
M(&EN<W1A;&P@<’)O8V5S<RX
(R!#;W!Y:6YG+7!O;&EC>3H@5&AI<R!P<F]G
M<F%M(&ES(’!U8FQI8R!D;VUA:6XL(&)U="!U<VEN9R!T:&ES(’!R;V=R86T*
M(R @(‘1O(&1I<W1R:6)U=&4@=&AE(%%.6"!/4R!A;F0@;W1H97(@<V]F=’=A
M<F4@<F5Q=6ER97,@<&5R;6ES<VEO;B!F<F]M+ HC(" @86YD+V]R(’)O>6%L
M:71E<R!T;RP@=&AE(&QE9V%L(&]W;F5R<R!O9B!T:&%T(’-O9G1W87)E+@HC
M(%-U<’!L96UE;G1A;#H*(R @($]N;‘D@=&5S=&5D(’=I=&@@44Y8(#0N,C0L
M(’-I;F=L92!P87)T:71I;VXL($Q"02P@241%(&1R:79E<R!O;FQY+@HC(" @
M5&AE(&-O;7!L971E(’!R;V-E9’5R92!T;R!C;W!Y(&1R:79E<R!I;G9O;‘9E
M<R!T:&4@9F]L;&]W:6YG(’-T97!S.@HC(" @,2X@26YS97)T(‘1H92!M87-T
M97(@’-O=7)C92D@86YD(’-L879E(“AB;&%N:RD@:&%R9”!D<FEV97,N"B,@
M(" @("!$97!E;F1I;F<@;V8@=&AE(&UA8VAI;F4@<V5T=7 L(’-L879E(&1R
M:79E<R!U<W5A;&QY(&YE961S(‘1O"B,@(" @("!H879E(&$@:G5M<&5R(’)E
M;6]V960N"B,@(" R+B!";V]T(%%.6"!I;B!A(’-A9F4@;6]D92!W:&5R92!T
M:&5R92!A<F4@;F@<’)O9W)A;7,@<G5N;FEN9R!T:&%T"B,@(" @("!M87D@
M87-Y;F-H<F]N;W5S;‘D@=W)I=&4@=&@=&AE(&AA<F0@9’)I=F4@9’5R:6YG
M('1H92!F;VQL;W=I;F<
(R @(" @(’!R;V-E9’5R92X@($EF(‘EO=2!C86XG
M="!G=6%R86YT964@=&AI<RP@>6]U(’-H;W5L9"!U<V4@82!13E@(R @(" @
M(&)O;W0@9FQO<’!Y(&%N9"!M;W5N="!T:&4@:&%R9"!D<FEV92!M86YU86QL
M>2X
(R @(#,N($QO9VEN(&%S(’)O;W0N"B,@(" T+B!697)I9GD@=&AE($UA
M<W1E<B!D<FEV92!H87,@=&AE(&ME<FYE;"!B=6EL="!T;R!F;W)C92!,0D$@
M;W!T:6]N"B,@(" @("!D=7)I;F<@8F]O="!U<“X@($-H96-K(”]B;V]T+V)U
M:6QD+VAA<F0N/S@:&%S(‘1H92!L:6YE"B,@(" @(" B1G-Y<RYE:61E(&9S
M>7,@+6@@-C0L-C,B+" H:2YE+"!S96-T;W)S+&AE861S(&9O<B!,0D$@;6]D
M92XI"B,@(" U+B!2=6X@=&AI<R!S8W)I<‘0N"B,(V5N9&EF"B,JBHJBHJ
M
BHJBHJBHJBHJBHJBHJBHJBHJBHJBHJBHJBHJBHJBHJBHJ
MBHJBHJBHJBHJBHJBHJ*@H3$]’/2]T;7 O;&]G(",@375S="!B92!A
M;B!A8G-O;'5T92!P871H+@H
<F5A9"!!3E,_(D-O;7!L971E;‘D@;W9E<G=R
M:71E("]D978O:&0Q/R @4’)E<W,@(GDB(‘1O(&-O;G1I;G5E+B(6R!X(B1!
M3E,B(#T@>")Y(B!=('Q(&5X:70
"F5X96,@-#XF,2 @(",@57-E(&9I;&4@
M9&5S8W)I<‘1O<B T(‘1O(’)E;65M8F5R(’=H97)E(’-T9&EN(‘5S960@=&@
M9V@=&\N"@H*>PH@(" @(R!3;VUE=&EM97,@=&AE(&5X:7-T:6YG(’!A<G1I
M=&EO;B!I;F9O(’=I;&P@8V%U<V4@=&AI<R!S8W)I<‘0@=&@9F%I; H@(" @
M96-H;R B0VQE87)I;F<@=&AE(’-L879E(’!A<G1I=&EO;B!D:7-K+B((" @
M(&5C:&@(D5205-%1"(@?"!D9"!I8G,],6L@8V]N=CUS>6YC(&]F/2]D978O
M:&0Q"@H@(" @<V5T(“UX(”,@=&@<VAO=R!C;VUM86YD<R!A<R!T:&5Y(&%R
M92!E>&5C='5E9"X
"B @(" C($1I<W!L87D@;G5M8F5R(&]F(&-Y;&EN9&5R
M<R!F<F5E+@H@(" @9F1I<VL@+V1E=B]H9#$@455%4ED@1E)%10H*(" @(",@
M0W)E871I;F<@9&5F875L="!E;G1R:65S(&]N('1H92!P87)T:71I;VX@=&%B
M;&4N"B @(" C(" Q+B @0W)E871I;F<@82!S:6YG;&4@<&%R=&ET:6]N(‘1A
M8FQE(‘5S:6YG(&%L;"!A=F%I;&%B;&4@9&ES:R!S<&%C90H@(" @(R @,BX@
M(%%.6"!,;V%D97((" @(",@(#,N("!3971T:6YG('1H92!B;V]T(&9L86<
M"B @("!F9&ES:R O9&5V+VAD,2!A9&0@+68Q(%%.6"!!3$P@0D]/5"!13E@@
M3$]!1$52"B @("!M;W5N=" M<" O9&5V+VAD,0H@(" @9&EN:70@+6@@+V1E
M=B]H9#%T-S<(" @(&1I;FET(“UH8B O9&5V+VAD,70W-PH@(” @:68@;6]U
M;G0@+V1E=B]H9#%T-S<@+VAD,2 [('1H96X
(" @(" @(" Z"B @("!E;’-E
M"B @(" @(" @96-H;R B(R,C(R,C(R,C(R,C($524D]2(",C(R,C(R,C(R,C
M(R,B"B @(" @(" @=7-E(“0P"B @(” @(" @97AI= H@(" @9FD*“B @(” C
M($]U=’!U="!O9B!D8VAE8VL@:&%S(&)E96X@;&5F="!O=70@;V8@=&AE(&QO
M9R!F:6QE+"!D=64@=&@=&@96YO<FUO=7,(" @(",@86UO=6YT(&]F(&EN
M9F]R;6%T:6]N(&1C:&5C:R!O=71P=71S+B @06QS;R!Y;W4@8V%N(’)E;6]V
M92!I="!F;W(@;6]D97)N"B @(" C(&)I9R!D<FEV97,L(’=H97)E($DG=F4@
M;F5V97(@<V5E;B!I="!F86EL(&%N9"!I="!T86ME<R!A(&QO;F<@=&EM92X

M(" @(&1C:&5C:R M;2 O9&5V+VAD,70W-R Q/B8T"@H@(" @(R!#;W!Y(&9I
M;&5S(&9R;VT@;6%S=&5R(‘1O(’-L879E(&1R:79E+"!E>&-E<'0@9F]R('1H
M;W-E(‘1O(&1O(’=I=&@(" @(",@9’)I=F4@9V5O;65T<FEE<R!A;F0@=&AE
M(&-U<G)E;G0@9W)O=VEN9R!L;V<@9FEL92X
(" @(&-P(“U2<'8@+5 A+RYI
M;F]D97,@+5 A+RYB:71M87 @+5 A)$Q/1R O(”]H9#$“B @(” C($1U92!T
M;R!T:&4@96YC<GEP=&EN9R!M96-H86YI<VT@;VX@+V5T8R]L:6-E;G-E<R!W
M92!U<V4@;&EC96YS92!P<F]G<F%M+@H@(" @<FT@+7)F("]H9#$O971C+VQI
M8V5N<V5S+RH
(" @(&QI8V5N<V4@+V5T8R]L:6-E;G-E<R O:&0Q+V5T8R]L
M:6-E;G-E<PH*(" @(&9D:7-K("]D978O:&0Q($Q/041%4B!“3T]4(%%.6” @
M(",@26YS=&%L;"!13E@@8F]O="!L;V%D97(N"B @("!F9&ES:R O9&5V+VAD
M,2!1545262!“3T]4($Q/041%4B C($1I<W!L87D@(R!O9B!C>6QI;F1E<G,N
M”@I](#(^)C$@?"!T964@)$Q/1PH*8W @+78@)$Q/1R O:&0Q)$Q/1R @(" C
M(%!L86-E('1H92!F:6YA;"!F=6QL(&QO9R!F:6QE(&]N(‘1H92!C;W!I960@
-9’)I=F4N"F5X:70@"@``
`
end