Posts

Showing posts matching the search for freebsd

Finding the Name of FreeBSD Packages to Install

Image
I usually install FreeBSD applications using the ports system, but I wanted to know how to use the package collection as well. I wondered how to quickly locate the name and URL of a package so I could pass them as a parameter to pkg_add -r . Using this command FreeBSD fetches the package specified and installs any dependencies automatically. I found the answer at the FreeBSD Ports Changes page. Here you can query for a package (or port) by name, and more importantly, specify which distribution you want. For example, if you wanted to install Nessus, you could choose from: FreeBSD 4.9 RELEASE: packages created when 4.9 REL was announced FreeBSD 4.x STABLE: the most up-to-date packages built for FreeBSD 4-stable FreeBSD 5.1 RELEASE: packages created when 5.1 REL was announced FreeBSD 5.x CURRENT: the most up-to-date packages built for FreeBSD 5-current Let's say I wanted to install Nessus. What do these packages look like for the i386 architecture? FreeBSD 4.9 RELEASE : nessu...

Updating FreeBSD 7.0-BETA2 to 7.0-BETA3

Image
Recently I posted FreeBSD Binary Upgrade News about developments with Colin Percival's FreeBSD Update tool. Today I performed a remote (via SSH) upgrade from FreeBSD 7.0-BETA2 to FreeBSD 7.0-BETA3 using FreeBSD Update. I document the process below so you can see how easy it is and for my future reference. Here is uname output to show the OS version prior to upgrading. # uname -a FreeBSD myhost.mydomain.com 7.0-BETA2 FreeBSD 7.0-BETA2 #0: Fri Nov 2 16:47:33 UTC 2007 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 I wasn't sure if the version of FreeBSD Update packaged with FreeBSD 7.0-BETA2 would natively support this process, so I gave it a try. # freebsd-update -r 7.0-BETA3 upgrade usage: freebsd-update [options] command ... [path] Options: -b basedir -- Operate on a system mounted at basedir (default: /) -d workdir -- Store working files in workdir (default: /var/db/freebsd-update/) -f conffile -- Read confi...

Upgrading FreeBSD 7.0 to 7.1

Image
My last post on upgrading FreeBSD was Updating FreeBSD 7.0-BETA2 to 7.0-BETA3 . In this post I'll describe how I migrated a test install of FreeBSD 7.0-RELEASE #0 to FreeBSD 7.0-RELEASE-p7 #0, and then from there to FreeBSD 7.1-RELEASE #0. Here's what I started with. neely# uname -a FreeBSD neely.taosecurity.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 To update to the latest version of 7.0, I ran freebsd-update. First I run without switches to show available options. neely# freebsd-update usage: freebsd-update [options] command ... [path] Options: -b basedir -- Operate on a system mounted at basedir (default: /) -d workdir -- Store working files in workdir (default: /var/db/freebsd-update/) -f conffile -- Read configuration options from conffile (default: /etc/freebsd-update.conf) -k KEY -- Trust an RSA key with SH...

Answering PHK's "Why Bother?" with FreeBSD Question

Image
In the October issue of Daemon News , Poul-Henning Kamp asks "Why Bother?" He wants to know why people use FreeBSD when Linux gets most of the attention from users and vendors. He also wants to know why developers should continue to work on FreeBSD. I will tailor my response for FreeBSD, as that is the BSD with which I am most familiar. Some of my arguments will apply to other variants. Some of my reasons even apply to other open source operating systems, like Linux. Few will apply to closed operating systems, least of which Windows. 1. FreeBSD is open source , with a business-friendly license . Being an open source, BSD-licensed operating system means I am free to modify the OS as I see fit and can continue to support and evolve any part of it, should the official developers decide to abandon any aspect of the project. I can use FreeBSD in commercial projects as long as I retain the copyright notice and disclaimer with the product. 2. FreeBSD is an integrated, co...

FreeBSD Post-Installation Tasks

