From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 26 16:44:02 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA50F16A400 for ; Mon, 26 Feb 2007 16:44:02 +0000 (UTC) (envelope-from glarkin@sourcehosting.net) Received: from sourcehosting.net (sourcehosting.net [204.8.45.67]) by mx1.freebsd.org (Postfix) with ESMTP id 686F613C49D for ; Mon, 26 Feb 2007 16:44:02 +0000 (UTC) (envelope-from glarkin@sourcehosting.net) Received: (qmail 8391 invoked by uid 0); 26 Feb 2007 16:44:01 -0000 Received: from glarkin@sourcehosting.net by patches by uid 2033 with qmail-scanner-1.20rc1 (0.80 Clear:RC:1:. Processed in 0.020259 secs); 26 Feb 2007 16:44:01 -0000 X-Qmail-Scanner-Mail-From: glarkin@sourcehosting.net via patches X-Qmail-Scanner: 1.20rc1 (Clear:RC:1:. Processed in 0.020259 secs) Received: from 68-189-244-97.dhcp.oxfr.ma.charter.com (HELO Gregory-Larkins-Computer.local) (68.189.244.97) by 192.168.1.4 with SMTP; 26 Feb 2007 16:44:00 -0000 Received: from TWEETY (tweety.entropy.prv [192.168.1.9]) by Gregory-Larkins-Computer.local (Postfix) with ESMTP id C38B5D87550; Mon, 26 Feb 2007 11:43:33 -0500 (EST) From: "Greg Larkin" To: "'ghozzy'" Date: Mon, 26 Feb 2007 11:43:07 -0500 Organization: SourceHosting.net, LLC Message-ID: <00cc01c759c5$3546cbd0$0901a8c0@TWEETY> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6822 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 In-Reply-To: Importance: Normal Thread-Index: AcdYDVUqW5Fy9qFRTLu/wYgVRBe43wBtt+lA Cc: freebsd-hackers@freebsd.org Subject: RE: Instruction fault panic while installing 6.2 on VMware Server X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: glarkin@sourcehosting.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2007 16:44:02 -0000 >=20 > Hi, >=20 > On 2/23/07, Greg Larkin wrote: > > Hi everyone, > > > > I'm creating a standard FreeBSD 6.2 ISO image that I can use to > > perform unattended installations into VMware Server virtual=20 > machines. > > I'm using VMServer 1.0.1, and I've hit a roadblock when sysinstall > > attempts to create the root filesystem. > > > > The first thing to mention is that VMServer is running on a=20 > CentOS 4.4 > > host OS, and the CPU architecture is a Via C3 Nehemiah. =20 > Technically, > > the VMServer software is not supposed to work on the Via C3=20 > line, but > > the Nehemiah apparently supports the CMOV instruction that VMServer > > requires. I've been able to install Fedora Core 6 successfully and > > run it with no problems, so I'm wondering if I just need to find the > > right options to configure FreeBSD 6.2 to get it to work. > > > > Anyway, the VM boots fine, loads the FreeBSD ISO, and launches > > sysinstall, but as soon as newfs is invoked to make the root > > filesystem, I get this: > > > > Making a new root filesystem on /dev/ad0s1a > > Panic: privileged instruction fault > > (auto reboot) > > > > I've tried installing from the standard 6.2 release ISO as well as a > > custom ISO with a recompiled kernel, but I get the same error either > > way. I also tried disabling ACPI during boot with no success. > > > > My custom kernel config is included below. My first=20 > thought was that > > if I explicitly set the CPU to I486, that might help avoid the > > instruction fault, but that doesn't work. I didn't see any other > > options that looked like they would fix the fault, but I'm not very > > experienced at kernel configuration either. > > > > Does anyone have an idea how to troubleshoot this problem? Thank you > > for any help! > > > > Regards, > > Greg Larkin >=20 > I have experienced similar problem in VMware Workstation=20 > under Windows XP > on Via C3 Nehemiah processor since FreeBSD 5.x. In my case privileged > instruction fault shot somewhere in rc boot process. Tracing=20 > down the cause of > fault i found out that it was xstore instruction, which=20 > VMware did not emulate. > It turned out to be the merit of new random generator=20 > appeared somewhere in > 5.x, which detected the Via processor and tried to use its=20 > hardware random > number generator. My workaround was to patch kernel to=20 > disable using this Via > processor feature completely. The result was successful=20 > booting and running > FreeBSD 5.x and 6.x under VMware on this machine. >=20 > Attached is the patch i use for 6.x kernel. >=20 > Hope this helps. >=20 > -- > ghozzy >=20 Hi Ghozzy, Thanks very much for that - I appreciate it! I'm in the midst of building a new ISO, and I'll test it out and let you know what happens. I should have grepped /usr/src for "Nehemiah"! Do you (or others) think there is any call for either VMware Server detection in the kernel or a kernel config option specifying that the kernel is going to run in a VM? =20 I wonder if patches like this and others would be useful to add to the official kernel sources, since VMware supports FreeBSD as a guest OS? Perhaps there are other kernel optimizations and configuration options that would make sense if the kernel knew it was running in a VM? Regards, Greg Larkin