CD sysinstall broken (fix)

2002-01-04 Thread Brian Fundakowski Feldman

Sysinstall via the CD media (and probably other physical disc mediums) is 
broken currently due to the devfs filesystem not being available at all 
times in placesw here it is needed.  I've changed the behavior in my 
green_lomac branch to fix this, and would like if other people would verify 
this indeed fixes the problem for them as well (I imagine it does) and does 
what it should be expected to (which I also think it does).

Does this logic appear to be flawed in any cases?  If all seems right, I 
shall commit this to -CURRENT to unbreak CD installs.

 //depot/user/green/lomac/usr.sbin/sysinstall/dist.c#2 (text+ko) 

@@ -35,6 +35,8 @@
  */
 
 #include sysinstall.h
+#include sys/param.h
+#include sys/mount.h
 #include sys/time.h
 #include signal.h
 #include libutil.h
@@ -544,7 +546,7 @@
 static Boolean
 distExtract(char *parent, Distribution *me)
 {
-int i,j, status, total, intr;
+int i,j, status, total, intr, unmounted_dev;
 int cpid, zpid, fd2, chunk, numchunks;
 char *path, *dist, buf[30];
 const char *tmp;
@@ -684,6 +686,12 @@
total = 0;
(void)gettimeofday(start, (struct timezone *)0);
 
+   if (me[i].my_bit == DIST_BIN  RunningAsInit  !Fake) {
+   unmounted_dev = 1;
+   unmount(/dev, MNT_FORCE);
+   } else
+   unmounted_dev = 0;
+
/* We have one or more chunks, initialize unpackers... */
mediaExtractDistBegin(root_bias(me[i].my_dir), fd2, zpid, cpid);
 
@@ -810,6 +818,10 @@
*(me[i].my_mask) = ~(me[i].my_bit);
else
continue;
+   if (unmounted_dev) {
+   (void)mount(devfs, /dev, 0, NULL);
+   unmounted_dev = 0;
+   }
 }
 properties_free(dist_attr);
 sigaction(SIGINT, old, NULL); /* Restore signal handler */

 //depot/user/green/lomac/usr.sbin/sysinstall/install.c#2 (text+ko) 

@@ -812,6 +812,8 @@
/* BOGON #1: Resurrect /dev after bin distribution screws it up */
dialog_clear_norefresh();
msgNotify(Remaking all devices.. Please wait!);
+   if (!Fake)
+   (void)unmount(/dev, MNT_FORCE);
if (vsystem(cd /dev; sh MAKEDEV all)) {
msgConfirm(MAKEDEV returned non-zero status);
return DITEM_FAILURE | DITEM_RESTORE;
@@ -1070,8 +1072,6 @@
 
 command_sort();
 command_execute();
-if (!mountfailed  !Fake)
-   unmount(/mnt/dev, MNT_FORCE);
 dialog_clear_norefresh();
 return DITEM_SUCCESS | DITEM_RESTORE;
 }


-- 
 Brian Fundakowski Feldman   \  FreeBSD: The Power to Serve!  /
 [EMAIL PROTECTED]`--'



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



sysinstall broken :(

2000-03-24 Thread John Baldwin

Hmph, it seems sysinstall (and thus make release) is broken in -current:

cc -O -pipe -Wall -I/usr/src/release/sysinstall/../../gnu/lib/libdialog
-I/usr/obj/usr/src/release/sysinstall -I/usr/src/release/sysinstall/../../sys   -c
/usr/src/release/sysinstall/kget.c
/usr/src/release/sysinstall/kget.c: In function `kget':
/usr/src/release/sysinstall/kget.c:83: sizeof applied to an incomplete type
/usr/src/release/sysinstall/kget.c:85: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:86: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:89: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:90: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:92: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:92: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:94: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:96: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:96: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:98: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:100: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:100: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:102: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:104: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:104: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:106: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:108: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:108: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:111: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:111: dereferencing pointer to incomplete type
/usr/src/release/sysinstall/kget.c:113: sizeof applied to an incomplete type
*** Error code 1

Stop in /usr/src/release/sysinstall.
*** Error code 1

Stop in /usr/src/release.
*** Error code 1

Stop in /usr/source/src/release.

All of these seem to be related to 'struct isa_device'.  It seems that when
the userconfig in the kernel was changed to use 'struct uc_device' instead,
that change wasn't propogated out to sysinstall.  This patch fixes all that:


