Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jun 2001 16:06:26 -0700
From:      "Philip J. Koenig" <pjklist@ekahuna.com>
To:        stable@FreeBSD.ORG
Subject:   Re: problem with chflags
Message-ID:  <3B190F02.4646.4867F2@localhost>

next in thread | raw e-mail | index | archive | help

> Date: Fri, 1 Jun 2001 13:54:19 -0700
> From: "brian j. peterson" <rbw@myplace.org>
> 
> On Fri, Jun 01, 2001 at 01:06:55PM -0700, Chad R. Larson wrote:
> > As I recall, brian j. peterson wrote:
> > > as i learned very quickly the first time i tried to 'make world',
> > > the directions in /usr/src/UPDATING are very general and leave out
> > > several important steps of the process.
> > 
> > I'd bet Warner would appreciate patches to incorporate those
> > important steps...
> 
> my main gripe with /usr/src/UPDATING (v 1.73.2.28 is the one i was
> using) is that it suggests that you may need to go to singler user and
> doesn't tell you what to do once there.  for once, i decided to
> actually follow the directions that were given and i ended up with a
> system in single user with / mounted read-only and none of my other
> filesystems even mounted. luckily, i had a windows box next to me
> which allowed me to find the
> http://www.freebsd.org/doc/en_US.ISO_8859-1/books/handbook/makeworld.h
> tml page and figure out what to do.  granted, i should probably have
> known how to deal with things in single user better than i did, but i
> figured the provided directions would be complete.  based on what i
> know, the easiest way to fix these directions would be the following
> patch (again, this is against v 1.73.2.28 but should be easily
> modified for RELENG_4):
> 
> % diff -u /usr/src/UPDATING.orig /usr/src/UPDATING
> - --- /usr/src/UPDATING.orig	Wed May  2 22:23:04 2001
> +++ /usr/src/UPDATING	Fri Jun  1 13:33:31 2001
> @@ -229,7 +229,7 @@
>   make buildworld
>   make buildkernel KERNCONF=YOUR_KERNEL_HERE
>   make installkernel KERNCONF=YOUR_KERNEL_HERE
> - -	reboot	(in single user) [1]
> +	shutdown	(into single user) [1]
>   make installworld
>   mergemaster
>   reboot
> @@ -239,9 +239,9 @@
>   installworld, however, system components may break and other
>   oddities may happen.  Don't do this on systems that aren't
>   otherwise quiet as unpredictable results may happen.  If in
> - -	doubt, reboot into single user.  For remote installs, keep
> - -	a separate kernel around and use a serial console if at all
> - -	possible.
> +	doubt, shutdown(8) into single user.  For remote installs,
> +	keep a separate kernel around and use a serial console if at
> +	all possible.
> 
>  What follows are older entries for those people upgrading from
>  earlier versions of -stable/-current.
> %
> 
> correct me if i'm wrong, but shutdown(8) with no arguments should get
> the system into single user with all the filesystems still mounted and
> allow the 'make installworld' command to run without having to mess
> with mounting/remounting filesystems.
> 
> the most recent /usr/src/UPDATING (v 1.154) doesn't seem to suffer
> from this problem since it doesn't mention single user at all.
> 
> my (long-winded) two cents,
> brian


I disagree with that change because I have found that if you just shutdown to 
single-user installkernel and/or installworld sometimes won't work.  I once had 
problems with the kernel security level as a result of that and the problem 
went away when rebooting to single-user.

My procedure was based on the nice "cheatsheet" posted at 
http://www.mostgraveconcern.com/freebsd under "make world". (I'd give the 
direct URL but then it would bypass the frames which provide the rest of the 
context)

I agree that things should be better documented, some of these have been 
pointed out in this thread, but to reiterate:


1) CVSup

2) Do buildworld and buildkernel in multi-user mode (I like to log each step
so I see how long each step is taking and to find problems later, so I do
something like this:
	cd /usr/src
	date >buildworld_2001-06-02_01
	make buildworld |tee -a buildworld_2001-06-02_01

3) Clean out the old object files
	cd /usr/obj
	chflags -R noschg *
	rm -rf *
	(I *always* do a "pwd" before that one, to ensure I don't do
	something stupid :-)

4) *reboot* into single user 
	shutdown -r now
	boot -s

5) mount filesystems R/W 
	mount -a -t ufs

6) turn on swap (I've run into memory problems without this) 
	swapon -a

7) Adjust the time if your clock isn't running UTC (thanks to Mark Andrews
 suggestion for this, I didn't know how to do this so I was using the 'date'
 command) 
	adjkerntz -i

8) Make a backup of /etc in case something breaks
	cd /
	cp -pR /etc /etc.0602

9) Do the installkernel, installworld and log

10) Dan 'O Connor at the above site makes the useful suggestion to run 
mergemaster in 132-column mode to better see side-by-side diffs if necessary, 
and then I also send the output to a logfile.  

Bear in mind that if you have VESA support in your kernel and appropriate font 
directives to run a 132-column console, booting single-user doesn't parse 
rc.conf (rc.syscons?) so you have to manually load the font in order to use 
that mode:
	vidcontrol -f 8x8 /usr/share/syscons/fonts/iso-8x8.fnt
	vidcontrol 132x43
	mergemaster -v -w 132 |tee mergemaster_2001-06-02_01

10a) Nowadays mergemaster will prompt to do the makedev and rebuild aliases 
steps the first time it's run, but if you run it again it *does not* do that so 
you need to do them manually if you didn't do them the first time.

11) Update sysinstall (step seems to be missing in all the docs, I found on 
4.1/4.2 that if I didn't do this, sysinstall was all messed up:
	cd /usr/src/release/sysinstall
	make clean
	make all install

12) Reboot and cross fingers :-)




--
Philip J. Koenig                                       pjklist@ekahuna.com
Electric Kahuna Systems -- Computers & Communications for the New Millenium


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B190F02.4646.4867F2>