Partitionned drive backup

Hi,

I have in my car a radio set running QNX (Harman-Becker make: Radio, CD/DVD, navigation, music library on HD, SD card, USB and AV inputs).
The hard disk seems to have some problems and before it dies I would like to make a complete working backup to replace it.
As a lot of people, I tried with some Windows utilities but it doesn’t work (Corrupted files)
So, I must do it with QNX and I have downloaded the QNX Demo CD 6.5
I dared not to load the old disk, I’m too afraid to make something wrong.

Please, could let me know if the following method would work to make this backup?

In the following steps:
hd10= old disk 40 Go (79, 78, 77 and 80 partitions)
hd20= new disk 80 Go (or 40 Go if I buy an other)

A- Plug HD_old and HD_new and boot(I use 2 “USB to IDE” converter)

B- list and check disk names

  • ls /dev/hd*|grep -v t

C- Identify the old and new disk:

  • fdisk /dev/hd10
  • fdisk /dev/hd20

D- When old disk found: ie: hd10
Write down for each partition:
|Name | (type) | Start cylinder | End cylinder | NR cylinder | NR block | Size | Boot |
and Last cylinder Nr

Following these links: 
[openqnx.com/phpbbforum/viewtopic.php?t=8474](http://www.openqnx.com/phpbbforum/viewtopic.php?t=8474)
[openqnx.com/phpbbforum/viewt ... =7&t=12805](http://www.openqnx.com/phpbbforum/viewtopic.php?f=7&t=12805)	
	Thanks!
  1. Create partitions on new disk using step D values:
  • fdisk /dev/hd20
    add the boot loader, and mark the partition 79 as loadable.

      [b][u]Question #1[/u][/b]: If new disk size bigger than old one.
      For the last partition: Do we have to keep the old disk last cylinder nr or can we use the new disk last cylinder nr to increase the size of this partition (Seems to be Music storage)?
    

Save, Quit and Reboot

[i]2. Enumerate the partitions; this will happen automatically if you reboot, but you can just type:

  • mount -e /dev/hd20 (useless?)[/i]
  1. You now have /dev/hd20t79, 78, 77 & 80. Before you can mount hd20 you need to dinit it:
  • dinit -h /dev/hd20t79
  • dinit -h /dev/hd20t78
  • dinit -h /dev/hd20t77
  • dinit -h /dev/hd20t80
    Question #2: Is it correct and does it work with 80 partition?
  1. Mount the partitions:
  • mount /dev/hd20t79 /hdnew1
  • mount /dev/hd20t78 /hdnew2
  • mount /dev/hd20t77 /hdnew3
  • mount /dev/hd20t80 /hdnew4
  1. Copy the special boot files:
  • cp /dev/hd10t79/.boot /hdnew1/.boot

  • cp /dev/hd10t79/.altboot /hdnew1/.altboot

      [b][u]Question #3[/u][/b]: Are these commands correct?
    
  1. Copy everything else on partition #1 (t79):
  • time cp -vpRNX /dev/hd10t79 /dev/hdnew1
  1. Files copy for the other partitions:
  • time cp -vpRNX /dev/hd10t78 /dev/hdnew2

  • time cp -vpRNX /dev/hd10t77 /dev/hdnew3

  • time cp -vpRNX /dev/hd10t80 /dev/hdnew4

      [b][u]Question #4[/u][/b]: Are these commands correct?
      
      [b][u]Question #5[/u][/b]: To avoid any modification on old disk (hd10), can we mount this disk as "read-only"?
      
      [b][u]Question #6[/u][/b]: If something else wrong? Let me know.
    

Thanks by advance for your patience and yours answers. (And sorry for my english, I’m french)
.

I would suggest instead:

cp -V /dev/hd10 /dev/hd20

Thanks.
Much more simple. :stuck_out_tongue:
1 line for all the partitions.

Does it work with disks of different size?
.

Yes. It is not doing an image (bitwise) copy so it doesn’t matter if the disk sizes are different as long as the destination disk is large enough to hold everything.

Tim

Thank you.

I’will try as soon as I receive my new disk. (More and more difficult to find a 2.5 IDE disk, at least in Europe)

I’ve found the problem with Acronis. I was restoring on a SSD. It seems that QNX and/or hardware (RENESAS R8A77850BA) are not compatible with SSD.
I don’t think we can solve this problem if we do not enter in the source file?

I’ve restored with Acronis on an 100go used “standard” disk and it works in my car, even if I try to load it on QNX CD evaluation, I continue to have the message “system files corrupted” :exclamation: . it’s a pity we cannot use SSD.
.

It’s probably Acronis or the hardware.

I’ve used SSD disks with QNX with no trouble. However the hardware has to be able to support IDE legacy mode because QNX has limited SATA support.

Tim