Index: sys/i386/i386/userconfig.c
===
RCS file: /usr/cvs/src/sys/i386/i386/userconfig.c,v
retrieving revision 1.178
diff -u -r1.178 userconfig.c
--- sys/i386/i386/userconfig.c  2000/03/19 12:57:49 1.178
+++ sys/i386/i386/userconfig.c  2000/03/24 15:18:44
@@ -112,26 +112,6 @@
 #include machine/md_var.h
 #include machine/limits.h
 
-#define _I386_ISA_ISA_DEVICE_H_
-
-/*
- * Per device structure.  This just happens to resemble the old isa_device
- * but that is by accident.  It is NOT the same.
- */
-struct uc_device {
-   int id_id;  /* device id */
-   char*id_name;   /* device name */
-   int id_iobase;  /* base i/o address */
-   u_int   id_irq; /* interrupt request */
-   int id_drq; /* DMA request */
-   caddr_t id_maddr;   /* physical i/o memory address on bus (if any)*/
-   int id_msize;   /* size of i/o memory */
-   int id_unit;/* unit number */
-   int id_flags;   /* flags */
-   int id_enabled; /* is device enabled */
-   struct uc_device *id_next; /* used in uc_devlist in userconfig() */
-};
-
 #undef NPNP
 #define NPNP 0
 
@@ -141,6 +121,7 @@
 
 static MALLOC_DEFINE(M_DEVL, "uc_devlist", "uc_device lists in userconfig()");
 
+#include machine/uc_device.h
 static struct uc_device *uc_devlist;   /* list read by kget to extract changes */
 static struct uc_device *uc_devtab;/* fake uc_device table */
 
