Bug 42162 - sysinstall(8): after restart, installation crashes, md0c filled up.
Summary: sysinstall(8): after restart, installation crashes, md0c filled up.
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.6.2-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-sysinstall (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-29 15:20 UTC by Yaad Golani
Modified: 2015-11-10 09:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yaad Golani 2002-08-29 15:20:02 UTC
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.

Fix: 

I have no idea ;-) 

G'luck.
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.
Comment 1 dwmalone freebsd_committer freebsd_triage 2002-08-31 23:02:06 UTC
Responsible Changed
From-To: freebsd-bugs->qa

Sounds like sysinstall forgot to chroot or chdir into the right 
directory. Assign this to the qa list.
Comment 2 john 2002-11-12 21:40:26 UTC
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/
Comment 3 randi freebsd_committer freebsd_triage 2009-06-06 20:32:33 UTC
Responsible Changed
From-To: freebsd-bugs->randi

Taking this.
Comment 4 Bruce Cran freebsd_committer freebsd_triage 2010-08-07 23:53:56 UTC
Responsible Changed
From-To: randi->brucec

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.
Comment 5 Rebecca Cran freebsd_committer freebsd_triage 2010-08-17 14:09:25 UTC
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
Comment 6 Bruce Cran freebsd_committer freebsd_triage 2011-01-23 21:13:41 UTC
Responsible Changed
From-To: brucec->freebsd-sysinstall

Back to the pool.
Comment 7 Enji Cooper freebsd_committer freebsd_triage 2015-11-10 09:07:24 UTC
sysinstall has been replaced by bsdinstall in FreeBSD 9.x. Closing.
Comment 8 Enji Cooper freebsd_committer freebsd_triage 2015-11-10 09:12:21 UTC
sysinstall has been replaced by bsdinstall in FreeBSD 9.x. Closing.