LILO problems

Jens Ruehmkorf ruehmkorf at informatik.Uni-Koeln.DE
Mon Oct 1 22:04:46 CEST 2001


Hi Eray, hi all!

Hm. As it seems I didn't understand your first email. Let's try again.

On Mon, 1 Oct 2001, Eray Ozkural wrote:
> On Monday 01 October 2001 05:27 pm, Jens Ruehmkorf wrote:
> > Hi,
> >
> > > It seems that FAI writes an /etc/fstab which borks lilo package.
> > > [...]
> >
> > simply dpkg-divert /usr/sbin/liloconfig to be an empty sh-script. To run
> > liloconfig during FAI-installation makes no sense anyhow, since FAI takes
        ^^^^^^
> > care of configuring lilo/grub.
> >
>
> Well?  Would it work before installing the package?

No, but after it. Package: lilo is in Section: base, thus within base.tgz.
So you can divert liloconfig after base.tgz has been untar'ed onto your
client's harddisk.

> This is a bug that happens with fai 2.2.
>
> As I said fai can't upgrade the lilo in my base (it's a 3 weeks old
> woody debootstrap + fai) non-interactively. If the node has a keyboard
> + video no problem but that's not what fai is for.
>
> I don't run lilo. fai does, at the end of installation.

Yes, lilo must be run at the end of the installation, but liloconfig (is
invoked from lilo.postinst) does not need to be run. Now, to get it right
(please correct me if I'm wrong):

- you install your client with fai
- you have built your own woody-base.tgz for fai using debootstrap
  (shouldn't be a problem).
- sometime during installation, fai wants to upgrade your "old" woody
  base, that has been put onto your client's harddisk
- for whatever reason, the upgrade of lilo fails (i.e. the liloconfig
  script that is called within lilo.postinst fails).

Right?

Well, what I suggested was:

A machine that has been automatically installed simply doesn't need to run
liloconfig. Ever. So, since /usr/sbin/liloconfig is part of the base.tgz,
you can divert it. This should be done within fai as soon as base.tgz has
been untar'ed onto the client's harddisk.

You might do something like:

-- /tmp/liloconfig --
#!/bin/bash

cat<<EOF
  This host has been installed automatically: /usr/sbin/liloconfig has been
  diverted to /usr/sbin/liloconfig.real

  Run "liloconfig.real" if you need it.
EOF
-- end --

Now you have to run dpkg-divert and put this script into its correct
place. That's more or less how I do it for the automatic installation of
our cluster (not with --local but some package though):

-- snip --
# dpkg-divert --local --add --rename --divert /usr/sbin/liloconfig.real \
/usr/sbin/liloconfig
Adding `local diversion of /usr/sbin/liloconfig to \
/usr/sbin/liloconfig.real'
# cp /tmp/liloconfig /usr/sbin/liloconfig
-- snap --

Look through the scripts where you let fai do this and probably send a
patch against fai 2.2 to Thomas. (Some considerations have to be made to
stay conformant to debian-policy, but those are not difficult).

Kind regards,
Jens

--
ruehmkorf at informatik dot uni hyphen koeln dot de



More information about the linux-fai mailing list