Image
Last night I installed FreeBSD 5.4 on my Dell PowerEdge 2300 server. Immediately following the installation, these are the tasks I performed. These are the same post-installation tasks I perform, in the same order, on every FreeBSD system I build. 1. When I install FreeBSD, I create a user and give him the /bin/sh shell. I used Linux before I used FreeBSD, and I remain more familiar with bash . Therefore, I install the most recent package available. I do this using the PACKAGESITE environment variable. Notice how pkg_add satisfies dependencies automatically. $ su - Password: janney# setenv PACKAGESITE ftp://ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/Latest/ janney# pkg_add -r bash Fetching ftp://ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/ Latest/bash.tbz... Done. Fetching ftp://ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/ All/libiconv-1.9.2_1.tbz... Done. Fetching ftp://ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/ Al...

Using fastest_cvsup and freebsd-update Tools

Image
While reading a OSNews thread on FreeBSD 4.9, I heard of a tool called fastest_cvsup . You use it in conjunction with cvsup on FreeBSD, NetBSD, and OpenBSD to find the "fastest" source distribution site. I use it in a shell script to update one of my boxes like this: #!/bin/sh # Ports updater by Richard Bejtlich # 0925 07 Nov 03 SERVER=`fastest_cvsup -q -c us` echo "cvsup -g -L 2 -h $SERVER /usr/local/etc/ports-supfile" cvsup -g -L 2 -h $SERVER /usr/local/etc/ports-supfile echo "cd /usr/ports; make index" cd /usr/ports make index echo "portsdb -u" portsdb -u echo "cd /var/db" cd /var/db echo "pkgdb -F" pkgdb -F echo "portversion -v" portversion -v echo "portupgrade -PrRva" portupgrade -PrRva echo "Done updating ports tree at `/bin/date`." exit I changed my portsdb instruction after reading this thread . This article and this thread have tips too. I also gave freebsd-update a try. It'...

Upgrading FreeBSD Packages with Portupgrade and without CVSup

freebsd.png" align=left>As much as I like FreeBSD's ports system, I dislike keeping the tree up-to-date using CVSup . I haven't yet tried Colin Percival's portsnap tool, which uses HTTP to distribute compressed and cryptographically signed snapshots of the ports tree. This is a great alternative, but I try to avoid compiling from source using the ports tree when possible. I run several very generic and slow systems, and I'd much rather install and upgrade software using precomplied packages. Portupgrade is the tool of choice to update software on FreeBSD. Portupgrade is powerful because it can (far more often than not) resolve dependencies to upgrade software en masse. It doesn't matter if an application is installed via ports or precompiled packages. Once installed, FreeBSD treats it like a package using tools like pkg_info . When invoked with the -PP switch, portupgrade can be told to only upgrade installed software by using packages. This avoi...

Splunk on FreeBSD 7.0

Image
Although there is not a version of Splunk compiled natively for FreeBSD 7.0, I was told to try using Splunk 3.4.1 on FreeBSD 7.0 via FreeBSD's compat6x libraries. I did the following: freebsd70:/usr/local/src# pkg_add -v splunk-3.4.1-45588-freebsd-6.1-intel.tgz Requested space: 106458852 bytes, free space: 1565927424 bytes in /var/tmp/instmp.HhNhQk Running pre-install for splunk-3.4.1-45588-freebsd-6.1-intel.. extract: Package name is splunk-3.4.1-45588-freebsd-6.1-intel extract: CWD to /opt extract: /opt/splunk/README.txt extract: /opt/splunk/bin/btool extract: /opt/splunk/bin/bunzip2 ...edited... extract: /opt/splunk/splunk-3.4.1-45588-FreeBSD-i386-manifest extract: CWD to . Running post-install for splunk-3.4.1-45588-freebsd-6.1-intel.. ---------------------------------------------------------------------- Splunk has been installed in: /opt/splunk To start Splunk, run the command: /opt/splunk/bin/splunk start To use the Splunk Web interface, point your browser...

