This was tested on NetBSD 3.99.16, however the instructions should apply to older (and newer) versions as well. I have attempted to flag steps where you may run into version incompatabilities with “Version Note”.
There are a number of devices that will allow you to read your CF card on a NetBSD machine, the device I chose was the mediaGear Keychain Compact Flash Reader.
A snippet of your dmesg output should appear as follows:
[...]
umass0 at uhub1 port 1 configuration 1 interface 0
umass0: mediaGear Compact Flash Keychain, rev 1.10/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <MG, CF-Key, 1.00> disk removable
sd0: fabricating a geometry
sd0: 244 MB, 244 cyl, 64 head, 32 sec, 512 bytes/sect x 500400 sectors
[...]
Run the following commands:
# cd /root
# mkdir cfimage
# dd if=/dev/zero of=netbsd.img bs=512 count=500400
# vnconfig vnd0 netbsd.img
# fdisk -ua0 vnd0
# disklabel -e -I vnd0
# newfs /dev/rvnd0a
# mount /dev/vnd0a /root/cfimage
# cd /root/cfimage && mtree -Udef /etc/mtree/NetBSD.dist
# tar xzpf i386/binary/sets/base.tgz
# tar xzpf i386/binary/sets/kern-GENERIC.tgz
# cp i386/binary/sets/etc.tgz /root/cfimage/root
# chroot /root/cfimage /bin/sh
You are in the chroot environment, continue with
Continue reading →