Skip to content

Run named within FreeBSD Jail

I spent some time this afternoon trying to setup named (BIND 9.5) within a FreeBSD jail for internal use. I ran into an issue where it was unable to mount devfs and failed on me. After a little bit of digging I found a solution. This is the error that was reported (see link): /etc/rc.d/named: WARNING: devfs_domount(): Unable to mount devfs on /var/named/dev<br /> devfs rule: ioctl DEVFSIO_RAPPLY: Operation not permitted<br /> devfs rule: ioctl DEVFSIO_RAPPLY: Operation not permitted In a nutshell, add the following line to the jail /etc/rc.conf and you should be OK. named_chrootdir="" Yes, this means that you’re not running named within a chroot like it would by default but remember its in a jail anyway–a really fancy, hardened chroot.

Restrict Edit-Access to MediaWiki

I setup a personal wiki some time ago but it quickly was overrun by spam. Just about the point that I considered abandoning it altogether I figured out how to restrict edit access. This post, more than anything, is a note to myself… but as always it’ll end up on the Google machine and hopefully help someone else. The following changes should be added (anywhere) to your LocalSettings.php. Restrict anonymous editing: $wgGroupPermissions['*']['edit'] = false; Restrict editing by all non-sysop users: $wgGroupPermissions['*']['edit'] = false;<br /> $wgGroupPermissions['user']['edit'] = false;<br /> $wgGroupPermissions['sysop']['edit'] = true; Restrict editing by absolutely everyone: $wgGroupPermissions['*']['edit'] = false;<br /> $wgGroupPermissions['user']['edit'] = false;<br /> $wgGroupPermissions['sysop']['edit'] = false; Here’s to less spam on the interweb!

FreeBSD 7.0 – Wireless Encyption With WPA-PSK

Why is it that wireless is the “killer-app” of hardware on the *NIX platforms? I remember spending hours and hours getting it working via ndiswrapper on Ubuntu back in the day. Luckily its simple to get working in FreeBSD 7.0, and adding WPA encryption is just a few more steps. Here I’ll outline what I’ve added to get WPA-PSK working on FreeBSD 7.0 on my Dell Latitude D630. First, if you are not using the default GENERIC kernel you’ll need to load some encryption modules. You’ll want to load the following by adding the lines to your /boot/loader.conf: wlan_ccmp_load=”YES” wlan_tkip_load=”YES” wlan_wep_load=”YES” wlan_xauth_load=”YES” wlan_acl_load=”YES” If you are using the default GENERIC kernel these are already included so you can skip right on to the next step. You’ll need to configure wpa_supplicant with your ssid, key type and pre-shared key. This is an example of what my config looks like using WPA-PSK from my netgear wireless router: Read more

FreeBSD 7.0 – Finding and Loading the Correct Sound Driver

After getting my desktop setup (following these steps) I realized that I didn’t have working sound. It took me a bit of digging around and help from IRC to find out how. I hope to make this a bit easier for others by getting it on the web and into the infinite wisdom of Google. First of all you need to find the right module. The method that I used initially was a bit of a shotgun approach, but it ended up telling me the right module in the end. If you’re coming from Linux you might be familiar with the ‘modprobe’ tool for adding and removing modules from your kernel. In FreeBSD this tool is ‘kldload’. So, what we’ll do is load the ‘snd_driver’ module, which will end up telling us which one. This may take some time and your machine may be unresponsive for a few moments. Don’t panic (…unless, of course, it remains unresponsive for more than five-minutes). Read more

FreeBSD 7.0 – Update The Boot Delay (Faster Boot)

By default FreeBSD sets a ten second delay during the boot process allowing the user to select alternate boot options. Options such as single user mode, recovery, etc. If you’d like to change this boot delay to something more reasonable you can add the following to your /boot/loader.conf: autoboot_delay=X I’ve set mine to two seconds (autoboot_delay=2) as I feel that is reasonable to give me time if I need it, but not sit and count down if I don’t. If you’d like to bypass this menu altogether you can set the value to “-1”.

