Date: Wed, 13 Feb 2008 13:25:04 -0800 From: "Chris H." <chris#@1command.com> To: Gavin Spomer <spomerg@cwu.EDU> Cc: freebsd-stable@freebsd.org Subject: Re: Rebuilding World Problems Message-ID: <20080213132504.75qanebo08ks8o88@webmail.1command.com> In-Reply-To: <47B2C9F30200009000013E37@hermes.cwu.edu> References: <47B2C9F30200009000013E37@hermes.cwu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Gavin Spomer <spomerg@cwu.EDU>: >>>>> "Chris H." <chris#@1command.com> 02/12/08 4:34 PM >>> >> Quoting Gavin Spomer <spomerg@cwu.EDU>: >>> First, let me note that step one in rebuilding world should be "cd >>> /usr/src", not "make buildworld". I guess I was supposed to know that >>> for some reason. Having said that, I figured I would also have to be >>> in /usr/src for the "make installworld" step. But I couldn't do that! >>> Why? I could cd to /usr, but not /usr/src! >>> So, I decided to go ahead and try the "mergemaster -p" step. I was >>> given an error that was something like "cannot find mergemaster". So >>> I thought that maybe in single user mode my $PATH isn't set, so I >>> thought about entering "/sbin/mergemaster -p", but I didn't know if >>> that was the path or not and I chickened out. :( Maybe the fact that >>> I hit Return to choose /bin/sh while going into single user mode >>> instead of my preferred bash had something to do with it? >>> Here's a slightly dumb question: when I get this all figured out, do >>> I have to start all over from "make buildworld" or can I just >>> continue with booting in single user mode and "mergemaster -p"? I'm >>> guessing I can just continue, but I thought it was important to ask. >>> Here's a little more intelligent question or two. ;) Is there a way >>> to do this while logged in via ssh? I don't mind making the trip to >>> our computer room so I can select #4 at the FreeBSD prompt, but it's >>> not all that convenient. Also, how long (in general) do the steps >>> "mergemaster -p" through the final reboot take? I am running FreeBSD >>> on a test server, but if I were to use it for my production servers >>> (which I am considering), the down-time of being in single user mode >>> would be a concern. >>> Thanks to everyone who takes the time to read this. :) >> >> Greetings Gavin, >> Yes, you're quite correct on all accounts. The doc's are a bit terse >> in these areas. Which, as I read your email, reminds me why I _should_ >> send-pr a patch with some additional info in these areas. I guess I'm >> like so many others - once I figured it all out, I got so involved >> with it all, I completely forgot there was some issues with the docs. >> NOTE: I'm not the author of the documentation. :) >> OK I'm going to give you a "cheat sheet" that I hope you'll find >> helpful in the future - be aware, this is NOT an excuse to ignore >> the /usr/src/UPDATING file, as THAT document will QUITE likely >> contain more timely information regarding little, but important >> changes, that can make all the difference. >> That said, here goes: >> -------------------------------------------------------- >> * On an initial install ALWAYS buildworld BEFORE buildkernel >> * Unless having troubles building a kernel, it is usually >> best to ensure /etc/make.conf is empty >> * If REbuilding world/kernel it is usually a good idea to >> perform the following: >> cd /usr/obj >> chflags -R noschg * >> rm -rf * >> (see chflags(1) for more information) >> -------------------------------------------------------- >> OK here we go: >> cd /usr/src/sys/<ARCH>/conf >> cp ./GENERIC ./YOUR_CHOSEN_NAME >> edit ./YOUR_CHOSEN_NAME and adjust as necessary >> cd /usr/src >> make buildworld >> * * * * OPTIONAL * * * * >> NOTE: SINGLE CPU: >> make -j4 buildworld >> NOTE: MULTI CPU: >> make -j(6 through 10) buildworld >> * * * * * * * * * * * * >> make buildkernel KERNCONF=YOUR_KERNEL_HERE >> make installkernel KERNCONF=YOUR_KERNEL_HERE >> reboot (in single user mode) >> fsck -p (optional, but a good idea) >> mount -u / >> mount -a -t ufs >> swapon -a (most cases; optional) >> cd /usr/src >> mergemaster -p >> make installworld >> mergemaster >> reboot >> That was simply a QUICK cheat sheet, and does not >> replace good research. But I hope it helps. :) >> --Chris > > Thanks, this was very helpful. First of all I would just like to > admit that I only gave /usr/src/UPDATING a quick glance. Shame on me; > it might have solved most (if not all) of my problem if I had read > more thoroughly. > > Surprisingly I grokked most of your cheatsheet and looked at a few > man pages to figure out most of the rest. Haven't tried it all yet. I > was wondering about the "mount -u /". Is it really necessary to mount > the root partition prior to mounting all of them in the next step? Absolutely. Think about it for a momment. Given that EVERYTHING (save swap) is mounted off of root ( / ). So it becomes quite impossible to mount /usr/ if / hasn't already been mounted. In other words; if / hasn't been mounted it doesn't exist for usr/ to mount from it. :) > > I don't really understand the "swapon -a". When is it necessary and > when is it not? As a rule, it is already available after boot. So executing swapon -a is often considered overkill. /But/ absolutely no harm will come of doing it, and it /may/ be necessary. So this just insures you have an "event free" journey. :) > > Also, UPDATING has "adjkerntz -i" just before "mergemaster -p". I > looked at the man page for adjkerntz and am still uncertain if I need > to do this. I run an ntpd client, if that makes any difference. Again, just a precaution. Think "safe", or "event free". :) > > I think the documentation is an excellent reference for people who > already, moderately know FreeBSD. I am not even a true newbie as I > have a CS degree and have been a Linux admin for 2 years. Even so I > often have a hard time with the complexity of FreeBSD. I recognize > the value of understanding the fine-grain "nuts and bolts" of a > system, but even so I wonder if FreeBSD over-complicates some things? This is the "UNIX way". It breaks everything into small bits of useful stuff. There-by providing the "nuts & bolts" to build, or accomplish almost /anything/ with little, or no effort. Linux kind of "missed the boat" on this one. But even Linus T. indicates that Linux is not UNIX. I'd have to say, it's more a "feels like UNIX" than anything else. To sum things up; given that I've been using BSD since long before FreeBSD even existed. I can't imagine how anyone would consider using anything /but/ *BSD. It is /infinitely/ flexible, which only adds to it's power. While - as you mentioned, it seems complicated to a new user. One must remember, after all, that it is a /server/ and perhaps, not best suited to an average "desktop" user. But, if given the time, will become your best friend - /really/. :) Best wishes to you. --Chris H. > > - Gavin > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > > -- panic: kernel trap (ignored)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080213132504.75qanebo08ks8o88>
