From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 2 11:00:16 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3697516A4CF for ; Thu, 2 Dec 2004 11:00:16 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id D358943D5A for ; Thu, 2 Dec 2004 11:00:15 +0000 (GMT) (envelope-from valenok@gmail.com) Received: by wproxy.gmail.com with SMTP id 36so16158wra for ; Thu, 02 Dec 2004 03:00:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=YkLtaOH1zcrlcxVWRRMoeb/emNlerk1E4Q9Y0mdC7oYMOIAqp5ODzujYlO9Z2Te9xSTjemxAO+dT4+jGwA81y1qacdQA4tfPyAW+Hy7UjLqF1xUEnUwpWjyxcNTSfZo9h8xLlKa2Gm4Gzp1M2C18vHLA5DnJujEKXrix5j4FX5w= Received: by 10.54.6.79 with SMTP id 79mr1208899wrf; Thu, 02 Dec 2004 03:00:14 -0800 (PST) Received: by 10.54.44.19 with HTTP; Thu, 2 Dec 2004 03:00:14 -0800 (PST) Message-ID: <72c3a957041202030057e33861@mail.gmail.com> Date: Thu, 2 Dec 2004 11:00:14 +0000 From: Sergey Lyubka To: John Baldwin , freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 02 Dec 2004 13:34:34 +0000 Subject: /boot/boot problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Sergey Lyubka List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Dec 2004 11:00:16 -0000 Hi John, thanks for commiting my previous boot2.c patch. I would appreciate any hint about the following problem. I am using 5.3, sources from 1 Dec 2004. The environment I am using is this: ATA disk has one partition with one file, /kernel. /kernel has MFS root filesystem. there is no /boot/loader, /kernel is boot by the first stage loader (/boot/boot). So, the problem is: 1. when /kernel is kgzipped, It says 'Invalid format'. that means, inflate() could not correctly unzip the kernel. 2. when /kernel is not kgzipped, boot crashes: int=06 err=0 efl=10002 eip=c0432540 eax=c0432540 ebx=c2152600 ecx=18 edx=a050001e esi=947a4 edi=c0432540 ebp=7 esp=9e6f0 cs:eip= ff ff ff ff ff .... (all ff) ss:eip=69 95 00 00 00 00 00 80 1c 00 50 00 00 00 00 00 objdump -d kernel shows, that eip c0432540 is exactly where kernel's .text segment starts: c0432540 <.text>: c0432540: 66 c7 05 72 04 00 00 movw $0x1234,0x472 c0432547: 34 12 c0432549: 55 push %ebp So it looks like that kernel was mapped wrong ? 3. The craziest thing is that *sometimes* it works! I do build kernels again and again, without cvsup-ing the sources, and sometimes it works, sometimes not. Any comment, hint etc would be very appreciated. sergey