Date: Fri, 3 Jun 2005 12:00:50 -0700 (PDT) From: Jeremy Cooper To: mk at neon1 dot net Subject: miniBSD additions Hi there. I'm sorry I don't know your name, but you are listed at the author of the document "miniBSD - reducing FreeBSD", which I found at https://neon1.net/misc/minibsd.html I bought a Soekris net4521 on Sunday and it arrived today. I found your webpage and tried using it to make a usable FreeBSD on my 128MB flash card. There is a fatal flaw in your otherwise very nice page! The flaw is that, using your instructions, you end up with a non-bootable CF card due to differences between bsdlabel and the 4521's opinion of the CF card geometry. I found that I had to do the following: 1) Stick the desired flash card into the Soekris and power it up. Look for the BIOS information line that reads: Pri Mas LBA xxx-yyy-zzz This line tells you how the Soekris interprets the CF card. xxx - Number of cylinders yyy - Number of heads zzz = Number of sectors per track 2) Ammend your instructions under section 11 "Generating the flash image". You need to add instructions on how to set the geometry of the image. --- FreeBSD 5.x --- FreeBSD 5 allows you to fake the geometry of a vn device at the time you run mdconfig. To do this, modify your current text as follows: Let's use this disk image file as a vn device so we can disklabel it: FreeBSD 4.7: ... FreeBSD 5.x: mdconfig -a -t vnode -u 0 -f /usr/minibsd-disk.bin -x -y (Notice the addition of the -x and -y arguments.) Once you have accomplished this step in FreeBSD 5.x, you are all set. The remaining instructions (bsdlabel) will query the kernel for the geometry automatically. --- FreeBSD 4.x --- FreeBSD 4.7 doesn't have the ability to set the image geometry at vnconfig time. Instead, you have to inform the kernel of the geometry using the fdisk utility. You begin by creating a small configuration file for fdisk. This configuration file contains three commands. The first command sets the image's geometry. The second command creates a BIOS partition that spans the entire drive, and the last command makes the partition active and bootable. The configuration file is a text file with one command per line: g c h s p 1 a 1 In my case, my flash card has 250880 sectors and the Soekris interprets its geometry as having 980 cylinders, 8 heads, and 32 sectors per track. Thus, my configuration file read: g c980 h8 s32 p 1 32 250848 a 1 With the configuration file in place, you are ready to run fdisk to set the geometry: fdisk -f minibsd-disk.config vn0 Then you can continue at the "disklabel -Brw vn0 auto" step. Thanks for the web page. It helped a lot! -Jeremy