From owner-freebsd-questions@FreeBSD.ORG Sat Aug 9 01:28:31 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E96CE1065670 for ; Sat, 9 Aug 2008 01:28:31 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 7D3A48FC0A for ; Sat, 9 Aug 2008 01:28:31 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl19-159.kln.forthnet.gr [77.49.146.159]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id m791SBOL017469 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 9 Aug 2008 04:28:18 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m791SB6i066253; Sat, 9 Aug 2008 04:28:11 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m791S9Eg066082; Sat, 9 Aug 2008 04:28:09 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: "Krishna Mohan Gundu" References: <70ec82800808072020h5aafa48axe4140c5eeb229854@mail.gmail.com> Date: Sat, 09 Aug 2008 04:28:08 +0300 In-Reply-To: <70ec82800808072020h5aafa48axe4140c5eeb229854@mail.gmail.com> (Krishna Mohan Gundu's message of "Thu, 7 Aug 2008 23:20:08 -0400") Message-ID: <873alf9duf.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: m791SBOL017469 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.822, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.58, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: A few questions from a current linux user X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Aug 2008 01:28:32 -0000 On Thu, 7 Aug 2008 23:20:08 -0400, "Krishna Mohan Gundu" wrote: > Hi, > I am currently using Fedora Core 4 linux distribution for my everyday > needs like programming, checking emails etc on my two year old HP > laptop. I feel that time has come for me to move away from Fedora. I > wasted a lot of time compiling libraries and their dependencies. I > could benefit from better packaging systems that come with systems > like FreeBSD. Hi Krishna, I've been meaning to respond to this post for a couple of days, but it took me a little longer than I originally hoped... This may be totally unrelated to the real question, but doesn't Fedora use pre-compiled packages by default? I thought that was pretty much the One True Way(TM) of updating Fedora systems. > I tried to gather as much information as I could from the > documentation available on freebsd.org, but the following questions > remain unanswered. I would be glad if you can take time to educate me > > 1) Is a feature similar to magic SysRq in linux necessary for FreeBSD? > (As I understand there is no such feature in FreeBSD) Not really. SysRq has a few nice characteristics, i.e. it can unmount local filesystems gracefully to avoid `fsck' runs during the next boot. It's a nice, handy tool in some cases. But it also comes at a cost: it modifies the in-memory state of the running kernel. FreeBSD has a kernel debugger that can be enabled, called DDB. When the kernel locks up or panics because something bogus happened, the DDB can dump the state of the kernel into a preconfigured swap area, and the startup scripts of the next boot will pick up the kernel coredump from swap, save it in `/var/crash', and let you run post-mortem analysis on the kernel core dump. If this is combined with something like SysRq, and there's really a bug in the parts of the kernel that SysRq has to use to perform its final steps, you lose. You may be modifying the parts of the kernel memory that actually exhibit the bug, and make the kernel dump unusable. > 2) Is it possible to compile multiple versions of gcc? If so what is > the best way to do it? Yes, of course. The "base system" of FreeBSD includes _one_ version of gcc, installed as `/usr/bin/gcc', but this does not mean that you are limited to *that* version only. You can use the Ports tree to install one or more versions. The snapshot of Ports I have on the laptop I am using to type this includes 12 different gcc ports (and that does not include the Fortran, Objective C, or Java backends GCC supports): # pwd /usr/ports/lang # ls -ld gcc* | nl 1 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc-ooo 2 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc28 3 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc295 4 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc32 5 drwxr-xr-x 3 root wheel - 512 Jul 22 05:03 gcc33 6 drwxr-xr-x 3 root wheel - 512 Jul 29 04:46 gcc34 7 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc41 8 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc41-withgcjawt 9 drwxr-xr-x 3 root wheel - 512 Jul 22 05:03 gcc42 10 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc42-withgcjawt 11 drwxr-xr-x 3 root wheel - 512 Jul 29 04:46 gcc43 12 drwxr-xr-x 3 root wheel - 512 Aug 7 02:25 gcc44 # So yes, you can install several different versions of GCC at the same time. > 3) Is it possible to perform a binary update from one release to > another? If so can you please point me to the documentation? How are > config files updated in this case? (Could not locate documentation on > binup) Yes. In recent FreeBSD releases, the "base system" of FreeBSD includes freebsd-update. This is a utility authored by Colin Percival, who is currently the Security Officer of FreeBSD, and a very smart fellow :) What freebsd-update does is described in its manpage http://www.freebsd.org/cgi/man.cgi?query=freebsd-update&format=ascii but the basic idea is that is can do one of the following things: * Download binary update packs in `/var/db/freebsd-update'. These are not installed immediatelly, so you can periodically pull the binary update files and install them later, when you have the time for an upgrade. The default `fetch' mode of `freebsd-update' downloads binary updates for the release & branch of FreeBSD that you have installed on the local system. Staying on the same branch has various advantages that are nicely described in the online article about ` * Download binary update packs for _upgrading_ to a new release. This is slightly different from an update that sticks to a single FreeBSD release-branch, and there are official release notes about the changes of every major release. They are published online at http://www.FreeBSD.org/releases/ Downloading the binary packs for new release still does *not* install or upgrade anything. * The final important feature of freebsd-update is that it can use the latest snapshots you have fetched in `/var/db/freebsd-update' to perform a binary upgrade of the FreeBSD base system. > 4) If a binary update leads to an unstable system, how easy it is to > backtrack to an earlier working version along with working config > files? That's probably not very easy. But freebsd-update is not really going to pull `unstable' stuff because of the way FreeBSD branches work. If you are following a ``FreeBSD-X.Y-STABLE'' release branch, it is pretty much a given that the source tree should build at all times, and that the resulting base system should be backwards compatible with all the binary programs that were produced in any version between the time ``FreeBSD-X.Y-RELEASE'' was cut and your -STABLE snapshot was built. Having said that, of course, using some sort of backup tool is never a bad idea. Even if freebsd-update does nothing to harm your FreeBSD installation, there are hardware failures, power outages at the worst possible moment, fat-fingered commands that remove or change slightly more files that originally intended, and so on. > 5) Does FreeBSD have support for PCMCIA-USB cards? Yes, FreeBSD supports PCMCIA (PC-CARD or Cardbus) and USB devices. FreeBSD includes drivers for various devices of these two types, but before buying a PC-CARD device you should always check to see if there is a `high level' driver for the one you are buying. The generic PC-CARD, Cardbus and USB layer of the FreeBSD kernel supports the common `base functionality' of attaching and detaching a device, but to get any random device to work you need a driver that recognizes it and attaches to it. This is a long way of saying that ``Yes, we have PCMCIA and USB support in the kernel, but you should first check the hardware compatibility lists and the manpages of your system to see if a particular device is supported at all, partially supported, or completely unsupported''. This may be tricky if you can only get hold of the device *after* buying it and unpacking it, but I've had various levels of success by asking at computer stores for a ``local test'' with my laptop. In some of the local places, I've had *very* helpful responses. The local sales people have often told me "We don't have an unpacked version of *that* today, but if you can wait until Monday, we are getting a new delivery. When we unpack a sample / demo of this particular card/adapter/gadget, you can definitely try it and see how things work." > PS: I am considering Debian as another alternative. Debian is a Linux distribution. A very good one too. If that fits your job better than FreeBSD does, it's definitely not a shame to use it. FreeBSD will still be around if you need it later :-) Finally, since you are coming from a Linux background, you should spend some time to check out the excellent documentation FreeBSD contributors have written over the years. There are lists of books and articles at http://www.freebsd.org/docs.html You should probably start with some of these: [1] "The FreeBSD Handbook" http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/index.html [2] "The FreeBSD FAQ (Frequently Asked Questions)" http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/index.html [3] "Choosing the FreeBSD Version That Is Right For You" http://www.freebsd.org/doc/en_US.ISO8859-1/articles/version-guide/index.html [4] "Explaining BSD" http://www.freebsd.org/doc/en_US.ISO8859-1/articles/explaining-bsd/index.html [5] "FreeBSD: An Open Source Alternative to Linux" http://www.freebsd.org/doc/en_US.ISO8859-1/articles/linux-comparison/index.html [6] "FreeBSD Quickstart Guide for Linux Users" http://www.freebsd.org/doc/en_US.ISO8859-1/articles/linux-users/index.html [7] "FreeBSD First Steps" http://www.freebsd.org/doc/en_US.ISO8859-1/articles/new-users/index.html