From nobody@FreeBSD.org  Thu Aug 29 07:14:14 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2ABF537B400
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 Aug 2002 07:14:14 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D476743E6A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 Aug 2002 07:14:13 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g7TEEDOT094139
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 29 Aug 2002 07:14:13 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g7TEEDem094138;
	Thu, 29 Aug 2002 07:14:13 -0700 (PDT)
Message-Id: <200208291414.g7TEEDem094138@www.freebsd.org>
Date: Thu, 29 Aug 2002 07:14:13 -0700 (PDT)
From: Yaad Golani <usey@actcom.co.il>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Installation (sysinstall) crashes, md0c filled up.
X-Send-Pr-Version: www-1.0

>Number:         42162
>Category:       bin
>Synopsis:       sysinstall(8): after restart, installation crashes, md0c filled up.
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-sysinstall
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 29 07:20:02 PDT 2002
>Closed-Date:    
>Last-Modified:  Sun Jan 23 21:13:57 UTC 2011
>Originator:     Yaad Golani
>Release:        FreeBSD 4.6.2-RELEASE
>Organization:
none
>Environment:
FreeBSD Hmpf 4.6.2-RELEASE FreeBSD 4.6.2-RELEASE #0: Tue Aug 27 16:00:17 IDT 2002     root@Hmpf:/usr/src/sys/compile/USEY  i386

>Description:
Greetings and Salutations.

I've been a Linux user for six years now, and recently decided to move into the magical BSD world.  I asked here and there, and decided the best distribution for me would be FreeBSD.

Since I don't have a CD-R, and yet wanted to try out the new operating system immediately (or atleast, as soon as possible), I downloaded the two boot images, copied them into floppy disks and rebooted my computer happilly.

The installation screen popped up. I proceeded with a `STANDARD' mode, and granted the FreeBSD Partition 6 GBs of HDD.  Then the disk label asked me how would I like to allocate my space; but since I don't know how it should be (although I know the general structure of the system), I chose the [A] option, which does it all automatically, in order to prevent future-to-be painful problems and extra head aches.

Then I was asked to choose the type of media I'd like to install it from, so I chose `FTP Installation', selected a customized FTP server which is geographically close to me, adjusted the network settings, chose a _functioning_ DNS which I use on a daily basis, and took off.
But then something weird happened; it failed to resolve the
FTP's hostname into a numerical IP address -- and thus login to it.
I thought "Oh well, maybe there's something wrong with the DNS at the moment",

CTRL ^C 'ed, and pressed the option of restarting the sysinstall (so I
wouldn't have to reboot the machine). then I've chosen the same options
EXACTLY. Same mount points, same disk range.. even the same DNS.

Surprisingly, this time it worked and I received the following messages;

"Extracting bin into / directory ..." -- downloaded eight files or so,

BUT THEN! :

"Write failure on transfer! (wrote -1 bytes of 240440 bytes)",
"/: Write failed, file system is full",
"Pid 79 (cpio), uid 0 on /: file system is full",  and so on.
So I switched to F4, typed "df -h" and saw the following table:

FileSystem   size  used  avail  capacity  mounted on

/dev/md0c    4.1m  4.1m  -40.5k  101%     /
/dev/ad0s1a  126m  2.4m  113m    2%       /mnt
/dev/ad0s1f  252m  2.0k  232m    0%       /mnt/tmp
..

As you can see, it looks like the ram disk (md0c) has filled itself up for some
reason, instead of doing whatever is it that it was supposed to do.

After receiving these error messages, I had no other choice but rebooting the system. Needless to say I have tried different variations of modes (custom, expert, standard, FTP servers and what-not) a several times, but every time it failed to resolve the FTP's hostname the first time and I had to restart it, until it hit me -- I was so obsessed with the md0c (which I didn't know what it stands for at that time) and sure that I've done something wrong with the partitioning and/or slicing, that I didn't link the act of restarting sysinstall with the failure of the installation.

So then, instead of entering an "ftp://hostname/ ...", I entered a direct IP address.  That worked perfectly well and now I'm reporting that bug out of my new FreeBSD system ;-)

What still remains a mystery to me, though, is that sysinstall always failed to resolve the hostname the first time, but succeeded the second.

Anyway, just wanted to report that thingy.. hope you guys could get it fixed in the next release.

-Cheers!
   Ya'ad Golani.
>How-To-Repeat:
I guess you could just try to use a non-working DNS server, restart sysinstall with CTRL-C and the restarting option, and try again.
>Fix:
I have no idea ;-) 

G'luck.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->qa 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Sat Aug 31 15:02:06 PDT 2002 
Responsible-Changed-Why:  
Sounds like sysinstall forgot to chroot or chdir into the right 
directory. Assign this to the qa list. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=42162 

From: John Baldwin <john@baldwin.cx>
To: freebsd-gnats-submit@FreeBSD.org
Cc: murray@FreeBSD.org
Subject: Re: i386/42162: Installation (sysinstall) crashes, md0c filled u
Date: Tue, 12 Nov 2002 16:40:26 -0500 (EST)

 The problem is that sysinstall assumes that you have already done
 the chroot into /mnt if you do a restart.  However, this is not
 always the case.  Arguably since a restart kicks you back to the
 main menu, sysinstall should always chroot() in install.c.  At the
 very least it should chroot if it hasn't done it yet.  The line in
 question is:
 
     if (!Restarting && chroot("/mnt") == -1) {
 
 in installInitial() in install.c.
 
 -- 
 
 John Baldwin <john@baldwin.cx>  <><  http://www.FreeBSD.org/~jhb/
 "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
Responsible-Changed-From-To: freebsd-bugs->randi 
Responsible-Changed-By: randi 
Responsible-Changed-When: Sat Jun 6 19:32:33 UTC 2009 
Responsible-Changed-Why:  
Taking this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=42162 
Responsible-Changed-From-To: randi->brucec  
Responsible-Changed-By: brucec 
Responsible-Changed-When: Sat Aug 7 22:53:56 UTC 2010 
Responsible-Changed-Why:  
Grab - I have a patch to fix this. 
The problem is that to restart, sysinstall calls execl(), and then runs again.  
However, it checks to see if it's running as init by seeing if the PID is 1,  
which after restarting it won't be. It then goes on to assume it's running  
in an already installed system, where distributions etc. should be  
extracted to /, not /mnt. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=42162 

From: Bruce Cran <bruce@cran.org.uk>
To: bug-followup@FreeBSD.org, usey@actcom.co.il
Cc:  
Subject: Re: bin/42162: sysinstall(8): after restart, installation crashes,
 md0c filled up.
Date: Tue, 17 Aug 2010 14:09:25 +0100

 execl doesn't actually change the PID so John's correct that the
 problem will be with the chroot. I'll put together a patch to fix it.
 
 -- 
 Bruce Cran
Responsible-Changed-From-To: brucec->freebsd-sysinstall 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Sun Jan 23 21:13:41 UTC 2011 
Responsible-Changed-Why:  
Back to the pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=42162 
>Unformatted:
