Please forgive me if this is not the appropriate list to post this on. If this is a topic for another, more appropriate FreeBSD list, then would someone please kindly point this guy in the right direction? :) I'm on the security advisory list too and got 2 emails about patches about a month ago. They came with instructions to follow for patching... excellent! Then, the last step has a link to the FreeBSD Handbook's Rebuilding world. Yes, I admit, it's taken me almost a month to get the courage (and find the time) to do this. I'm usually pretty fearless when exploring computer things. I don't really have the best way to backup either. I finally just made tarballs of important directories and scp'd them to one of my Linux machines. I finally got to the point where I booted to single user mode (first time for me) and that's where my problems began. It might be useful to note on the instructions page that you don't have to type "boot -s" to go into single user mode; it's easier to to just select option #4. 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. :) - Gavin
Quoting Gavin Spomer <spomerg@cwu.EDU>:> Please forgive me if this is not the appropriate list to post this > on. If this is a topic for another, more appropriate FreeBSD list, > then would someone please kindly point this guy in the right > direction? :) > > I'm on the security advisory list too and got 2 emails about patches > about a month ago. They came with instructions to follow for > patching... excellent! Then, the last step has a link to the FreeBSD > Handbook's Rebuilding world. Yes, I admit, it's taken me almost a > month to get the courage (and find the time) to do this. I'm usually > pretty fearless when exploring computer things. I don't really have > the best way to backup either. I finally just made tarballs of > important directories and scp'd them to one of my Linux machines. I > finally got to the point where I booted to single user mode (first > time for me) and that's where my problems began. It might be useful > to note on the instructions page that you don't have to type "boot > -s" to go into single user mode; it's easier to to just select option > #4. > > 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> > - 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)
>>>> "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. :) >--ChrisThanks, 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? I don't really understand the "swapon -a". When is it necessary and when is it not? 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. 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? - Gavin
>>> "illoai@gmail.com" <illoai@gmail.com> 02/12/08 6:13 PM >>> >On 12/02/2008, Chris H. <chris#@1command.com> wrote: >> Quoting Gavin Spomer <spomerg@cwu.EDU>: >. . . > > > 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! > . . . > > reboot (in single user mode) > > > > fsck -p (optional, but a good idea) > > mount -u / > > mount -a -t ufs > ^^^^^^^^^^^^^^^----- this is why you couldn't cd into /usr/srcYep, makes sense to me now. Kinda difficult to cd to unmounted file systems. ;)> > swapon -a (most cases; optional) > > from note 3 near the end of /usr/src/UPDATING: > > [3] From the bootblocks, boot -s, and then do > fsck -p > mount -u / > mount -a > cd src > adjkerntz -i # if CMOS is wall time > Also, when doing a major release upgrade, it is required that > you boot into single user mode to do the installworld.Yes, I've been caught red-handed, slacking on reading of the documentation. ;) - Gavin
>>> Kevin Oberman <oberman@es.net> 02/12/08 7:01 PM >>> > > make buildkernel KERNCONF=YOUR_KERNEL_HERE > > make installkernel KERNCONF=YOUR_KERNEL_HERE > If you put KERNCONF into make.conf, you can simplify it to: > make kernelJust to be clear, if I add the appropriate KERNCONF line in /etc/make.conf, "make kernel" will take care of both "make buildkernel" AND "make installkernel"? (w/o the KERNCONF= part)> > reboot (in single user mode) > > > > fsck -p (optional, but a good idea) > A total waste of time, but I do it anyway since I am paranoid. > adjkerntz -iLike many good admins, I am paranoid too, so I will include this. :)> This command has no impact if the hardware clock is set to UTC/GMT, but > it is often not, especially if the system is dual boot with Windows. > > mount -u / > Since the next command does this, the is no need for this, even for the > paranoid. > > mount -a -t ufs > > swapon -a (most cases; optional) > > > > cd /usr/src > > mergemaster -p > > make installworld > > mergemaster > While not in src/UPDATING, I always urge people to use the -iU options > to save a LOT of time on future builds.These options are for mergemaster I take it? I had another look at the man page for mergemaster and inspected these options, so this sounds good.> > reboot > > > > That was simply a QUICK cheat sheet, and does not > > replace good research. But I hope it helps. :) > > Thanks for posting this. Maybe it will lead to some documentation updates. > R. Kevin Oberman, Network Engineer
Gavin Spomer wrote:>>>> Kevin Oberman <oberman@es.net> 02/12/08 7:01 PM >>> >>> make buildkernel KERNCONF=YOUR_KERNEL_HERE >>> make installkernel KERNCONF=YOUR_KERNEL_HERE >> If you put KERNCONF into make.conf, you can simplify it to: >> make kernel > > Just to be clear, if I add the appropriate KERNCONF line in /etc/make.conf, "make kernel" will take care of both "make buildkernel" AND "make installkernel"? (w/o the KERNCONF= part)[snip] Last I heard, the better way to define KERNCONF in make.conf is as follows: KERNCONF?=MYKERNEL Then you can use "make kernel" as you say, but should you need to compile a kernel using an alternate configuration, you can still issue the "make kernel KERNCONF=MYOTHERKERNEL" on the command line. Similarly, if you choose to set CPUTYPE in make.conf, use a line such as: CPUTYPE?=p4 That way it can be overridden if necessary by other commands, but will default to your choice. Jim
>>> "Chris H." <chris#@1command.com> 02/13/08 1:25 PM >>> > > 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. :)For some reason I was thinking that they were still separate, regardless of their hierarchical relationship. Well, might as well just do them both since it doesn't hurt. After all, what's a few keystrokes?> > > > 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". :)Yeah, I like to think I balance a fearless attitude with caution quite well. Being fearless allows one to make mistakes and thus potentially learn more than if not making them, but when it's obvious that safety can save you a lot of grief, that is the path to take in that instance.> > > > 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.I agree with the "accomplish almost/anything" fully, but from *my* experience I respectfully, but strongly disagree with the "with little, or no effort" part. But that is likely because I don't know Unix even a tenth as well as you do. :D I guess it's just particularly hard for me in this case to see benefit; it takes only one command and a lot less time to patch my SuSE systems, for example. But again, it all boils down to perspective, I guess. Make sense?> 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/. :)I never run any GUI on my servers.> Best wishes to you. > > --Chris H.Thanks, I am genuinely having a LOT of fun dinking around with FreeBSD on my test server! Linux was definitely a good warm up. And it's nice to be able to tinker under the hood on all my Mac's. (Have 2 @ work and 1 @ home)
Hallelujah! My "world" is rebuilt! Thanks to Chris, "illoai@gmail.com", Kevin and Jim for educating me and pointing me in the right direction. Will definitely research further and continue to have a blast with FreeBSD on my test server. It very well could be that I will be using FreeBSD for my production servers by next Fall. :D - Gavin
Quoting Gavin Spomer <spomerg@cwu.EDU>:> Hallelujah! My "world" is rebuilt! Thanks to Chris, > "illoai@gmail.com", Kevin and Jim for educating me and pointing me in > the right direction. Will definitely research further and continue to > have a blast with FreeBSD on my test server. > > It very well could be that I will be using FreeBSD for my production > servers by next Fall. :DEXCELLENT! Welcome aboard! :) --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)