replacing .boot file corrupts file system

Greetings,

I’m trying to understand the proper way to replace the system image .boot
file with a new image which I have created with mkifs. My target system
boots from one drive which will not be modified. The 2nd device (let’s say
/dev/hd1) is visible and should be partitioned and initialized with the
proper image.
After initializing, I want to copy an image file as .boot of the partition
on /dev/hd1.
Up til now I’ve proceeded so…

  1. partition /dev/hd1 with fdisk
  2. reboot target system to allow new partitions to be seen
  3. run dinit on the new partition
  4. mount the device with something like “mount /dev/hd1 /fs”
  5. I then copy all needed system files to the appropriate places on “/fs”
  6. copy desired .ifs file to .boot in /fs

The problem is that when I try to boot from the newly prepared device, that
the system hangs (the image is ok, it always boots with other devices which
I initialized with dinit -f). I then switch back to the original boot
device, and when I remount the new device and try to replace the .boot file
again I get a “file system corrupted” message. If I try to copy with
cp’s -f option, I often receive the message “device is busy”.

What am I doing wrong and what is the proper method and sequence for doing
this?

Thanks for any help given.

Best regard,
Jason