Binary Upgrade of FreeBSD 6.0 to 6.1

Image
Several months ago I posted how I used Colin Percival's freebsd-update program to perform a binary upgrade from FreeBSD 5.4 to 6.0 remotely over SSH. Thanks to Colin's latest work , I was able to successfully perform a binary upgrade from FreeBSD 6.0 to 6.1 remotely over SSH. hacom:/root/upgrade# uname -a FreeBSD hacom.taosecurity.com 6.0-SECURITY FreeBSD 6.0-SECURITY #0: Tue Apr 18 08:56:09 UTC 2006 root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 hacom:/root# fetch http://www.daemonology.net/freebsd-upgrade-6.0-to-6.1/upgrade-6.0-to-6.1.tgz upgrade-6.0-to-6.1.tgz 0% of 4706 kB hacom:/root# sha256 upgrade-6.0-to-6.1.tgz SHA256 (upgrade-6.0-to-6.1.tgz) = 29075fc5711e0b20d879c69d12bbe5414c1c56d597c8116da7acc0d291116d2f hacom:/root# tar -xzvf upgrade-6.0-to-6.1.tgz x upgrade x upgrade/upgrade.sh x upgrade/6.1-index x upgrade/6.0-index hacom:/root# cd upgrade hacom:/root/upgrade# ./upgrade.sh^M^M Examining system... done. The followin...

Save the FreeBSD Mascot and Create a Logo

Image
I learned of the furor over the upcoming FreeBSD logo contest by reading the recent Slashdot thread bearing the unfortunate title "FreeBSD Announces Contest To Replace Daemon Logo." There is no replacement going on. As I've written previously , FreeBSD has no logo . FreeBSD has a mascot, "Beastie" the daemon. Core team member Robert Watson has affirmed this , and I believe the forthcoming announcement at FreeBSD logo contest willl make this point crystal clear. The new contest is designing a logo to complement the Beastie mascot, not replace or remove him. A few people ( here , here , and here ) demonstrate an understanding of the difference between a logo and a mascot and have been brave enough to speak up. Unfortunately, the FUD is already flying. Kon Wilms started the Help Save the FreeBSD Mascot online petition and has enjoyed a healthy number of sign-ups. I've started a Save the FreeBSD Mascot and Create a Logo petition to counter Mr. Wilm...

Dual-boot FreeBSD 5.3 and Windows 2000

For my testing of FreeBSD 5.3 before it's available as a RELEASE, I decided to work on dual-booting it with Windows 2000. I did not want to use any third-party boot loaders unless absolutely necessary. I preferred to use the FreeBSD boot loader as FreeBSD is the primary OS on my Thinkpad a20p. Unfortunately, I could not figure out a way to overcome the different ways Windows and FreeBSD see disk geometry while using the FreeBSD boot loader. The following describes how to dual-boot FreeBSD 5.3 and Windows 2000 with Windows in the Master Boot Record handling boot selection. I found these notes helpful although I did not following all of the author's recommendations. First I installed Windows 2000 in a 7427 MB C: partition, formatted as NTFS. I also created a 30727 MB D: partition to hold FreeBSD, although I only let the Windows installation process create the partition and nothing more. Next I began the FreeBSD installation process using a CD-ROM. When it came time to p...

Binary Upgrade of FreeBSD 6.1 to 6.2

