As a FreeBSD user, I sometimes encounter situations where I need to hack my way around a problem here are some hints, patches and software that may be useful to others.
The only solution seems then fdisk and reinstall. If you don't have a bootable CD-Rom drive, but just a bootable USB floppy drive (most will do, I used one from Panasonic), you can still do it by first installing FreeBSD, and then copying the cabs to the Windows partition.
The overall process of installation is then
hw.pcic.init_routing=1 hw.pcic.intr_path=1This is enough for the main PCMCIA port, but you will not be able to use the flash card port until you remove sio1 from the kernel (there is an IRQ conflict). Here is my kernel configuration file: TET. It just excludes from GENERIC most of the things I do not use.
For APM, you need to apply a patch to the kernel. Here is the original version by Iwasaki-san, and here is the same patch for 4.5-RELEASE: fiva-apm-4.5R.diffs. You also need to patch the ata driver to slow down DMA: fiva-ata-dma-4.5R.diffs.
Kernel compilation is as usual:
# cd /sys/i386/conf # config TET # cd ../../compile/TET # make kernel-depend && make kernel # make kernel-installAfter adding the following two lines to rc.conf, you should be able to reboot into a pleasant environement.
pccard_enable="YES" apm_enable="YES"In my experience, everything works fine, except some (apparently specific) problems using ppp on pccard modems (silo overflows are slowing throughput). Note also that the internal modem cannot be used: there is no driver, not even proprietary ones for Linux.
One first approach is of course to add the "noatime" option to most filesystems (in particular to /). However, you may also want to delay access on write. For instance gnome has this strange behaviour of saving the panel settings every few seconds... On Linux, and old versions of FreeBSD, the solution was easy: increase intervals of the update daemon. But FreeBSD's update thread is continuous: there is no such notion of interval.
Here is a patch introduce such a notion.
After recompiling your kernel, add the following line to /etc/sysctl.conf:
kern.asyncdelay=900This will make synchronization periods occur every 15 minutes. You can look were you are in the cycle with sysctl kern.asynccount. Calling sync immediately starts a new cycle.
I have been using this patch for about 6 months, without corruption
occuring. On some occasions sync failedbefore reboot fails, and
fsck was required. This seems to be only a problem with old
metadata not being deleted, and fsck can correct it without
data loss, but you're warned. Of course, the spirit of the patch
itself means that you may lose up to 15 minutes of work, but hopefully
it should not corrupt your data.
YET, I DO NOT ENDORSE ANY RESPONSIBILITY ABOUT THE CONSEQUENCES OF USING THIS PATCH.
Adding the following line to /etc/rc.shutdown, and using shutdown rather than reboot should avoid the problem. I avoided fsck for months.
sysctl kern.asyncdelay=0 syncThis disables the feature, and returns to normal FreeBSD behaviour. There is a slight difference in behaviour between the 4.5R version and the 5.0 version. For the former, a cycle lasts asyncdelay seconds, meaning that nothing happens if asyncdelay <= syncdelay, while for the latter it lasts asyncdelay + syncdelay seconds, asynccount being negative during the synchronization periods.