First of all, let me thank everyone who has responded to my questions
on this mailing list.
Hi Giorgos,
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...
Thank you for taking time to write a detailed response.
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.
Yes it is. I have friends who are happy doing dist-upgrades with one
command. But I have been using Fedora from the beginning and I have
had a few bad experiences with distribution upgrades leaving me to
spend more time fixing the problems. I have decided not to risk
upgrades after Fedora Core 4 and two years down the line I think it is
a good decision with a few side effects, mainly keeping pace with
newer versions of packages of interest.
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.
Should one risk losing the data or should one be able to debug
reliably? I think letting the user decide on this option is a better
solution than not implementing SysRq at all. But after reading the
mailing lists, I got a feeling that most experienced FreeBSD users
don't really need the SysRq feature. However I still don't understand
how the data is safe even if one enables SoftUpdate with disk caching
disabled.
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.
So I believe each gcc port keeps track of various dependencies and
their versions for a chosen gcc version. However if I need gcc40 (lets
say, not available from ports) or if I need to enable certain features
that ports disable then I guess I am on my own in that there are no
guarantees that it will compile.
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-updateformat=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