Debian bug report logs - #918
mkboot and image packages

Package: miscutils; Reported by: mitchell@mdd.comm.mot.com (Bill Mitchell); 158 days old.

Message received at debian-bugs:


From mdd.comm.mot.com!mitchell Mon May 29 10:17:55 1995
Return-Path: <mitchell@mdd.comm.mot.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sG8Rv-0005kIC; Mon, 29 May 95 10:17 PDT
Received: from motgate.mot.com by pixar.com with SMTP id AA27279
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Mon, 29 May 1995 10:16:29 -0700
Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.6.11/8.6.10/MOT-3.6) with ESMTP id MAA29361 for <debian-bugs@pixar.com>; Mon, 29 May 1995 12:17:53 -0500
Received: from mdd.comm.mot.com (mdisea.mdd.comm.mot.com [138.242.64.201]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.6) with SMTP id MAA14367 for <debian-bugs@pixar.com>; Mon, 29 May 1995 12:17:52 -0500
Received: from bb29c.mdd.comm.mot.com by mdd.comm.mot.com (4.1/SMI-4.1)
	id AA03527; Mon, 29 May 95 10:17:51 PDT
Received: by bb29c.mdd.comm.mot.com (4.1/SMI-4.1)
	id AA06710; Mon, 29 May 95 10:17:45 PDT
Date: Mon, 29 May 1995 10:17:44 -0700 (PDT)
From: Bill Mitchell <mitchell@mdd.comm.mot.com>
X-Sender: mitchell@bb29c
To: debian-bugs@pixar.com
Subject: Re: Bug#918: mkboot and image packages
In-Reply-To: <m0sFve3-00001FC@plato.simons-rock.edu>
Message-Id: <Pine.SUN.3.91.950529100027.6700A-100000@bb29c>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


I know I said I'd try to shut up about this.  Before I do, let
me contribute a mkboot script which works for me.  I'm sure it
can be improved, once an agreement is reached about what the
script should do.  As written, it attempts to make LILO'd boot
diskette, or to exit with an appropriate message if that fails.

I wasn't sure about using the lilo "linear" parameter, but did
specify it.  As I understand it, "linear" allows the boot disk
to work with some hard disk geometries and partition alignments
which wouldn't work without this parameter; though I note the
caveat in /usr/doc/lilo/README-FIRST.gz that it may make the
boot floppy nonportable.

#!/bin/sh
#
# attempt to make a boot diskette, using /dev/fd0
# exit with an appropriate error message if a problem is detected

LEAF=/tmp/$$
ROOT_DEVICE=`mount | grep ' / ' | cut -d' ' -f1`

ERROR=0

if [ $ERROR = 0 ]
then
    if ! mkfs -t ext2 /dev/fd0 >/dev/null
    then
        echo ERROR:  mkfs -t ext2 /dev/fd0 failed 1>2
        ERROR=1
    fi
fi

if [ $ERROR = 0 ]
then
    if ! mkdir $LEAF
    then
        echo ERROR:  mkdir $LEAF failed 1>2
        ERROR=1
    fi
fi

if [ $ERROR = 0 ]
then
    if ! mount -t ext2 /dev/fd0 $LEAF 1>2
    then
        echo ERROR:  mount -t ext2 /dev/fd0 $LEAF failed 1>2
        ERROR=1
    fi
fi

if [ $ERROR = 0 ]
then
    for i in /vmlinuz /boot/boot.b
    do
        if ! cp $i $LEAF
        then
            echo ERROR:  cp $i $LEAF failed 1>2
            ERROR=1
            break
        fi
    done
fi

if [ $ERROR = 0 ]
then
    if ! lilo -C - <<EOF
boot=/dev/fd0
root=$ROOT_DEVICE
compact
linear
install=$LEAF/boot.b
map=$LEAF/map
backup=/dev/null
vga=normal
delay=20
image=$LEAF/vmlinuz
label=Linux
read-only
EOF
    then
        echo ERROR:  lilo failed to write boot sector 1>&2
        ERROR=1
    fi
