Subject: etcupdate questions (usage on dirs other than /etc)
To: None <current-users@netbsd.org>
From: Malcolm Herbert <mjch@mjch.net>
List: current-users
Date: 12/08/2003 17:14:03
--GYaKytDE8aa4+VVK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

=2E.. I'm new to using -current in general, and updating it in particular,
so go easy if I'm asking obvious questions I haven't spotted answered
elsewhere yet ... :)

my setup is possibly somewhat different to the norm, so I'll explain a
bit: the boxes I run have two internal 40G drives wd0 and wd1, each of
which are split into a 5G mini-root and a 35G RAID mirror containing the
bulk of the system - the RAID is autoconfigured to be the root device,
so the mini-root is really more of a rescue system and something to host
the kernel so that the bootloader can find it (AFAIK it can't boot a
kernel on a RAID device for i386 yet)

There seem to be problems when trying to update a system when it's
configured this way, which people may want to know about (I'm trying to
find ways around them at the moment)

- when booting from CD, the RAID device isn't available because raidctl
  isn't on the rescue image (I can't remember if the rescue kernel has
  RAIDFrame enabled or not)

- becuase there's no RAID, the mini-root becomes the environment which
  gets upgraded (eg, new 1.6ZG binaries are copied over the 1.6ZF ones)

- the mini-root /etc is moved to /etc.old and a fresh new /etc is built

- on reboot, the RAID device autoconfigures itself as the root (this was
  my fault, but it illustrates the problem)

- once rebooted, postinstall stuff needs to be done along with etcupdate
  except that this is the system on the RAID, not the mini-root area

so, I ended up with nice new binaries in the mini-root, and nice new
config files on my main system ... it functions, but it's not happy ...

also, once I'd booted into the mini-root I was stumped for some time
because /etc/raid0.conf had been moved to /etc.old and I couldn't figure
out why I couldn't configure my RAID disks ... :)

in order to fix the problem, I was wanting to know whether etcupdate
could be run over directories other than /etc ... I know you can
specify the _source_ etc directory, I'm talking about the _target_ etc
directory.

For instance, I mount my mini-root area on /altroot, so I want to run
etcupdate on /altroot/etc with the source etc tree in /usr/src/etc
(/usr/src and /usr/pkg/bin are only available on my RAIDed filesystem,
hence the difficulty)

I had a look in the man pages and in the source of the program but it
didn't seem to be possible (probably not hard to hack in, but I only
spent about 5 minutes looking at it)

also, I will probably need to manually extract the 1.6ZG distribution
sets over my RAID filesystems and do that upgrade manually ... anything
I should know about? In order to install 1.6ZF to the RAID in the first=20
place I merely did a tar -zxvp <set>.tgz and then ran MAKEDEV, which=20
seemed to work ... form the look of things an upgrade is a little tricker,
but only in as much as you need to fiddle with stuff in /etc ...=20

thanks,
Malcolm

--=20
Malcolm Herbert                                This brain intentionally
mjch@mjch.net                                                left blank

--GYaKytDE8aa4+VVK
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (NetBSD)

iD8DBQE/1Bao/3AcQ0fM4P8RAj/jAKCOuMGfFHO+IK2N1xIJSq+mf3MsBQCdESeS
+2KhF1rAtPx0LzTfVzqZPKI=
=EZD3
-----END PGP SIGNATURE-----

--GYaKytDE8aa4+VVK--