I'm new to this list, so here's a hello, how are you to everyone on the list! I'm coming to FreeBSD from a Linux background, so whilst some things are pretty similar, some things are pretty different. Two questions to kickstart my participation on this list: 1.) How exactly do I know whether I am running the STABLE or CURRENT release, as when I run uname I can only see the following relevant info: FreeBSD server4.domain.info 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Sat Sep 23 13:52:48 UTC 2006 root@server4. <mailto:root@server4.e-webhost.info:/usr/src/sys/i386/compile/SERVER4> domain.info:/usr/src/sys/i386/compile/SERVER4 i386 And which file do I change to use a different release, and how must I update the system to pull in this latest release? 2.) I'm a bit confused as to updating the system. As I understand, there are 3 areas which require updates: i. Ports ii. Security updates iii. Kernel updates I know how to perform the first two, but for kernel updates I can't seen to find a consistent unified method with talk of the "traditional" way and the "latest" way. What is the best way to keep my FreeBSD 6.x system up2date? 3.) One of my new FreeBSD 6.0 servers went down recently. This was odd as the actual server was hardly busy, but filesystem errors came up when booting up the server. After running fsck, server would be up for about an hour and then go down again. This kept happening and so I initially thought it was due to overheating. However cooling was all good, so after further investigation and googling I diagnosed the problem as being the background fsck which for some reason was failing, causing the server to shutdown and upon reboot requiring a manual fsck. I've fixed this by disabling the background fsck and forcing the bootup fsck in /etc/rc.conf. At least then if the server goes down again it will fix itself with a full fsck when booting up. My question is whether this is okay, and has anyone experienced this same problem with their system? And why has the background fsck been failing? Where can i find further info? Any help with these questions would be greatly appreciated. Regards, Suhail. www.siterollout.com <http://www.siterollout.com/>
SiteRollout.com wrote:> I'm new to this list, so here's a hello, how are you to everyone on the > list!Welcome!> I'm coming to FreeBSD from a Linux background, so whilst some things are > pretty similar, some things are pretty different.Excellent!> 1.) How exactly do I know whether I am running the STABLE or CURRENT > release, as when I run uname I can only see the following relevant info: > > FreeBSD server4.domain.info 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Sat Sep 23 > 13:52:48 UTC 2006 root@server4. > <mailto:root@server4.e-webhost.info:/usr/src/sys/i386/compile/SERVER4> > domain.info:/usr/src/sys/i386/compile/SERVER4 i386You would be running -RELEASE, which is a snapshot of -STABLE at a particular point in time (Someone correct me if i'm wrong).> And which file do I change to use a different release, and how must I update > the system to pull in this latest release?http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html is a good starting point, I recommend you read the handbook entirely at least once!> 2.) I'm a bit confused as to updating the system. As I understand, there are > 3 areas which require updates: > > i. Ports > ii. Security updates > iii. Kernel updates > > I know how to perform the first two, but for kernel updates I can't seen to > find a consistent unified method with talk of the "traditional" way and the > "latest" way. What is the best way to keep my FreeBSD 6.x system up2date?The "kernel" updates are all part of the cvsup process, as its including in -src, you base system and kernel must always be in line, its not "modular" like Linux is.> 3.) One of my new FreeBSD 6.0 servers went down recently. This was odd as > the actual server was hardly busy, but filesystem errors came up when > booting up the server. After running fsck, server would be up for about an > hour and then go down again. This kept happening and so I initially thought > it was due to overheating. However cooling was all good, so after further > investigation and googling I diagnosed the problem as being the background > fsck which for some reason was failing, causing the server to shutdown and > upon reboot requiring a manual fsck. > > I've fixed this by disabling the background fsck and forcing the bootup fsck > in /etc/rc.conf. At least then if the server goes down again it will fix > itself with a full fsck when booting up. My question is whether this is > okay, and has anyone experienced this same problem with their system? And > why has the background fsck been failing? Where can i find further info? > > Any help with these questions would be greatly appreciated. > > Regards, > Suhail.Thanks, Joe -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 250 bytes Desc: OpenPGP digital signature Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20061026/de45f851/signature.pgp
SiteRollout.com wrote:> Two questions to kickstart my participation on this list: > > 1.) How exactly do I know whether I am running the STABLE or CURRENT > release, as when I run uname I can only see the following relevant info: > > FreeBSD server4.domain.info 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Sat Sep 23 > 13:52:48 UTC 2006 root@server4. > <mailto:root@server4.e-webhost.info:/usr/src/sys/i386/compile/SERVER4> > domain.info:/usr/src/sys/i386/compile/SERVER4 i386You are running 6.0-RELEASE. The current release is 6.1 - 6.2 is coming out soon[tm]. CURRENT is bleeding-edge development - you perhaps won't run it on a production server as it may crash at some point in time due to new features ;)> And which file do I change to use a different release, and how must I update > the system to pull in this latest release?You use cvsup(1) to update your local source-tree (and the ports-collection). In cvsup's configuration file(s), you specify what `version' of FreeBSD (RELEASE, STABLE, CURRENT) you want. ;)> 2.) I'm a bit confused as to updating the system. As I understand, there are > 3 areas which require updates: > > i. Ports > ii. Security updates > iii. Kernel updates > > I know how to perform the first two, but for kernel updates I can't seen to > find a consistent unified method with talk of the "traditional" way and the > "latest" way. What is the best way to keep my FreeBSD 6.x system up2date?The latter.> 3.) One of my new FreeBSD 6.0 servers went down recently. This was odd as > the actual server was hardly busy, but filesystem errors came up when > booting up the server. After running fsck, server would be up for about an > hour and then go down again. This kept happening and so I initially thought > it was due to overheating. However cooling was all good, so after further > investigation and googling I diagnosed the problem as being the background > fsck which for some reason was failing, causing the server to shutdown and > upon reboot requiring a manual fsck. > > I've fixed this by disabling the background fsck and forcing the bootup fsck > in /etc/rc.conf. At least then if the server goes down again it will fix > itself with a full fsck when booting up. My question is whether this is > okay, and has anyone experienced this same problem with their system? And > why has the background fsck been failing? Where can i find further info?Have you tried fscking your disks in single-user mode? And as Joe already said: Read The Handbook - it answers a lot of questions (if not all). :) You should have a local copy of it in /usr/share/doc/handbook/ HTH, Philipp -- www.familie-ost.info/~pj
SiteRollout.com wrote:> 1.) How exactly do I know whether I am running the STABLE or CURRENT > release, as when I run uname I can only see the following relevant info: > > FreeBSD server4.domain.info 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Sat Sep 23 > 13:52:48 UTC 2006 root@server4. > <mailto:root@server4.e-webhost.info:/usr/src/sys/i386/compile/SERVER4> > domain.info:/usr/src/sys/i386/compile/SERVER4 i386If you installed from an release CD, you're running release, and will by default continue to run it until you manually upgrade. A computer running stable would print something like this for uname: FreeBSD lara.xx.xx 6.1-STABLE FreeBSD 6.1-STABLE #11: Wed Sep 6 17:57:59 CEST 2006 ivoras@lara.xx.xx:/usr/obj/usr/src/sys/LARA i386 And a computer running CURRENT would say: FreeBSD server.xx.xx 7.0-CURRENT FreeBSD 7.0-CURRENT #3: Thu Oct 23 10:28:46 CEST 2006 person@server.xx.xx:/usr/obj/usr/src/sys/GW i386 Note that "RELEASE", "STABLE" and "CURRENT" are only common names for specific branches. There are plenty of documentation on which is which, but the short and dirty version is: RELEASE versions are officially meant to be widely used and have gone through testing before published. STABLE is the "low-risk development" branch, and from time to time the STABLE branch is frozen and a new release created from this branch (e.g. 6.0, 6.1, 6.2 are releases from 6-STABLE). CURRENT is bleeding edge, may cause your computer to explode, etc. Periodically, a CURRENT branch will be re-designated as STABLE and a new CURRENT will be started (thus in the future there will be 7-STABLE, 7.0-RELEASE and 8.0-CURRENT). In addition to those exist obsolete STABLE branches not meant to be used on new installations (now obsoleted are 4-STABLE and 5-STABLE, in the future when 7.x becomes STABLE, 6-STABLE will be one of the obsolete branches).> And which file do I change to use a different release, and how must I update > the system to pull in this latest release?1. Install cvsup (or more likely cvsup-without-gui) 2. Copy /usr/share/examples/cvsup/*supfile to /etc/ 3. Edit those file to change the cvsup server name (see handbook for available servers) and version you want to upgrade to 4. Run cvsup on those file(s)> 2.) I'm a bit confused as to updating the system. As I understand, there are > 3 areas which require updates: > > i. Ports > ii. Security updates > iii. Kernel updatesSecurity updates and kernel updates are the same, all updated with a single cvsup. This updates everything shipped with FreeBSD by default (including kernel). Study carefully what is and what is not a part of the default ("base") system - for example sshd, sendmail and bind are in it, but procmail or apache are not. There are no separate packages for applications in the base system. Ports (i.e. third party applications, which is everything from apache to vim to zsh) are updated separately. The ports tree (which contains ports/packages definitions) is updated with cvsup or portsnap, and then individual packages can be updated either manually or with portupgrade.> I know how to perform the first two, but for kernel updates I can't seen to > find a consistent unified method with talk of the "traditional" way and the > "latest" way. What is the best way to keep my FreeBSD 6.x system up2date?Edit /etc/standard-supfile (as described in the steps above), run `cvsup /etc/standard-supfile`, cd to /usr/src and run: # make buildworld <-- this will compile the userland ("base" system) # make buildkernel <-- this will compile the kernel. See manual about how to create and specify kernel config file. # make installkernel <-- this will install the kernel # make installworld <-- this will install the userland Those are the instructions for the latest recommended way to do it. To complete the upgrade, you'll need to run `mergemaster` - read about it in handbook and its man page. Mostly you can upgrade the system without problems while running in multiuser/production mode (except of course for reboots to load the new kernel and deamons), but the official way is to do it in single user mode and with several passes of mergemaster.> 3.) One of my new FreeBSD 6.0 servers went down recently. This was odd as > the actual server was hardly busy, but filesystem errors came up when > booting up the server. After running fsck, server would be up for about an > hour and then go down again. This kept happening and so I initially thought > it was due to overheating. However cooling was all good, so after further > investigation and googling I diagnosed the problem as being the background > fsck which for some reason was failing, causing the server to shutdown and > upon reboot requiring a manual fsck.See if you're low on disk space. AFAIK there was a problem in 6.0 (and maybe 6.1?) with background fsck (actually, the snapshot feature) when disk space is low. Of course, there also might be a hardware failure somewhere. If/when you get comfortable with FreeBSD, it would be beneficial if you created a simple article or howto describing your experiences, what you like and dislike about it and your learning process. have fun!
On Thu, Oct 26, 2006 at 12:32:43PM +0100, SiteRollout.com wrote:> I'm new to this list, so here's a hello, how are you to everyone on the > list!Welcome! <snip>> And which file do I change to use a different release, and how must I update > the system to pull in this latest release? > > 2.) I'm a bit confused as to updating the system. As I understand, there are > 3 areas which require updates: > > i. PortsYou could use portsnap(1) to keep your ports database up to date.> ii. Security updates > iii. Kernel updates > > I know how to perform the first two, but for kernel updates I can't seen to > find a consistent unified method with talk of the "traditional" way and the > "latest" way. What is the best way to keep my FreeBSD 6.x system up2date?This is covered in the handbook, and at the end of /usr/src/UPDATING. FreeBSD updates both the kernel and the base system. Basically, 1) cvsup(1) your source to RELENG_6 (for STABLE) or RELENG_6_1 for just security updates. 2) Create a custom kernel config file, if needed, and put it in /usr/src/sys/<ARCH>/conf/FOO for example. 3) cd /usr/src; 4) make buildworld 3) make kernel # Add 'KERNCONF=FOO' to use your configuration. 4) reboort into single user mode 5) mergemaster -p 6) cd /usr/src; make installworld 7) mergemaster 8) reboot Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20061026/0dd2136d/attachment.pgp
Many thanks for all the replies guys. I used the following method pasted below remotely without having to boot up in single user mode and it worked fine to upgrade from 6.0 to 6.1/6.2, so I'm sharing with all in case anyone needs to do the same. However I want to downgrade from 6.2 PRERELEASE to 6.1 as I'm getting this message on one server: This system is running FreeBSD 6.2-PRERELEASE. FreeBSD Update is only designed to track FreeBSD Security and Errata branches and cannot update this system 1.) Do I need to downgrade to get the latest security updates? 2.) Can I "rm -fr /usr/src/" to delete everything and pull the latest files via cvsup again to perform a clean install of 6.0 STABLE(which is currently 6.1) ###################################################### ==============================Remote server system upgrade: ============================== Edit cvsupfile # nano /etc/cvsupfile *default host=cvsup2.FreeBSD.org *default base=/usr *default prefix=/usr *default release=cvs *default tag=none *default delete use-rel-suffix *default tag=RELENG_6 src-all ports-all doc-all # cvsup -g -L2 /etc/cvsupfile # make buildworld Now edit a custom kernel if you need to make specific changes # uname -a FreeBSD server9.site-rollout.co.uk 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Nov 5 04:19:18 UTC 2004 root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 # cd /usr/src/sys/i386/conf # cp GENERIC FOOBAR # cd /usr/src/ # make buildkernel KERNCONF=FOOBAR # make installkernel KERNCONF=FOOBAR Lets backup your existing /etc directory just incase something goes wrong. # cp -Rp /etc /home/backupetc # mergemaster -p Add following entry to /etc/groups if it doesn't exist audit:*:77: # make installworld Now all of the system userland will be installed. This will take 5-10 mins or less. Once the system userland has been installed you need to do the most important step and also most confusing at times. You need to run 'mergemaster' # mergemaster You will see the mergemaster application start comparing your existing /etc directory config files and passwd and group files and other files and it will start prompting you if you want to either install the files or delete them or merge them. For the majority of the files you can just tell them to safely install. DO NOT EVER INSTALL A NEW master.passwd, passwd or group files. You also be careful about replacing the /etc/mail/aliases and /etc/rc.firewall firewall file if you have a custom IPFW firewall created. If you do you will lock yourself out. If you do happen to install a new password file you will need copy back your old one from the backup you just made. % At prompt asking you what you to do or showing you part of a file. Press 'q' and then 'i' to install the file or 'd' to delete it. Just select 'q' and then 'i' for the most of them except the files I mentioned above or any other files you have edited with custom entries for your system. You will then be prompted to build the new device tree if you installed the MAKEDEV during mergemaster ( you should have ) select 'y' and let it build. It will then maybe ask you to rebuild the 'aliases' file. Select 'y' After that it will ask you if you want to delete the temp root directory. Select 'y'. You now have a updated system and need to reboot. Be sure to reboot shortly or it will cause possbile problems if you do this from a remote host. # shutdown -r +1 The system will reboot and you can login and startup any services that you need to. If the system does not come back up and you have tried installing a firewall have a technician look at the local console and tell them to soft reboot the server with 'ctrl + alt + del'. When he system is booting up you can tell it you want load a custom kernel by pressing any key other then 'enter' when prompted. Then you type. % unload % boot kernel.GENERIC or % boot kernel.old % boot kernel.prev This depends on what your old kernel file was called most systems will have a kernel.GENERIC on them unless you removed it. That will get the system backup and you can fix any errors with the firewall. Finally, delete any unwanted files in /user/ ######################################################