boot from chipdisk

It took me quite a while to figure out the procedure to make a boot image, then format a ChipDisk(C Drive), then transfer the boot image to the ChipDisk, then boot it from ChipDisk.

before we start write the disk, we should be familar to device drivers.
e.g.
devb-fdc is for floppy disk,
devb-eide is for ide devices like hard disk & cd-rom.
devf-ram is for access ram space
necessary libraries to run the drivers are libcam.so, cam-disk.so, io-blk.so, libc.so, fs-qnx4.so, fs-dso.so

my approach is listed as following:

  1. build a very simple image, with one teminal. but i include all the necessary files and commands in the [data=copy] session.

  2. boot from that image

  3. start the floppy and chipdisk driver with
    #devb-fdc &
    #devb-eide &

after a while, when go to the /dev directory, you should see “fd0”, “hd0”, and “hd0t12”, depends on your system

  1. create a virtual space to mount the floppy & chipdisk
    #devf-ram &
    #flashctl -p/dev/fs0p0 -v -e -f

by this you shall see the /fs0p0 directory, this directory allow you read and write.

  1. format the chipdisk
    #dinit -h /dev/hd0

  2. mout the floppy and chipdisk
    #cd /fs0p0
    #mkdir fdd
    #mkdir hdd
    #mount /dev/fd0 /fs0p0/fdd
    #mount /dev/hd0 /fs0p0/hdd

  3. copy .boot file from floppy to chipdisk
    #cp /fs0p0/fdd/.boot /fs0p0/hdd/.boot

  4. umount the floppy and chipdisk
    #umount /dev/fd0
    #umount /dev/hd0

  5. reboot the computer from the chipdisk