Skip navigation.

Installing FreeBSD 5.4 onto a 512 Compact Flash card

This should have been really easy, but for some reason my brain wanted to make this far too difficult!

I installed a minimal FreeBSD 5.4 install onto a HD, then tried using tar, to copy the image over to the CF card.  The HD was installed on ad0, and the CF card on ad2.  I spent a lot of time trying unsucsesfully to change the CF loading from ad2 ad0.  Turns out that it boots just fine from ad2.  Of course, I should have just done the minimal install from a CDROM on ad2, to the CF on ad0, and all would have been well, and done in 15 minutes flat. I ended up wasting (learning?), a few nights battling to get the CF booting from ad0.

I also got it to boot up in Read Only mode, and have it auto-create a /tmp and /var directories.  I then have a script to copy over the old /var files, as needed after boot up.  Upon shutdown, a script changes the CF to read-write, and coppies the /var files back to a temp dir.  This way, there is only one write per shutdown, and therefore I am not wearing out the flash memory.