fi

umount /dev/fd0 2>/dev/null
rmdir /tmp/$$ 2>/dev/null

exit $ERROR


mitchell@mdd.comm.mot.com (Bill Mitchell)



Acknowledgement sent to Bill Mitchell <mitchell@mdd.comm.mot.com>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#918; Package miscutils. Full text available.

Message received at debian-bugs:


From simons-rock.edu!jimr Sun May 28 20:41:56 1995
Return-Path: <jimr@simons-rock.edu>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sFviG-00051eC; Sun, 28 May 95 20:41 PDT
Received: from plato.simons-rock.edu by pixar.com with SMTP id AA14307
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sun, 28 May 1995 20:40:29 -0700
Received: from simons-rock.edu by plato.simons-rock.edu with smtp
	(Smail3.1.29.1 #3) id m0sFve3-00001FC; Sun, 28 May 95 23:37 EDT
Message-Id: <m0sFve3-00001FC@plato.simons-rock.edu>
To: debian-bugs@pixar.com
Subject: Re: Bug#918: mkboot and image packages 
In-Reply-To: Message from Bill Mitchell <mitchell@mdd.comm.mot.com> 
   of "Sun, 28 May 1995 12:59:29 PDT." <Pine.SUN.3.91.950528122533.6445B-100000@bb29c> 
Date: Sun, 28 May 1995 23:37:35 -0400
From: "James A. Robinson" <jimr@simons-rock.edu>


Ian wrote:
> > > When that happens, whose fault is it for making the system
> > > unbootable?
> >
> > Joe.

Not really.  Joe did what he was supposed to, make the system bootable
with image X.  If somebody (an image from a Debian person in this
case) comes along and, in principle, says "I'll install image Y for
you."  Then Sam should very well expect to be able to boot afterwards.
One could reasonably expect him to think "well, if it installs it, it
shouldn't make my system unusable, right?"

> MHO, and I expect that Sam would agree.  If Sam starts with a
> bootable suystem, installs the image package IAW instructions for
> doing that, and ends up with an unbootable system, the image package
> providor shouldn't be suprised to find Sam less than perfectly
> pleased.  If we do continue to offer to run LILO during an image
[...]
> package postinst processing, I'd urge that we do it in a loop which
> offers the user a choice to shell out and check and/or modify
> /etc/lilo.conf, as well as choices to install or not install LILO.
[...]
> still opine that the mkboot script (as opposed to the install
> package postinst) should simply do a very good job of making a boot
> floppy, and should not offer to run LILO on the hard drive (though
> it might be nice if it made a LILO'd boot floppy -- allowing
> boot-time specification of parameters).

I agree with this.  It is always safe to make a boot-floppy, and we
can do the above plus add comments to the lilo.conf that explains what
is going on.

A story: when I recently upgraded my SparcStation from 2.3 to 2.4, I
opted not to add a bunch of packages.  Unfortunately I missed adding
the linker.  I put the CD back in, and told it "I want the linker
installed."  Well, The thing proceeded to pull off every other package
on the system, and install the linker.  So I then had a bare-bones
SparcStation with happy little linker installed...

The point from that story is that, while the first bit was entirely my
mistake, the fool that made the installation procedure should NOT have
made the program run around being overly "smart" without some sort of
big old warning asking "I'm about to do X, is that OK?"  I agree with
Bill, I was less then pleased to have an unusable system after the CD
exited it's program.


Jim

Acknowledgement sent to "James A. Robinson" <jimr@simons-rock.edu>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#918; Package miscutils. Full text available.

Message received at debian-bugs:


From mdd.comm.mot.com!mitchell Sun May 28 13:00:48 1995
Return-Path: <mitchell@mdd.comm.mot.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sFoW0-0005NoC; Sun, 28 May 95 13:00 PDT
Received: from motgate.mot.com by pixar.com with SMTP id AA05090
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sun, 28 May 1995 12:59:22 -0700
Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.6.11/8.6.10/MOT-3.6) with ESMTP id OAA13793; Sun, 28 May 1995 14:59:40 -0500
Received: from mdd.comm.mot.com (mdisea.mdd.comm.mot.com [138.242.64.201]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.6) with SMTP id OAA00764; Sun, 28 May 1995 14:59:39 -0500
Received: from bb29c.mdd.comm.mot.com by mdd.comm.mot.com (4.1/SMI-4.1)
	id AA06101; Sun, 28 May 95 12:59:37 PDT
