Adam Di Carlo wrote:
> Martin Schulze <[EMAIL PROTECTED]> writes:
>
> [Adam wrote]
> > > I already had my system installed on the disk (which was mounted as
> > > /target), and it was running 2.0.35 rather than 2.0.36, thus
> > > the messages. Of course another minor problem was that the error
> > > messages weren't redirected to ttyp3.
>
> > > But the major issue is that dbootstrap didn't detect that I was
> > > trying to install on a system which wasn't in an appropriate
> > > state. I know that one is not supposed to do that; still, it
> > > should catch that condition.
>
> > What do you expect?
>
> I think, yes, some sanity checks in dbootstrap is going to make life
> easier for users and fewer questions and bugs for us.
>
> > Define the sanity checks you'll want to see.
>
> Yes, that's the rub. Sanity checks generally break more often than
> the stuff they are "protecting".
>
> > The only thing that I could think of in this case would be dbootstrap
> > checking if /target/lib/modules/`uname -r` exists and refuse to let
> > you start modconf if it doesn't.
>
> That's a good one.
Ok, here it is:
Index: baseconfig.c
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/baseconfig.c,v
retrieving revision 1.55
diff -u -r1.55 baseconfig.c
--- baseconfig.c 2000/08/18 14:08:11 1.55
+++ baseconfig.c 2000/08/26 19:02:36
@@ -371,6 +371,13 @@
setenv("LANG", _("C"), 1);
add_modules_from_floppy();
+
+ snprintf (prtbuf, sizeof (prtbuf), "/target/lib/modules/%s", kver);
+ if (! NAME_ISDIR (prtbuf, &statbuf)) {
+ snprintf (prtbuf, sizeof (prtbuf), _("Es sind keine Module im Verzeichnis
+/target/lib/modules/%s installiert, die konfiguriert werden können. Bitte
+installieren Sie zuerst die Module."), kver);
+ problemBox (prtbuf, _("Problem"));
+ return -1;
+ }
execlog("depmod -a", LOG_INFO);
boxSuspend();
> > I could also think of some sanity checks that will prevent dbootstrap
> > from extracting the base system if some random files already exist.
>
> Yes. I think perhaps the moment this should be done is when existing
> filesystems are mounted.
>
> Some checks would be, for instance, /etc/debian_version, uh, likewise
> a file for RedHat ? Anyhow, such checks should result in a warning,
> allowing the user to go on if they want to.
Does this make you feel worm?
Index: extract_base.c
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/extract_base.c,v
retrieving revision 1.20
diff -u -r1.20 extract_base.c
--- extract_base.c 2000/08/23 14:34:50 1.20
+++ extract_base.c 2000/08/26 18:29:03
@@ -65,6 +65,17 @@
struct stat statbuf;
char *file;
+ /* Sanity Check */
+ if (NAME_ISREG ("/target/etc/debian_version", &statbuf)) {
+ if (yesNoBox(_("It looks like either you have already installed the base system
+once or there is a Debian system installed already. This installer routine is not
+intended to overwrite an existing system. It's safer to start from scratch, i.e.
+umount the partition, create a new filesystem upon it and come back to this step.
+Installing the base system over an existing system will cause existing data to be
+overwritten. Do you want to continue?"), _("Warning")) == DLG_NO)
+ return DLG_CANCEL;
+ } else {
+ if (NAME_ISREG ("/target/sbin/init", &statbuf)) {
+ if (yesNoBox(_("It looks like you are trying to install Debian GNU/Linux over
+an existing Linux system. This installer routine is not intended to overwrite an
+existing system. It's safer to start from scratch, i.e. umount the partition, create
+a new filesystem upon it and come back to this step. Installing the base system over
+an existing system will result in existing data being overwritten. Do you want to
+continue?"), _("Warning")) == DLG_NO)
+ return DLG_CANCEL;
+ }
+ }
+
disqtype=base;
if ( choose_medium() ) return 1;
Regards,
Joey
--
This is Linux Country. On a quiet night, you can hear Windows reboot.
Oldenburger LinuxTag 2000 http://oldenburger.linuxtage.de/
Please always Cc to me when replying to me on the lists.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]