Index: sys/i386/include/uc_device.h
===
RCS file: uc_device.h
diff -N uc_device.h
--- /dev/null   Fri Mar 24 02:17:20 2000
+++ uc_device.h Fri Mar 24 08:36:40 2000
@@ -0,0 +1,75 @@
+/**
+ ** Copyright (c) 1995
+ **  Michael Smith, [EMAIL PROTECTED]  All rights reserved.
+ **
+ ** This code contains a module marked :
+
+ * Copyright (c) 1991 Regents of the University of California.
+ * All rights reserved.
+ * Copyright (c) 1994 Jordan K. Hubbard
+ * All rights reserved.
+ * Copyright (c) 1994 David Greenman
+ * All rights reserved.
+ *
+ * Many additional changes by Bruce Evans
+ *
+ * This code is derived from software contributed by the
+ * University of California Berkeley, Jordan K. Hubbard,
+ * David Greenman and Bruce Evans.
+
+ ** As such, it contains code subject to the above copyrights.
+ ** The module and its copyright can be found below.
+ ** 
+ ** Redistribution and use in source and binary forms, with 

Re: sysinstall broken :(

2000-03-24 Thread Jordan K. Hubbard

 Hmph, it seems sysinstall (and thus make release) is broken in -current:

I don't know what version of sysinstall you're using, but it builds just
fine for me under -current.  I saw some other kvetching about kget
being broken and just tried building it last night.  Observe:

root@zippy- make
Warning: Object directory not changed from original /usr/src/release/sysinstall
cc -O -pipe -Wall -I/usr/src/release/sysinstall/../../gnu/lib/libdialog 
-I/usr/src/release/sysinstall -I/usr/src/release/sysinstall/../../sys   -c kget.c
cc -O -pipe -Wall -I/usr/src/release/sysinstall/../../gnu/lib/libdialog 
-I/usr/src/release/sysinstall -I/usr/src/release/sysinstall/../../sys-static -o 
sysinstall anonFTP.o cdrom.o command.o config.o devices.o dhcp.o kget.o disks.o 
dispatch.o dist.o dmenu.o doc.o dos.o floppy.o ftp.o globals.o http.o index.o 
install.o installUpgrade.o keymap.o label.o lndir.o main.o makedevs.o media.o menus.o 
misc.o mouse.o msg.o network.o nfs.o options.o package.o pccard.o system.o tape.o 
tcpip.o termcap.o ufs.o user.o variable.o wizard.o  -ldialog -lncurses -lmytinfo 
-lutil -ldisk -lftpio
root@zippy- uname -a
FreeBSD zippy.cdrom.com 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Mar 15 13:05:47 PST 
2000 [EMAIL PROTECTED]:/usr/src/sys/compile/ZIPPY  i386

- Jordan


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: sysinstall broken :(

2000-03-24 Thread John Baldwin


On 24-Mar-00 Jordan K. Hubbard wrote:
 Hmph, it seems sysinstall (and thus make release) is broken in -current:
 
 I don't know what version of sysinstall you're using, but it builds just
 fine for me under -current.  I saw some other kvetching about kget
 being broken and just tried building it last night.  Observe:
 
 root@zippy- make
 Warning: Object directory not changed from original /usr/src/release/sysinstall
 cc -O -pipe -Wall -I/usr/src/release/sysinstall/../../gnu/lib/libdialog 
-I/usr/src/release/sysinstall
 -I/usr/src/release/sysinstall/../../sys   -c kget.c
 cc -O -pipe -Wall -I/usr/src/release/sysinstall/../../gnu/lib/libdialog 
-I/usr/src/release/sysinstall
 -I/usr/src/release/sysinstall/../../sys-static -o sysinstall anonFTP.o cdrom.o 
command.o config.o
 devices.o dhcp.o kget.o disks.o dispatch.o dist.o dmenu.o doc.o dos.o floppy.o ftp.o 
globals.o http.o
 index.o install.o installUpgrade.o keymap.o label.o lndir.o main.o makedevs.o 
media.o menus.o misc.o
 mouse.o msg.o network.o nfs.o options.o package.o pccard.o system.o tape.o tcpip.o 
termcap.o ufs.o use
 r.o 
 variable.o wizard.o  -ldialog -lncurses -lmytinfo -lutil -ldisk -lftpio
 root@zippy- uname -a
 FreeBSD zippy.cdrom.com 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Mar 15 13:05:47 PST 
2000
 [EMAIL PROTECTED]:/usr/src/sys/compile/ZIPPY  i386

That's because your -current is too old:

revision 1.178
date: 2000/03/19 12:57:49;  author: peter;  state: Exp;  lines: +102 -108
Completely decouple userconfig from 'struct isa_device' and friends.
Userconfig was only using this for convenience since newbus, and even
then it was rather inconvenient.

That's the commit that broke it.  And its dated 4 days after your kernel. :)

 - Jordan

-- 

John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: sysinstall broken :(

2000-03-24 Thread Ted Sikora

John Baldwin wrote:
 
 Hmph, it seems sysinstall (and thus make release) is broken in -current:
 
 cc -O -pipe -Wall -I/usr/src/release/sysinstall/../../gnu/lib/libdialog
 -I/usr/obj/usr/src/release/sysinstall -I/usr/src/release/sysinstall/../../sys   -c

 
  bail:
 
 Comments?

It's broken for me too! I just did a 4.0-RELEASE install last night and
cvs'upd this morning to -current. I get the kget message also:

src/release/sysinstall -I/usr/src/release/sysinstall/../../sys   -c
kget.c
kget.c: In function `kget':
kget.c:83: sizeof applied to an incomplete type
kget.c:85: dereferencing pointer to incomplete type
kget.c:86: dereferencing pointer to incomplete type
kget.c:89: dereferencing pointer to incomplete type

--
Ted Sikora
Jtl Development Group 
[EMAIL PROTECTED]
http://powerusersbbs.com


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: sysinstall broken :(

2000-03-24 Thread Jordan K. Hubbard

Urk, sorry guys, I've been cvsupping the repo faithfully but evidently not
cvs updating my tree as faithfully. :-)

I'll find and fix it.

- Jordan

 On 24-Mar-00 Jordan K. Hubbard wrote:
  Hmph, it seems sysinstall (and thus make release) is broken in -current:
  
  I don't know what version of sysinstall you're using, but it builds just
  fine for me under -current.  I saw some other kvetching about kget
  being broken and just tried building it last night.  Observe:
  
  root@zippy- make
  Warning: Object directory not changed from original /usr/src/release/sysins
tall
  cc -O -pipe -Wall -I/usr/src/release/sysinstall/../../gnu/lib/libdialog -I/
usr/src/release/sysinstall
  -I/usr/src/release/sysinstall/../../sys   -c kget.c
  cc -O -pipe -Wall -I/usr/src/release/sysinstall/../../gnu/lib/libdialog -I/
usr/src/release/sysinstall
  -I/usr/src/release/sysinstall/../../sys-static -o sysinstall anonFTP.o 
cdrom.o command.o config.o
  devices.o dhcp.o kget.o disks.o dispatch.o dist.o dmenu.o doc.o dos.o flopp
y.o ftp.o globals.o http.o
  index.o install.o installUpgrade.o keymap.o label.o lndir.o main.o makedevs
.o media.o menus.o misc.o
  mouse.o msg.o network.o nfs.o options.o package.o pccard.o system.o tape.o 
tcpip.o termcap.o ufs.o use
  r.o 
  variable.o wizard.o  -ldialog -lncurses -lmytinfo -lutil -ldisk -lftpio
  root@zippy- uname -a
  FreeBSD zippy.cdrom.com 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Mar 15 13:0
5:47 PST 2000
  [EMAIL PROTECTED]:/usr/src/sys/compile/ZIPPY  i386
 
 That's because your -current is too old:
 
 revision 1.178
 date: 2000/03/19 12:57:49;  author: peter;  state: Exp;  lines: +102 -108
 Completely decouple userconfig from 'struct isa_device' and friends.
 Userconfig was only using this for convenience since newbus, and even
 then it was rather inconvenient.
 
 That's the commit that broke it.  And its dated 4 days after your kernel. :)
 
  - Jordan
 
 -- 
 
 John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/
 PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
 "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: sysinstall broken :(

2000-03-24 Thread John Baldwin


On 24-Mar-00 Jordan K. Hubbard wrote:
 Urk, sorry guys, I've been cvsupping the repo faithfully but evidently not
 cvs updating my tree as faithfully. :-)
 
 I'll find and fix it.

Well, my patch fixes it as far as I can tell, it's quite simple.  Right now
I'm still running it through a test release build, but both GENERIC and
sysinstall compiled fine with the patch I submitted earlier.

 - Jordan

-- 

John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: sysinstall broken :(

2000-03-24 Thread Doug Barton

On Fri, 24 Mar 2000, John Baldwin wrote:

 
 On 24-Mar-00 Jordan K. Hubbard wrote:
  Hmph, it seems sysinstall (and thus make release) is broken in -current:
  
  I don't know what version of sysinstall you're using, but it builds just
  fine for me under -current.  I saw some other kvetching about kget
  being broken and just tried building it last night.  Observe:

  root@zippy- uname -a
  FreeBSD zippy.cdrom.com 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Mar 15 13:05:47 
PST 2000
  [EMAIL PROTECTED]:/usr/src/sys/compile/ZIPPY  i386
 
 That's because your -current is too old:

Actually it was broken in -Current when I tried to compile around
11pm PST on wednesday. That's why in my "kvetching" I was careful to
specify that I had up to the minute sources in _MY_ tree. :)

Doug (FreeBSD kvetcher at large)
-- 
"So, the cows were part of a dream that dreamed itself into
existence? Is that possible?" asked the student incredulously.
The master simply replied, "Mu."




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



/stand/sysinstall broken ???

2000-02-07 Thread Andrey Rouskol

Hi,

This weekend I tried to setup a -current into my notebook. I made a
-SNAP at my home computer and after several attempts to instal the
system using any network interfaces I have I desided to setup the system
from the DOS partition. Here I found several problems:
1 - mount_msdos doesn't included into mfsroot floppy
2 - sysinstall recognize an extended-dos partition (a bit ugly, it tries
to use a /dev/ad0s1 device instead of /dev/ad0s5 - and tries to mount
it using mount_mfs which doesn't recognize file system type at all)
3 - sysinstall _doesn't_ recognize big primary DOS filesystem (FAT32) - it
just show it as free space (may be it right and I just waist my disk
space :-)) and when I create a freebsd partition sysinstall just erase
my DOS partition. After that I reinstall windows leave freebsd
partition unchanged and start freebsd installation again. I don't go
into 'Partitions' menu at all, go to 'Labels' menu fix mount points
after that sysinstall _FIX_ my partition table and delete primary DOS
partition (I think it don't like windows ...) - I think this is
not normal.

Best regards,
 ---
Andrey Rouskol

Sovintel

PS: May be I should fix my arms first ...




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message