Received: by bb29c.mdd.comm.mot.com (4.1/SMI-4.1)
	id AA06450; Sun, 28 May 95 12:59:29 PDT
Date: Sun, 28 May 1995 12:59:29 -0700 (PDT)
From: Bill Mitchell <mitchell@mdd.comm.mot.com>
X-Sender: mitchell@bb29c
To: Ian Jackson <iwj10@cus.cam.ac.uk>, debian-bugs@pixar.com
Cc: debian-bugs@pixar.com
Subject: Re: Bug#918: mkboot and image packages
In-Reply-To: <m0sFWAF-0000XQZ@chiark.al.cl.cam.ac.uk>
Message-Id: <Pine.SUN.3.91.950528122533.6445B-100000@bb29c>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


I sense another disagreement brewing over this.  To avoid that,
I'll try to shut up after this on the subject of whether, when,
and how to run LILO from image postinst and/or mkboot scripts.

On Sun, 28 May 1995, Ian Jackson wrote:

> Bill Mitchell writes ("Re: Bug#918: mkboot and image packages"):
> > [...]
> > I wonder how common it'll be for Joe Clueful to help Sam Clueless
> > (or perhaps Sam Client) out setting up his system, and perhaps
> > leave a mismatched lilo.conf behind by using "lilo -b" or whatever;
> > and then for Sam to later upgrade the image package (which looks simple
> > to do -- just dselect it) on his own.
> >
> > When that happens, whose fault is it for making the system
> > unbootable?
> 
> Joe.

>From experience, I'd not be suprised to see the image package provider
pointing the finger at Joe.  If Joe were around, I'd not be suprised
to see him pointing a finger in the other direction.  Sam has probably
had similar experiences with others in the past, and walks away muttering
to himself and shaking his head -- looking for a way to get a bootable
system which will stay bootable through upgrades.

> [...]
> (b) the LILO postinst should set up /etc/lilo.conf, not Joe Wannabe
> (or perhaps Joe Ripoff).

If we intend to make it a rule that /etc/lilo.conf _must_ be set up
on Debian systems by system software and remain untouched by human
hands, we'd better state it prominently to avoid suprising a lot of
people.  Ditto if we want to make it a requirement that /etc/lilo.conf
always reflect the actual state of the last lilo boot sector install.

> (c) as I said before, given that we've destroyed the previous kernel
> image, it's unlikely that we'll do any more harm by running LILO.

No, but the objective ought to be to make Sam's system a bootable
system after an image package install -- not just not to make it
any more unbootable than it already is.  That's MHO, and I expect
that Sam would agree.  If Sam starts with a bootable suystem,
installs the image package IAW instructions for doing that, and
ends up with an unbootable system, the image package providor
shouldn't be suprised to find Sam less than perfectly pleased.

If we do continue to offer to run LILO during an image package postinst
processing, I'd urge that we do it in a loop which offers the user a
choice to shell out and check and/or modify /etc/lilo.conf, as well
as choices to install or not install LILO.  I'd also urge reminding
him that if he chooses not to install LILO during postinst processing,
he can do it manually at some later time.

