Subject: kernel-package and Lilo

From: Kevin M Bealer <[email-masked]>
Date: Fri, 14 Jun 1996 00:38:02 -0400 (EDT)

I love the kernel-package thing; but the other day I used it to install a
kernel and the vmlinuz.old kernel was not in boot (I deleted it
accidentally).

The system would not boot -- may I humbly suggest that the install process
for the generated package checks if "lilo" returns an error and throws a
warning if it does?

(I'm thinking of the equiv. of "lilo (options) || echo Warning! blah blah")

and/or could LILO be run in "verbose" mode?

I suggest this because it would have saved me a lot of time.. 

In other words: (please idiot proof this for my benefit :) )

Thanks,

[email-masked]
"The C Programming Language -- A language which combines the
flexibility of assembly language with the power of assembly language."

---

From: Craig Sanders <[email-masked]>
Date: Sat, 15 Jun 1996 22:40:02 +1000 (EST)

On Fri, 14 Jun 1996, Kevin M Bealer wrote:

> I love the kernel-package thing; but the other day I used it to
> install a kernel and the vmlinuz.old kernel was not in boot (I deleted
> it accidentally).
>
> The system would not boot -- may I humbly suggest that the install
> process for the generated package checks if "lilo" returns an error
> and throws a warning if it does?
>

Before I switched to using the kernel package scripts I had my own
'makelinux' and 'addlilo' scripts which performed a similar function.

addlilo added an appropriate entry to the end of /etc/lilo.conf and then
ran:

    lilo -t && lilo

i.e. 'lilo -t' tests the lilo config.  if it's OK then lilo is run.

maybe something like this (but expanded to provide useful warning/error
information) should be done in the debian kernel package script?

Craig

---

From: Kevin M Bealer <[email-masked]>
Date: Sat, 15 Jun 1996 23:48:12 -0400 (EDT)

On Sat, 15 Jun 1996, Craig Sanders wrote:

(clipped own stuff)
> information) should be done in the debian kernel package script?

After using "perforate" I wasn't sure so went to copy the kernel image
around to unperforate it and was going to run lilo again.

But, I accidentally deleted the kernel image.  So I ran dpkg -i (the kernel
image) and it finished without incident -- Lilo gave an error, but no being
verbose, only said "OldLinux not found" and I assumed (<- the problem) that
the found images were used, rebooted, then spent several hours trying to get
a clean boot into the system so I could run lilo again.

lilo -t && lilo 
wouldn't have helped (me anyway) I think -- if LILO fails it won't install
an MBR anyway (as far as I know).  It might give a more verbose error
message, tho.

---

From: Manoj Srivastava <[email-masked]>
Date: 16 Jun 1996 03:59:59 -0400

Hi,

	I now have fixed the postinst script so that it first runs a
 test using lilo -t > /tmp/lilo_log.$$; and then runs lilo proper. If
 an error occurs, it prints something to the tune of:
    There was an error with running lilo in test mode, a log is 
    available in file /tmp/lilo_log.39678. Please edit /etc/lilo.conf
    manually and re-run lilo, or make other arrangements to boot 
    your machine.
	Please hit return to continue
 And waits there till you hit return. This should handle most problems
 mentioned here ...

	manoj
-- 
 "Dammit, we're all going to die, let's die doing something *useful*!"
 Hal Clement, on comments that space exploration is dangerous

Manoj Srivastava               Systems Research Programmer, Project Pilgrim,
Phone: (413) 545-3918                A143B Lederle Graduate Research Center,
Fax:   (413) 545-1249         University of Massachusetts, Amherst, MA 01003
<[email-masked]> <URL:http://www.pilgrim.umass.edu/%7Esrivasta/>