I have set up literally hundreds of CF cards for embedded systems.
My final approach was to give the VM the usb raw device as its disk drive
and install directly to it.
All I had to do 'postinstall' was run mkinitrd and add the ide and scsi
drivers to the command line, so it would boot in literally anything
supported by the kernel.
I used the kvm VM for this because of its simplicity for me. YMMV.
Pop in the CF card and watch it mount. Verify the drive id with df, then
unmount it.
This example assumes that the CF card was mounted as /dev/sdbX.
# qemu-kvm -hda /dev/sdb -cdrom CentOS-5.2-x86_64-bin-DVD.iso -net nic -net
user -m 1024 -kernel vmlinuz -initrd initrd.img -append "text
ks=http://10.1.10.197/ks/ks"
For me, I can kickstart a small custom Fedora or Centos build in about 7
minutes, and pop it into an embedded device and boot it.
Phil, very interesting.
What do you do to minimize writes to the cf card? Or is it not that
big of a prob?
I have turned off swap.