I had read some posts from the past where folks had trouble copying QNX partitions with Norton Ghost and not be able to get it to boot properly. I couldn’t find any success stories so I thought I would post what I did…
Installed the new hard drive as a slave.
Used fdisk on the new drive to create a QNX (77) partition larger than the one to be copied and set it up with a QNX loader and boot flag. (the destination partition will need to be at least the same size or larger for ghost to copy)
Reboot and used Norton Ghost 2003 floppy boot disk to perform a copy of the partition from the old drive to the new drive.
I have not fully tested this out long term, but so far it boots up and seems to work just fine.
One last note: Ghost does not seem to recognize the data on the QNX partition so it will then simply copy the entire partition. In my case the partition was 20GB but the data was only about 200MB. It copied the entire 20GB which took about an hour to do. I know when copying a MS Windows partition, it will only copy the actual data on that partition. Not a problem, just beware it may take longer than you think.
It won’t work properly, you probably don’t have all available space, the .bitmap from the small disk will be too small and won’t have mapping for the extra space.
Maybe chkfsys can correct that problem and grow the .bitmap file.
read ANS?“Do you want copy QNX to /dev/hd1 on free space? Press “y” to continue.”
[ x"$ANS" = x"y" ] || exit
exec 4>&1 # Use file descriptor 4 to remember where stdin used to go to.
{
set -x # to show commands as they are exectued.
# Display number of cylinders free.
fdisk /dev/hd1 QUERY FREE
# Creating default entries on the partition table.
# 1. Creating a single partition table using all available disk space
# 2. QNX Loader
# 3. Setting the boot flag
fdisk /dev/hd1 add -f1 QNX ALL BOOT QNX LOADER
mount -p /dev/hd0.0t78
dinit -h /dev/hd0.0t78
dinit -hb /dev/hd0.0t78
if mount /dev/hd0.0t78 /hd1 ; then
:
else
echo "############ ERROR #############"
use $0
exit
fi
# Output of dcheck has been left out of the log file, due to to enormous
# amount of information dcheck outputs. Also you can remove it for modern
# big drives, where I've never seen it fail and it takes a long time.
dcheck -m /dev/hd0.0t78 1>&4
# Copy files from master to slave drive, except for those to do with
# drive geometries and the current growing log file.
cp -Rpv -P!/hd78/.inodes -P!/hd78/.bitmap -P!/hd78/tmp/log /hd78/ /hd1
#Delete own directories
rm -rf /hd1/tmp/*
rm -rf /hd78/etc/config/trap/*
rm -rf /hd1/install/*
rmdir /hd1/install
# Due to the encrypting mechanism on /etc/licenses we use license program.
rm -rf /hd1/etc/licenses/*
license /hd78/etc/licenses /hd1/etc/licenses