Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2001 00:04:47 +0900
From:      Makoto Matsushita <matusita@jp.freebsd.org>
To:        current@freebsd.org
Subject:   RE: Sysinstall is still horribly broken.
Message-ID:  <20011126000447F.matusita@jp.FreeBSD.org>
In-Reply-To: <20011122002140I.matusita@jp.FreeBSD.org>
References:  <20011121012432J.matusita@jp.FreeBSD.org> <20011121034444O.matusita@jp.FreeBSD.org> <20011122002140I.matusita@jp.FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

matusita> OK, a patch is attached below.

Sorry, forget to add the patch... try again.

If anybody test with boot floppies, available at
http://people.FreeBSD.org/~matusita/5.0-CURRENT-20011121-JPSNAP_usedevfs/,
please let me know your results.

-- -
Makoto `MAR' Matsushita

Index: install.c
===================================================================
RCS file: /pub/snapshots/cvsup/FreeBSD.cvs/src/usr.sbin/sysinstall/install.c,v
retrieving revision 1.309
diff -c -r1.309 install.c
*** install.c	20 Oct 2001 09:28:53 -0000	1.309
--- install.c	21 Nov 2001 02:22:00 -0000
***************
*** 932,938 ****
  	    }
  	    dialog_clear_norefresh();
  	    msgNotify("Checking integrity of existing %s filesystem.", dname);
! 	    i = vsystem("fsck -y %s", dname);
  	    if (i)
  		msgConfirm("Warning: fsck returned status of %d for %s.\n"
  			   "This partition may be unsafe to use.", i, dname);
--- 932,938 ----
  	    }
  	    dialog_clear_norefresh();
  	    msgNotify("Checking integrity of existing %s filesystem.", dname);
! 	    i = vsystem("fsck_ffs -y %s", dname);
  	    if (i)
  		msgConfirm("Warning: fsck returned status of %d for %s.\n"
  			   "This partition may be unsafe to use.", i, dname);
***************
*** 949,954 ****
--- 949,967 ----
  	    msgConfirm("Unable to mount the root file system on %s!  Giving up.", dname);
  	    return DITEM_FAILURE | DITEM_RESTORE;
  	}
+ 
+ 	dialog_clear_norefresh();
+ 	msgNotify("Copying initial device files..");
+ 	/* Copy the boot floppy's dev files */
+ 	if ((root->newfs || upgrade) && vsystem("find -x /dev | cpio %s -pdum /mnt", cpioVerbosity())) {
+ 	    msgConfirm("Couldn't clone the /dev files!");
+ 	    return DITEM_FAILURE | DITEM_RESTORE;
+ 	}
+ 
+ 	/* Mount devfs for other partitions to mount */
+ 	Mkdir("/mnt/dev");
+ 	if (!Fake)
+ 	    mount("devfs", "/mnt/dev", 0, NULL);
      }
  
      /* Now buzz through the rest of the partitions and mount them too */
***************
*** 962,974 ****
  	    msgConfirm("No chunk list found for %s!", disk->name);
  	    return DITEM_FAILURE | DITEM_RESTORE;
  	}
- 	if (RunningAsInit && root && (root->newfs || upgrade)) {
- 	    Mkdir("/mnt/dev");
- 	    if (!Fake)
- 		MakeDevDisk(disk, "/mnt/dev");
- 	}
- 	else if (!RunningAsInit && !Fake)
- 	    MakeDevDisk(disk, "/dev");
  
  	for (c1 = disk->chunks->part; c1; c1 = c1->next) {
  	    if (c1->type == freebsd) {
--- 975,980 ----
***************
*** 983,989 ****
  			if (tmp->newfs && (!upgrade || !msgNoYes("You are upgrading - are you SURE you want to newfs /dev/%s?", c2->name)))
  			    command_shell_add(tmp->mountpoint, "%s %s/dev/%s", tmp->newfs_cmd, RunningAsInit ? "/mnt" : "", c2->name);
  			else
! 			    command_shell_add(tmp->mountpoint, "fsck -y %s/dev/%s", RunningAsInit ? "/mnt" : "", c2->name);
  			if (tmp->soft)
  			    command_shell_add(tmp->mountpoint, "tunefs -n enable %s/dev/%s", RunningAsInit ? "/mnt" : "", c2->name);
  			command_func_add(tmp->mountpoint, Mount, c2->name);
--- 989,995 ----
  			if (tmp->newfs && (!upgrade || !msgNoYes("You are upgrading - are you SURE you want to newfs /dev/%s?", c2->name)))
  			    command_shell_add(tmp->mountpoint, "%s %s/dev/%s", tmp->newfs_cmd, RunningAsInit ? "/mnt" : "", c2->name);
  			else
! 			    command_shell_add(tmp->mountpoint, "fsck_ffs -y %s/dev/%s", RunningAsInit ? "/mnt" : "", c2->name);
  			if (tmp->soft)
  			    command_shell_add(tmp->mountpoint, "tunefs -n enable %s/dev/%s", RunningAsInit ? "/mnt" : "", c2->name);
  			command_func_add(tmp->mountpoint, Mount, c2->name);
***************
*** 1015,1032 ****
  	}
      }
  
-     if (RunningAsInit) {
- 	dialog_clear_norefresh();
- 	msgNotify("Copying initial device files..");
- 	/* Copy the boot floppy's dev files */
- 	if ((root->newfs || upgrade) && vsystem("find -x /dev | cpio %s -pdum /mnt", cpioVerbosity())) {
- 	    msgConfirm("Couldn't clone the /dev files!");
- 	    return DITEM_FAILURE | DITEM_RESTORE;
- 	}
-     }
- 
      command_sort();
      command_execute();
      dialog_clear_norefresh();
      return DITEM_SUCCESS | DITEM_RESTORE;
  }
--- 1021,1032 ----
  	}
      }
  
      command_sort();
      command_execute();
+     if (rootdev && RunningAsInit) {
+ 	if (!Fake)
+ 	    unmount("/mnt/dev", MNT_FORCE);
+     }
      dialog_clear_norefresh();
      return DITEM_SUCCESS | DITEM_RESTORE;
  }
Index: boot_crunch.conf
===================================================================
RCS file: /pub/snapshots/cvsup/FreeBSD.cvs/src/release/i386/boot_crunch.conf,v
retrieving revision 1.50
diff -c -r1.50 boot_crunch.conf
*** boot_crunch.conf	19 Nov 2001 14:43:29 -0000	1.50
--- boot_crunch.conf	21 Nov 2001 02:13:07 -0000
***************
*** 11,21 ****
  progs cpio
  
  srcdirs /usr/src/sbin
! progs dhclient fsck fsck_ffs ifconfig
  progs mount_nfs newfs route rtsol
  progs slattach tunefs
- ln fsck_ffs fsck_4.2bsd
- ln fsck_ffs fsck_ufs
  
  srcdirs /usr/src/usr.bin
  progs find minigzip sed
--- 11,19 ----
  progs cpio
  
  srcdirs /usr/src/sbin
! progs dhclient fsck_ffs ifconfig
  progs mount_nfs newfs route rtsol
  progs slattach tunefs
  
  srcdirs /usr/src/usr.bin
  progs find minigzip sed

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011126000447F.matusita>