Image
Last year I described performing a binary upgrade of FreeBSD 6.0 to 6.1. Today I tried a similar process for FreeBSD 6.1 to 6.2, using Colin Percival 's instructions for 6.1 to 6.2-RC1. shuttle01# mkdir /usr/upgrade shuttle01# cd /usr/upgrade shuttle01# fetch http://www.daemonology.net/freebsd-update/upgrade-to-6.2.tgz upgrade-to-6.2.tgz 100% of 18 kB 120 kBps shuttle01# tar -xzf upgrade-to-6.2.tgz shuttle01# cd upgrade-to-6.2 shuttle01# sh freebsd-update.sh -f freebsd-update.conf -d /usr/upgrade -r 6.2-RELEASE upgrade Looking up update.FreeBSD.org mirrors... 1 mirrors found. Fetching public key from update1.FreeBSD.org... done. Fetching metadata signature for 6.1-RELEASE from update1.FreeBSD.org... done. Fetching metadata index... done. Fetching 2 metadata files... done. Inspecting system... done. The following components of FreeBSD seem to be installed: kernel/smp world/base world/dict world/doc world/manpages The following components of FreeBSD...

Trying to Add Updated Packages on FreeBSD 5.3 RELEASE

Image
If you're trying to add packages shipped with FreeBSD 5.3 RELEASE, it's fairly easy, as shown in my earlier post . As long as you're running FreeBSD 5.3 RELEASE, however, pkg_add will continue to install packages shipped with that version. To avoid building new software from source using the ports tree, you might want to update an application using a new precompiled package. At the moment, however, the FreeBSD FTP sites are not offering newer packages for FreeBSD 5.3 RELEASE. They are only providing packages shipped with 5.3 RELEASE. Here is today's contents of ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386 lrwxrwxrwx 1 0 0 20 Jul 14 23:29 #cvs.cvsup-37462.728 -> packages-5.1-release lrwxrwxrwx 1 0 0 15 Jul 14 23:29 packages -> packages-stable lrwxrwxrwx 1 0 0 17 Jul 14 23:29 packages-4-current -> packages-4-stable drwxrwxr-x 93 110 0 2048 Oct 16 07:18 packages-4-stable drwxrwxr-x 92 110 0 2048 Oct 25 03:24 packages-4.10-re...

Using Binary Security Updates for FreeBSD and OpenBSD

Image
A few security advisories for FreeBSD and OpenBSD were announced. The latest for FreeBSD involves the System V Shared Memory interface . If you're running a GENERIC kernel you may be able to use Colin Percival's binary updates , like this: bourque# uname -a FreeBSD bourque.taosecurity.com 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Mon Oct 27 17:51:09 GMT 2003 root@freebsd-stable.sentex.ca:/usr/obj/usr/src/sys/GENERIC i386 bourque# freebsd-update -v fetch Fetching updates signature... Fetching updates... Fetching hash list signature... Fetching hash list... Examining local system... Fetching updates... /kernel... /kernel.GENERIC... Updates fetched To install these updates, run: '/usr/local/sbin/freebsd-update install' bourque# freebsd-update -v install Backing up /kernel... Installing new /kernel... Backing up /kernel.GENERIC... Installing new /kernel.GENERIC... ...reboot... -bash-2.05b$ uname -a FreeBSD bourque.taosecurity.com 4.9-SECURITY FreeBSD 4.9-SECURITY #0: Th...

Ways to Install FreeBSD

Image
While perusing the newgroups at unix.derkeiler.com , I learned a new way to get FreeBSD. The FreeBSD Project publishes .iso images of its release software, like 4.9 REL or 5.1 REL. Easy enough. Mirrors for these distributions are available at FreeBSD mirrors . However, I discovered the FreeBSD Snapshots site offers .iso images of the latest version of each tree, e.g., 4-stable and 5-current. You can download the .iso and finish with a system running the newest FreeBSD, assuming they work on your hardware. If you're more conservative, they maintain a "security release" of the 4.8 distribution as well, which right now is 4.8-RELEASE-p13. You can even finger their server to learn the newest builds available there: finger @snapshots.jp.freebsd.org [snapshots.jp.freebsd.org] FreeBSD/i386: The latest version of FreeBSD -CURRENT is: 5.2-CURRENT-20031227-JPSNAP The latest version of FreeBSD 4-STABLE is: 4.9-STABLE-20031202-JPSNAP FreeBSD/alpha: The latest version of FreeB...