From owner-freebsd-questions@FreeBSD.ORG Fri Aug 6 04:28:06 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C575416A4CE for ; Fri, 6 Aug 2004 04:28:06 +0000 (GMT) Received: from ms-smtp-03.nyroc.rr.com (ms-smtp-03.nyroc.rr.com [24.24.2.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49F7F43D2F for ; Fri, 6 Aug 2004 04:28:04 +0000 (GMT) (envelope-from ben@h50.net) Received: from box.h50.net (alb-24-29-69-165.nycap.rr.com [24.29.69.165]) i764Rxv2018178 for ; Fri, 6 Aug 2004 00:28:01 -0400 (EDT) Received: from [192.168.0.4] (ool-44c13b65.dyn.optonline.net [68.193.59.101]) (authenticated bits=0) by box.h50.net (8.12.10/8.12.10) with ESMTP id i764Rmnx002318 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Fri, 6 Aug 2004 00:27:56 -0400 (EDT) (envelope-from ben@h50.net) Mime-Version: 1.0 (Apple Message framework v618) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: freebsd-questions@freebsd.org From: Benjamin Polidore Date: Fri, 6 Aug 2004 00:27:34 -0400 X-Mailer: Apple Mail (2.618) X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Virus-Scanned: clamd / ClamAV version 0.70, clamav-milter version 0.70j Subject: How I took my machine down and fixed it. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Aug 2004 04:28:06 -0000 I had a bit of a unique experience with my FreeBSD 5.2.1 server, and I thought I'd share it because I found a lot of my questions difficult to answer. I have a Via C3 800 processor on this particular server, and I thought I'd recompile with the cpu flag set in make.conf. dmesg reports this: CPU: VIA C3 Ezra (800.03-MHz 686-class CPU) So I set the flag to i686 (I would later learn that this processor only supports the i586/mmx flag) and did a make buildworld. No problem here, but when I did make installworld, things went very wrong. Errors and core dumps (illegal instruction) started raining down, and then I lost power and when I powered up, the server was a goner. So I tried to log in from the serial console, but NOTHING worked. In single user mode, I couldn't even run ls. This is a big problem. To begin fixing the system, I downloaded 5.2.1's disc2 iso and tried to log into the live filesystem shell, but sysinstall couldn't mount the CD. I searched around and realized that I was using a CD drive that supports DMA, so I had to turn that on before booting up: OK set hw.ata.ata_dma="1" OK set hw.ata.atapi_dma="1" OK boot Now I could get into the live filesystem, and I felt pretty good about my plan. I wanted to overwrite /bin, /sbin, /usr/bin and /usr/sbin (as well as libexet, etc) from the live disc. So first I had to mount the drives. I tried to mount my root slice first and was greeted with some problems: mount -w /dev/ad0s1a /mnt/root Resulted in: Operation Not Permitted But I could mount my usr slice. Again, with a bit of research, I realized that since these slices were dirty, they needed to be fsck'd before I could mount them. I tried fsck, but that complained about a lack of fstab. So I had to do a: fsck_ffs -y /dev/ad0s1a On each slice before I could mount. Mounting worked fine once I had done this, so I tried to start copying files, and was greeted with more errors. This time, again: Operation Not Permitted For each copy. This seemed really confusing to me, and after a lot of internet research, I found that I needed to unset the system immutable flag. chflags -R noschg /mnt/root ..etc Now I could copy files from the fixit disc, and I was able to reboot and do a proper make build/installworld with i586/mmx. So my system is back after many hours of frustration. Hope this can help someone else out there. Yours, Ben Polidore