Putting Beastie Back In The Boot Menu

If you’ve used FreeBSD in the past you’re likely familiar with the mascot, Beastie. In the past Beastie was part of the boot menu, but recently he was replaced with a simple FREEBSD text image. To put Beastie back in the menu you can add the following to your /boot/loader.conf: loader_logo=”beastiebw” Next time you reboot you’ll see something a little more fun than the generic FreeBSD text.

Dell Latitude D630 – FreeBSD – Wireless (ipw3945)

Activating the wireless on your Dell Latitude D630 is fairly easy. For whatever reason its not supported in the default generic kernel, but all it takes is adding a few lines to a config file. A added the following lines to the /boot/loader.conf: if_wpi_load=”YES” wlan_load=”YES” wlan_amrr_load=”YES” firmware_load=”YES” wpifw_load=”YES” legal.intel_wpi.license_ack=1 These steps are also outlined in the wpi man page (man wpi). It tells you exactly the lines that need to go into the /boot/loader.conf. So, if you ever happen to forget again, at least that much of the instructions are on your machine (assuming you have man pages installed.) At this point you should be able to reboot and be able to use your wireless. I use the following commands to activate and connect to an access point: ifconfig wpi0 up ifconfig wpi0 list scan Read more

Dell Latitude D630 – FreeBSD 7.0 – SLiM – OpenBox – Firefox 3

Last you heard from me I was trying out FreeBSD 7.0 and mentioned that I would try to write down some of the things that I’d learned. For this post I thought I’d outline the steps I took to do my installation, including getting all the goodies working (wireless, sound, etc). This guide is hardware-specific to the Dell Latitude D630. Installation To begin the installation I used the steps outlined on this post (USB based installation). I used the entire drive and partitioned as follows: 512M / 2G swap 2G /var 1G /tmp [remaining] /usr I then selected the “Minimal” option, for a base install around 200M. I did add Linux compatibility when prompted, also added SSH login and customized the terminal options to “SWISS” for a slightly better console resolution. I set my timezone appropriately, selected any remaining defaults and reboot the machine. At this point you’ll have a very bare system, so you’ll want to add a few more things. Read more

How To Install FreeBSD 7.x From USB

I have the horrible habit of not putting a label on a CD after I’ve burned it. This leads to having a stack of CDs and not knowing which does what. This was my problem recently when installing FreeBSD, so I decided to start using USB based installations where possible. I prefer the multiple-write capability of USB, and this way I don’t waste CDs. Step one is to download a modified unetbootin utility particularly for FreeBSD. You can get .rpm, .deb, .exe or .sh for both 32 and 64bit here. I went with the 32bit .sh file. BE CAREFUL WITH THE PACKAGED VERSIONS AS IT SEEMS THEY DEFAULT TO WRITING TO YOUR LOCAL DISK! Once you have the unetbootin utility downloaded you’ll want to write the data to your USB drive. This is done using the command: chmod +x unetbootin-freebsd70*.sh ./unetbootin-freebsd70*.sh installmode=usbdrive targetpartition=/dev/sdX1 formatpartition=yes|no Be sure you know which /dev entry your USB drive is connected to and don’t overwrite your existing boot loader on your main disk. Read more

Things To Remember

Well I just spent the last hour trying to build the latest version of origami. Man, what a pain! I thought I’d quickly jot down the few things that I learned so that I will (hopefully) not repeat those mistakes again! origami.docs only needs a list of the docs, not the destination directory. lintian tells you how to fix the problem. Pay attention and read! spell “licenses” correctly if you’re going to refer to “common-licenses” At this point it looks like the only thing I have left to create is a man page and, according to lintian, origami will be error-free. Anyone know how’n the hell to do that? 🙂 Until I figure that out I’m going to take this debian/ directory and save it in a bzr branch so if I get lost again I have a good, valid, working copy. Big thanks to LaserJock for the help today! Read more