Note: I have not seriously touched NetBSD since I wrote this.  I would expect that it is greatly different now.

NetBSD is another free Unix. It differs from most operating systems in that it’s primary purpose is not to be neat or easy to use. Instead, it intended to run on as many different platforms as possible. I started playing around with it because I had a laptop (Gateway Solo) that had a PCMCIA bus and a sound card that were not recognized by most other operating systems. NetBSD recognized them easilly and installed like a dream. There were, however, some post configuration steps remaining to be done.

  • After the install, you need to manually mount / and /usr.
  • After the install, my laptop got confused with the ethernet cards, and I had to copy /etc/ifconfig.ne2 to /etc/ifconfig.ne0
  • For some reason, networking information is stored in /etc/rc.conf.
    • I had to add ifconfig_ne0=”inet freebsd.starmind.org netmask 255.255.255.0″ above the other network information.
  • There is a root and toor user, both with root privs.
  • You can turn on root’s ability to login in /etc/ssh/sshd_config
  • Before sshd can be run, you must first generate keys and set it to auto launch:
    • ssh-keygen -f /etc/ssh/ssh_host_key -t rsa
    • ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa
    • ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa
    • echo ‘sshd=YES sshd_flags=””‘ >> /etc/rc.conf
  • Before installing software, add the following line to .profile: export PKG_PATH=ftp://ftp.netbsd.org/pub/NetBSD/packages/1.6.1/i386/All
  • Use pkg_add to add the following packages: bash, ncurses, vorbis-tools, esound, libvorbis, libogg, mp3blaster, wget, aumix
  • If clicks in sound playback gets annoying, add the following to the spawn options section of /usr/pkg/etc/esd.conf: -b -r 44000
  • Yes, I had to build a kernel here too, without doing so, the ESS sound system played only at half speed.
    1. mkdir /root/rebuild-kernel
    2. cd /root/rebuild-kernel
    3. wget ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/source/sets/syssrc.tgz
    4. cd /
    5. tar xvfz /root/rebuild-kernel/syssrc.tgz
    6. cd /usr/src/sys/arch/i386/conf
    7. cp GENERIC_LAPTOP CUSTOM_LAPTOP
    8. vi CUSTOM_LAPTOP
      • Make the changes you wish, in my case, I did:
      • Uncommented ess* and ess0
      • Commented out all other audio systems
    9. config CUSTOM_LAPTOP
    10. cd ../compile/CUSTOM_LAPTOP
    11. make depend
    12. make
    13. cp /netbsd /netbsd.generic_laptop
    14. cp netbsd /netbsd.custom_laptop
    15. cp netbsd /netbsd
    16. reboot
    17. cd /dev
    18. sh MAKEDEV all
  • When using mp3blaster to play music, volume doesn’t work right, so we use mixerctl -w outputs.master=200,200 to set the volumes and never touch them again.
  • Since my file server is auto mounting via /etc/fstab, use the following cron call to make playlists: 0 2 * * * for i in `ls /mnt/public/mp3s/`; do find /mnt/public/mp3s/$i/* > “/home/guppie/$i.playlist”; done