And, on the other side of the subject of this article, I still opine
that the mkboot script (as opposed to the install package postinst)
should simply do a very good job of making a boot floppy, and should
not offer to run LILO on the hard drive (though it might be nice if
it made a LILO'd boot floppy -- allowing boot-time specification
of parameters).


Acknowledgement sent to Bill Mitchell <mitchell@mdd.comm.mot.com>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#918; Package miscutils. Full text available.

Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Sun May 28 10:15:26 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sFlvy-0005kIC; Sun, 28 May 95 10:15 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA01926
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sun, 28 May 1995 10:13:59 -0700
Received: by bootes.cus.cam.ac.uk 
	(Smail-3.1.29.0 #36) id m0sFlvt-000BzVC; Sun, 28 May 95 18:15 BST
Received: by chiark
	id <m0sFWAF-0000XQZ@chiark.al.cl.cam.ac.uk>
	(Debian /\oo/\ Smail3.1.29.1 #29.31); Sun, 28 May 95 01:25 BST
Message-Id: <m0sFWAF-0000XQZ@chiark.al.cl.cam.ac.uk>
Date: Sun, 28 May 95 01:25 BST
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: debian-bugs@pixar.com
Subject: Re: Bug#918: mkboot and image packages
In-Reply-To: <Pine.SUN.3.91.950527145810.6159B-100000@bb29c>
References: <m0sFT3a-0000XQZ@chiark.al.cl.cam.ac.uk>
	<Pine.SUN.3.91.950527145810.6159B-100000@bb29c>

Bill Mitchell writes ("Re: Bug#918: mkboot and image packages"):
> [...]
> I wonder how common it'll be for Joe Clueful to help Sam Clueless
> (or perhaps Sam Client) out setting up his system, and perhaps
> leave a mismatched lilo.conf behind by using "lilo -b" or whatever;
> and then for Sam to later upgrade the image package (which looks simple
> to do -- just dselect it) on his own.
> 
> When that happens, whose fault is it for making the system
> unbootable?

Joe.  He should have known that Sam would have to install kernels
himself later, and so he should have put the stuff in lilo.conf.  BTW,
it hadn't ever occurred to me to use the lilo `-b' switch (or
whatever).

Provided our script isn't doing anything that Sam would have known not
to do we're definitely not making the situation any worse.

Even if we don't have the script run lilo we have to encourage the
user strongly to do so, as their system is much more likely to become
unbootable by us running it.

Also,

(a) your scenario would make us fail to run lilo when we should have
done - but of course there's no way we could successfully do so,
because we don't have the information we need;

(b) the LILO postinst should set up /etc/lilo.conf, not Joe Wannabe
(or perhaps Joe Ripoff).

(c) as I said before, given that we've destroyed the previous kernel
image, it's unlikely that we'll do any more harm by running LILO.

Ian.

Acknowledgement sent to iwj10@cus.cam.ac.uk (Ian Jackson):
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#918; Package miscutils. Full text available.

Message received at debian-bugs:


From mdd.comm.mot.com!mitchell Sat May 27 15:14:08 1995
Return-Path: <mitchell@mdd.comm.mot.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sFU7T-0005kIC; Sat, 27 May 95 15:14 PDT
Received: from motgate.mot.com by pixar.com with SMTP id AA11720
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sat, 27 May 1995 15:12:42 -0700
Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.6.11/8.6.10/MOT-3.6) with ESMTP id RAA20723; Sat, 27 May 1995 17:13:01 -0500
Received: from mdd.comm.mot.com (mdisea.mdd.comm.mot.com [138.242.64.201]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.6) with SMTP id RAA13056; Sat, 27 May 1995 17:13:00 -0500
Received: from bb29c.mdd.comm.mot.com by mdd.comm.mot.com (4.1/SMI-4.1)
	id AA07320; Sat, 27 May 95 15:12:59 PDT
Received: by bb29c.mdd.comm.mot.com (4.1/SMI-4.1)
	id AA06182; Sat, 27 May 95 15:12:56 PDT
Date: Sat, 27 May 1995 15:12:55 -0700 (PDT)
From: Bill Mitchell <mitchell@mdd.comm.mot.com>
X-Sender: mitchell@bb29c
To: Ian Jackson <iwj10@cus.cam.ac.uk>, debian-bugs@pixar.com
Subject: Re: Bug#918: mkboot and image packages
In-Reply-To: <m0sFT3a-0000XQZ@chiark.al.cl.cam.ac.uk>
Message-Id: <Pine.SUN.3.91.950527145810.6159B-100000@bb29c>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


On Sat, 27 May 1995, Ian Jackson wrote:

> > Actually, though, if a MSDOS boot is present in the MBR, we should
> > check the boot sector of the first "active" partition for a LILO
> > boot sector as well.
> 
> No, that's not the way to do it.  We should check the `boot' line in
> /etc/lilo.conf.  That will tell us where LILO will install itself if
> it is run now (and, by implication, where it would be if it were
> already installed).
> 
> That is the correct thing to do, IMO, as well as being considerably
> simpler :-).
> 
> > How to recognize what sort of non-LILO boot is present (MSDOS?
> > OS-2?  Win-whatever?, Something_else?), and what to do about it
> > even if we can recognize it (or, for that matter, if we can't),
> > isn't clear to me.
> 
> We don't need to.  If the disk (MBR) or partition mentioned in the
> lilo.conf `boot' line doesn't already contain LILO we simply run
> mkboot.

If, of course, the disk was lilo'd using the file which is in
/etc/lilo.conf and not with "lilo -C ...", or "lilo -b ...";
and we can't know that.  (Exception cases are always so messy.
It's a real temptation to ignore exception cases because of
their messiness.  Should we do so in this case?)

> [...]
> The only exception I can think of would be a dual-installation
> machine, but such systems will probably have LILO configured correctly
> in each installation on which it is installed - and if not, the
> sysadmin will probably be clueful enough to dig hirself out of the
> hole.

I wonder how common it'll be for Joe Clueful to help Sam Clueless
(or perhaps Sam Client) out setting up his system, and perhaps
leave a mismatched lilo.conf behind by using "lilo -b" or whatever;
and then for Sam to later upgrade the image package (which looks simple
to do -- just dselect it) on his own.

When that happens, whose fault is it for making the system
unbootable?  Joe, who's long gone by now, or the people who
provided the image package which Sam installed to get an
unbootable system?  Probably both, I'd say.  Joe's long gone,
though.  The people who provided the image package are (hopefully)
still around.


Acknowledgement sent to Bill Mitchell <mitchell@mdd.comm.mot.com>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#918; Package miscutils. Full text available.

Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Sat May 27 14:27:40 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sFTOW-0007ijC; Sat, 27 May 95 14:27 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA10678
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sat, 27 May 1995 14:26:13 -0700
Received: by bootes.cus.cam.ac.uk 
	(Smail-3.1.29.0 #36) id m0sFTOB-000BzjC; Sat, 27 May 95 22:27 BST
Received: by chiark
	id <m0sFT3a-0000XQZ@chiark.al.cl.cam.ac.uk>
	(Debian /\oo/\ Smail3.1.29.1 #29.31); Sat, 27 May 95 22:06 BST
Message-Id: <m0sFT3a-0000XQZ@chiark.al.cl.cam.ac.uk>
Date: Sat, 27 May 95 22:06 BST
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: debian-bugs@pixar.com
Subject: Re: Bug#918: mkboot and image packages
In-Reply-To: <Pine.SUN.3.91.950527115842.5970B-100000@bb29c>
References: <m0sF7db-0000XfZ@chiark.al.cl.cam.ac.uk>
	<Pine.SUN.3.91.950527115842.5970B-100000@bb29c>

Bill Mitchell writes ("Re: Bug#918: mkboot and image packages"):
> On Fri, 26 May 1995, Ian Jackson wrote:
> >[...] 
> > A common situation will be that the user upgrades their `image'
> > package.  If you don't run LILO their system will become unbootable.
> > 
> > We need some way to distinguish those systems where `making the new
> > kernel bootable' means running LILO and those where it means running
> > mkboot.
> 
> "dd if=/dev/hda count=512 | od -cx" shows the following:
> 
> 0000000 353   ]   L   I   L   O 001  \0 017  \0 377 377   $  \0  \0  \0
>         5deb 494c 4f4c 0001 000f ffff 0024 0000

Ah, that's very useful.  In that case, we can run LILO if LILO was
most recently run on the partition specified in /etc/lilo.conf.

> Can we rely on this signature to indicate that a lilo boot is
> present, and offer to run lilo only if it is?

Yes, I think so.

> Actually, though, if a MSDOS boot is present in the MBR, we should
> check the boot sector of the first "active" partition for a LILO
> boot sector as well.

No, that's not the way to do it.  We should check the `boot' line in
/etc/lilo.conf.  That will tell us where LILO will install itself if
it is run now (and, by implication, where it would be if it were
already installed).

That is the correct thing to do, IMO, as well as being considerably
simpler :-).

