I've been away from *NIX a few years. I have been playing with FreeBSD for a week or so now with mixed results. I am using release 4.11 because for some reason 5.3 has problems seeing my hard drives. 4.11, Red Hat Linux and NetBSD have no such trouble. This afternoon I used the "Updating Sources with CVSup" in the FreeBSD Cheat Sheets and everything worked as advertized. I believe that it advised against using "make world" and suggested that I use "19.4.1 The Canonical Way to Update Your System" in the Handbook. I went through the following steps with no problem: # make buildworld # make installworld # mergemaster # reboot After that, I ran into problems. It took me a little while to figure out how to do "boot -s". However, it appears that a lot of the directories aren't mounted and the next scripts aren't in the path. For example, I can't figure out how to do the "mergemaster -p". Any help would be much appreciated. Jim Campbell
On Monday 18 April 2005 04:51 pm, Jim Campbell wrote:> I've been away from *NIX a few years. I have been playing with FreeBSD > for a week or so now with mixed results. I am using release 4.11 > because for some reason 5.3 has problems seeing my hard drives. 4.11, > Red Hat Linux and NetBSD have no such trouble. > > This afternoon I used the "Updating Sources with CVSup" in the FreeBSD > Cheat Sheets and everything worked as advertized. I believe that it > advised against using "make world" and suggested that I use "19.4.1 The > Canonical Way to Update Your System" in the Handbook. I went through > the following steps with no problem: > > # make buildworld > # make installworld > # mergemaster > # rebootThis is how I do it:> # make buildworld > # make buildkernel > # make installkernel > # reboot > # make installworld > # mergemaster > # reboot-Mike
Many thanks to all of you who very promptly gave me the information necessary to progress beyond this point. Even at 70, I continue to learn. I never know when I subscribe to a new list how newbie questions will be received. Based on this small sample, I am quite favorably impressed. Thanks again, Jim Campbell
> Many thanks to all of you who very promptly gave me the information > necessary to progress beyond this point. Even at 70, I continue to learn.Very impressive! Good luck. regards Claus
Jim Campbell <jim-c@charter.net> writes:>After that, I ran into problems. It took me a little while to figure >out how to do "boot -s". However, it appears that a lot of the >directories aren't mounted and the next scripts aren't in the path. For >example, I can't figure out how to do the "mergemaster -p".You don't have to do it in single user mode, I never did. I don't know why it is recommended that one boots in single user in the Makefile, perhaps to get a quiescent system without any users and services that would interfere. But that can also be achieved by stopping the high-volume services on the machine after booting, and on a personal machine (workstation PC) it doesn't matter anyways. Often it's not even possible to boot into single-user, for example if you don't have physical control over the machine (like in a co-lo situation). mkb.
Jim Campbell <jim-c@charter.net> wrote:> I've been away from *NIX a few years. I have been playing with FreeBSD > for a week or so now with mixed results. I am using release 4.11 > because for some reason 5.3 has problems seeing my hard drives. 4.11, > Red Hat Linux and NetBSD have no such trouble. > > This afternoon I used the "Updating Sources with CVSup" in the FreeBSD > Cheat Sheets and everything worked as advertized. I believe that it > advised against using "make world" and suggested that I use "19.4.1 The > Canonical Way to Update Your System" in the Handbook. I went through > the following steps with no problem: > > # make buildworld > # make installworld > # mergemaster > # rebootThis is not correct, and this is not what 19.4.1 says. The correct procedure is as Mike Schultz described. Please review that section of the handbook. If you did, indeed, do as you described, then you have a world that's out of sync with your kernel. Try this: 1) Boot in to single user mode 2) fsck 3) mount -a 4) cd /usr/src 5) make buildkernel 6) make installkernel 7) reboot If you're unable to complete those steps, then you may be better off reinstalling and trying again - write it off as part of the learning process. There are ways to restore your system if you've made this mistake and the above doesn't work, but it's rather advanced stuff. -- Bill Moran Potential Technologies http://www.potentialtech.com
From: Bill Moran <wmoran@potentialtech.com> Subject: Re: Newbie Question About System Update Date: Tue, 19 Apr 2005 16:32:37 -0400> Chuck Swiger <cswiger@mac.com> wrote: > > Bill Moran wrote: > > > The system can not replace programs that are in use, > > > > This is generally not the case. Unix lets you continue to access a file after > > it has been deleted, so long as the process hangs on to a file descriptor. > > This lets you replace programs in use, without running into the same problems > > that platforms like Windows have. > > What you say?: > > bash-2.05b$ su > Password: > bolivia# cp /usr/sbin/cron /home/wmoran/. > bolivia# cp /home/wmoran/cron /usr/sbin/. > cp: /usr/sbin/./cron: Text file busy > bolivia#mv /usr/sbin/cron /usr/sbin/cron- cp /blah/cron /usr/sbin/cron install does this behind the scenes. Warner
On Tue, 19 Apr 2005 16:34:37 -0600 (MDT) Warner Losh <imp@bsdimp.com> wrote:> From: Bill Moran <wmoran@potentialtech.com> > Subject: Re: Newbie Question About System Update > Date: Tue, 19 Apr 2005 16:32:37 -0400 > > > Chuck Swiger <cswiger@mac.com> wrote: > > > Bill Moran wrote: > > > > The system can not replace programs that are in use, > > > > > > This is generally not the case. Unix lets you continue to access a file after > > > it has been deleted, so long as the process hangs on to a file descriptor. > > > This lets you replace programs in use, without running into the same problems > > > that platforms like Windows have. > > > > What you say?: > > > > bash-2.05b$ su > > Password: > > bolivia# cp /usr/sbin/cron /home/wmoran/. > > bolivia# cp /home/wmoran/cron /usr/sbin/. > > cp: /usr/sbin/./cron: Text file busy > > bolivia# > > mv /usr/sbin/cron /usr/sbin/cron- > cp /blah/cron /usr/sbin/cron > > install does this behind the scenes.I suppose I have to stand corrected. Thanks for putting me straight. -- Bill Moran Potential Technologies http://www.potentialtech.com
> Apparenlty, nobody who is claiming this has _tried_ it. Try it yourselfApparently yo misunderstood what people were claiming. Nobody said you can modify a running binary, merely that you can replace it. try deleting it and writing a new one. it does work, I do this all the time! -pcf.
>> Fact is, trying to update a running system couldresult in silent failures.>> The system can not replace programs that are inuse, so there's always the>> chance that something or other won't get updated(cron would be an excellent>> example ... do you always shut cron off when youupdate? How about>syslogd?)>Actually, it can. install goes to great lengths tomake sure that it>carefully moves the executable out of the way beforereplacing it. It>won't go away until the last process to be executingout of it goes>away.>> That being said, I quite often do installworld onrunning systems because I>> have no way to go to single-user mode. It almostalways works well enough>> for my purposes, but I don't want anyone to thinkthat it's "OK" to do this,>> as it's not guaranteed to work, and will mostlikely result in some programs>> not being updated (such as the examples in theprevious paragraphs).>It usually works well enough most of the time. I doit all the time>on my development machines. The problem is "wellenough" and "most of>the time.">WarnerI, for one, can attest to that. To the OP, the thing to watch out for is that just make sure that the machine isn't busy enough (stop all daemons under /usr/local/etc/rc.d/, under /etc/rc.d, just so that the machine's resources are being spent on the upgrade process), then do the make world dance. I've done it remotely a lot of times, the thing is you just have to simulate the process locally(if you have some spare resources, perhaps a VM?), to avoid potential problems. Here's a snippet from my one of my notes back in the 4.X days: ++++++++++++++++++++++ Upgrade path from 4.4Rp47 to 4.10R Issues to deal: 1) SSH Daemon Create the user/group # pw groupadd -n sshd -g 22 # pw useradd -n sshd -u 22 -g sshd -c "Secure Shell Daemon" -md /var/empty -s /sbin/nologin /var/empty must be: # ls -al /var/ dr-xr-xr-x 2 root wheel schg 512 Oct 27 2003 empty 2) Sendmail a) Create the smmsp user/group # pw groupadd -n smmsp -g 25 # pw useradd -n smmsp -u 25 -g smmsp -c "Sendmail Submission User" -md /var/spool/clientmqueue -s /sbin/nologin make sure that /var/spool/clientmqueue and everyting under is owned by smmsp:smmsp and rwx by this user/group root@beastman:/var/spool# dir /var/spool/clientmqueue/ rw------- 1 smmsp smmsp - 97 Jun 22 15:53 sm-client.pid If NOT: # chown -Rv smmsp:smmsp /var/spool/clientmqueue # chmod 770 /var/spool/clientmqueue b) Create the mailnull user/group # pw groupadd -n mailnull -g 26 # pw useradd -n mailnull -u 26 -g mailnull -c "Sendmail Default User" -md /var/spool/mqueue -s /sbin/nologin root@beastman:/var/spool# dir /var/spool/ drwxr-xr-x 2 root daemon - 512 Jun 23 03:02 mqueue drwxr-xr-x 2 root daemon - 512 Jun 22 03:01 mqueue.in drwx------ 2 root daemon - 512 Oct 27 2003 opielocks drwxr-xr-x 3 root daemon - 512 Apr 30 01:06 output Aliases file (/etc/mail/aliases): Add these: mailnull: postmaster smmsp: postmaster sshd: root +++++++++++++++++++++++++++ Once the above issues where addressed, the build/install world went fine. This was when I was in a situation that I needed to install a port and wouldn't install on a 4.4R ( name of port escapes me ;-) cheers mars PS My first email via my gmail account was blocked: +++++++++++++++++++++++++++++++ This is an automatically generated Delivery Status Notification Delivery to the following recipient failed permanently: freebsd-stable@freebsd.org Technical details of permanent failure: PERM_FAILURE: SMTP Error (state 10): 554 Service unavailable; Client host [64.233.162.201] blocked using bl.spamcop.net; Blocked - see http://www.spamcop.net/bl.shtml?64.233.162.201 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com