> How to recognize what sort of non-LILO boot is present (MSDOS?
> OS-2?  Win-whatever?, Something_else?), and what to do about it
> even if we can recognize it (or, for that matter, if we can't),
> isn't clear to me.

We don't need to.  If the disk (MBR) or partition mentioned in the
lilo.conf `boot' line doesn't already contain LILO we simply run
mkboot.

We don't even need to prompt the user.  After all, if they install and
configure the LILO package and it runs `lilo' then all will be well at
the next `image' installation.

We'll probably want to mention to the user what we did, and why we did
it - eg,
 "I see that you do not yet have LILO installed.  Would you
  like to make a bootable floppy now containing the new kernel
  image ?  (You can always do this later using the `mkboot' command.)
   (y/n)"
or
 "Running LILO to set up new kernel image for booting.
  (If you wish to make a bootable floppy, use the `mkboot' command.)"

If we do this we should probably put the kernel images that come with
Debian in /vmlinux.distrib or some such, so that if the user adds
and LILO's their own kernel they will be less likely to overwrite it
later if they install an image.deb.

Note that even if we overwrite /vmlinux then there's no point not
rerunning LILO if it was already installed - if /vmlinux was the only
bootable kernel then it's gone now anyway and we can't lose anything
by trying to make the new kernel bootable.

The only exception I can think of would be a dual-installation
machine, but such systems will probably have LILO configured correctly
in each installation on which it is installed - and if not, the
sysadmin will probably be clueful enough to dig hirself out of the
hole.

Ian.

Acknowledgement sent to iwj10@cus.cam.ac.uk (Ian Jackson):
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#918; Package miscutils. Full text available.

Message received at debian-bugs:


From mdd.comm.mot.com!mitchell Sat May 27 12:09:27 1995
Return-Path: <mitchell@mdd.comm.mot.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sFREk-0005NoC; Sat, 27 May 95 12:09 PDT
Received: from motgate.mot.com by pixar.com with SMTP id AA07742
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sat, 27 May 1995 12:08:01 -0700
Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.6.11/8.6.10/MOT-3.6) with ESMTP id OAA11621; Sat, 27 May 1995 14:08:19 -0500
Received: from mdd.comm.mot.com (mdisea.mdd.comm.mot.com [138.242.64.201]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.6) with SMTP id OAA00714; Sat, 27 May 1995 14:08:18 -0500
Received: from bb29c.mdd.comm.mot.com by mdd.comm.mot.com (4.1/SMI-4.1)
	id AA02378; Sat, 27 May 95 12:08:17 PDT
Received: by bb29c.mdd.comm.mot.com (4.1/SMI-4.1)
	id AA06000; Sat, 27 May 95 12:08:15 PDT
Date: Sat, 27 May 1995 12:08:14 -0700 (PDT)
From: Bill Mitchell <mitchell@mdd.comm.mot.com>
X-Sender: mitchell@bb29c
To: Ian Jackson <iwj10@cus.cam.ac.uk>, debian-bugs@pixar.com
Subject: Re: Bug#918: mkboot and image packages
In-Reply-To: <m0sF7db-0000XfZ@chiark.al.cl.cam.ac.uk>
Message-Id: <Pine.SUN.3.91.950527115842.5970B-100000@bb29c>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Fri, 26 May 1995, Ian Jackson wrote:

>[...] 
> A common situation will be that the user upgrades their `image'
> package.  If you don't run LILO their system will become unbootable.
> 
> We need some way to distinguish those systems where `making the new
> kernel bootable' means running LILO and those where it means running
> mkboot.

"dd if=/dev/hda count=512 | od -cx" shows the following:

0000000 353   ]   L   I   L   O 001  \0 017  \0 377 377   $  \0  \0  \0
        5deb 494c 4f4c 0001 000f ffff 0024 0000

Can we rely on this signature to indicate that a lilo boot is
present, and offer to run lilo only if it is?

Actually, though, if a MSDOS boot is present in the MBR, we should
check the boot sector of the first "active" partition for a LILO
boot sector as well.

How to recognize what sort of non-LILO boot is present (MSDOS?
OS-2?  Win-whatever?, Something_else?), and what to do about it
even if we can recognize it (or, for that matter, if we can't),
isn't clear to me.  IMHO, we shouldn't go installing LILO unless
we're sure that we know what we're doing, or if the user tells
us to -- and if we rely on the user, we should do our best not
to lead non-expert users into making a bad mistake which will
eleave them with an unbootable system.


Acknowledgement sent to Bill Mitchell <mitchell@mdd.comm.mot.com>:
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#918; Package miscutils. Full text available.

Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Sat May 27 10:54:24 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sFQ48-00064uC; Sat, 27 May 95 10:54 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA06167
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sat, 27 May 1995 10:52:56 -0700
Received: by bootes.cus.cam.ac.uk 
	(Smail-3.1.29.0 #36) id m0sFQ41-000BzrC; Sat, 27 May 95 18:54 BST
Received: by chiark
	id <m0sF7db-0000XfZ@chiark.al.cl.cam.ac.uk>
	(Debian /\oo/\ Smail3.1.29.1 #29.31); Fri, 26 May 95 23:13 BST
Message-Id: <m0sF7db-0000XfZ@chiark.al.cl.cam.ac.uk>
Date: Fri, 26 May 95 23:13 BST
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: debian-bugs@pixar.com
Subject: Re: Bug#918: mkboot and image packages

Bill Mitchell writes ("Bug#918: mkboot and image packages"):
> [...]
> IMHO, the /usr/sbin/mkboot script should not even offer to install a LILO
> boot sector, but should just try to do a very reliable and robust job of
> making a usable boot floppy.  It might be appropriate to offer to run LILO
> from  the image.deb package postinst, but I'd be leery about doing this --
> There's just too much chance that /etc/lilo.conf might not be right.
> Better for the user to run LILO manually, IMHO.

No, I disagree.

A common situation will be that the user upgrades their `image'
package.  If you don't run LILO their system will become unbootable.

We need some way to distinguish those systems where `making the new
kernel bootable' means running LILO and those where it means running
mkboot.

Ian.

Acknowledgement sent to iwj10@cus.cam.ac.uk (Ian Jackson):
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#918; Package miscutils. Full text available.

Message received at debian-bugs:


From mdd.comm.mot.com!mitchell Fri May 26 08:07:45 1995
Return-Path: <mitchell@mdd.comm.mot.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sF0zJ-0008BqC; Fri, 26 May 95 08:07 PDT
Received: from motgate.mot.com by pixar.com with SMTP id AA26043
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Fri, 26 May 1995 08:06:19 -0700
Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.6.11/8.6.10/MOT-3.6) with ESMTP id KAA12701 for <debian-bugs@pixar.com>; Fri, 26 May 1995 10:07:42 -0500
Received: from mdd.comm.mot.com (mdisea.mdd.comm.mot.com [138.242.64.201]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.6) with SMTP id KAA18182 for <debian-bugs@pixar.com>; Fri, 26 May 1995 10:07:41 -0500
Received: from bb29c.mdd.comm.mot.com by mdd.comm.mot.com (4.1/SMI-4.1)
	id AA10489; Fri, 26 May 95 08:07:39 PDT
Received: by bb29c.mdd.comm.mot.com (4.1/SMI-4.1)
	id AA04635; Fri, 26 May 95 08:07:37 PDT
Date: Fri, 26 May 95 08:07:37 PDT
From: mitchell@mdd.comm.mot.com (Bill Mitchell)
Message-Id: <9505261507.AA04635@bb29c.mdd.comm.mot.com>
To: debian-bugs@pixar.com
Subject: mkboot and image packages

PACKAGE:  miscutils
VERSION:  1.2
PACKAGE_REVISION: 1

This package installs a shell script named /usr/sbin/mkboot.

There's no mkboot(1) or mkboot(8) man page.

The /usr/sbin/mkboot script starts out as follows:

#! /bin/sh
#
# Make the system bootable.

echo "In order to use the new kernel image you have just installed, you"
echo "will need to reboot the machine. First, however, you will need to"
echo "either make a bootable floppy diskette or re-run LILO. Do you want"
echo -n "to do that now (y/n)? "
This script is run from the image.deb postinst, and this prompting
is appropriate in that situation.  However, the script is also
available to be run by the user, and this prompting is not necessarily
appropriate in that situation.

This prompting belongs in the image.deb postinst script, IMHO, not in
the /usr/sbin/mkboot script.

Also, the prompting should be quite a bit more insistent about tne
need to either install a LILO boot sector LILO or make a boot floppy
after installing the image package, since he consequeence of not doing
this is an unbootable system.  The user should be allowed to opt out of
this, but we should try to prevent his doing this by mistake.

IMHO, the /usr/sbin/mkboot script should not even offer to install a LILO
boot sector, but should just try to do a very reliable and robust job of
making a usable boot floppy.  It might be appropriate to offer to run LILO
from the image.deb package postinst, but I'd be leery about doing this --
There's just too much chance that /etc/lilo.conf might not be right.
Better for the user to run LILO manually, IMHO. 

Also, later on in the mkboot script:

  if [ -f /etc/lilo.conf -a -x /sbin/lilo ]
  then
    echo
    until [ "$input" = "y" -o "$input" = "n" ]
    do
      echo -n "LILO appears to be installed.  Should I run /sbin/lilo (y/n)? "

If the script continues to offer to run LILO, I'd suggest rewording this.
When I first saw it, I took it to mean that a LILO boot sector seems to be
installed (which it may be, but that's not what has been determined).
Telling someone who has not installed a LILO boot sector on his system
that "LILO appears to be installed" can be confusing.  How about just
asking "Should I run /sbin/lilo (y/n)? " if lilo is found to be available?.

Finally, I'm unable to boot my system from a boot floppy created
by this script (which would leave me with an unbootable system if the
script was run from the image.deb postinst script) (which, in fact, has
happened to me).

I get the message:

    Kernel panic: VFS: Unable to mount root fs on 83:03.

This appears to be because the image pointed to by /boot/zimage
is rdev'd to /dev/hda3, and I have my linux root on /dev/hda2.


Acknowledgement sent to mitchell@mdd.comm.mot.com (Bill Mitchell):
New bug report received and forwarded. Full text available.
Report forwarded to debian-devel@pixar.com:
Bug#918; Package miscutils. Full text available.
Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov