Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JI3B0-0007ex-ML for mharc-grub-devel@gnu.org; Thu, 24 Jan 2008 09:35:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JI3Az-0007cz-FV for grub-devel@gnu.org; Thu, 24 Jan 2008 09:35:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JI3Ax-0007Yx-1S for grub-devel@gnu.org; Thu, 24 Jan 2008 09:35:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JI3Aw-0007Yg-Rq for grub-devel@gnu.org; Thu, 24 Jan 2008 09:35:30 -0500 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JI3Aw-00073u-MF for grub-devel@gnu.org; Thu, 24 Jan 2008 09:35:30 -0500 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JI3Ah-0007Ze-F7 for grub-devel@gnu.org; Thu, 24 Jan 2008 15:35:19 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JI38c-0002I9-H1 for grub-devel@gnu.org; Thu, 24 Jan 2008 15:33:06 +0100 Date: Thu, 24 Jan 2008 15:33:06 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080124143306.GB8248@thorin> References: <20080119170105.GJ1341@kirkkit.kollasch.net> <87myqvzkqk.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: booting kernel of NetBSD (Re: UFS (FFS) support seems broken in grub2) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2008 14:35:33 -0000 On Thu, Jan 24, 2008 at 06:20:07AM -0800, walt wrote: > >Do you want to work on a loader for BSD? That would be the ideal > >solution and a nice opportunity for you to learn :-) > > Sure, but don't expect very much :o) We know that grub legacy can > boot NetBSD, so maybe I can get grub2 to do the same. Debugging > a free-standing program like grub is something I've never tried. > How would you approach the problem if you were going to do it > yourself? I was afraid too, but if you're used to debugging normal programs it's not so difficult. GRUB is just like a big, single-threaded C program really. I usually just turn on debugging output to grasp where things start to go ill, and add lots printfs to figure out what lines of code are reached, at which point a value is corrupted, etc. When I reach a cpu fault, I tend to put a "while (1);" loop someplace and start moving it forward till I find the last point where runtime is still "sane". Also, if you're familiar with an emulator that supports debugging (I think both qemu and bochs do), you can use that (but without direct debugging symbol support, of course). -- Robert Millan I know my rights; I want my phone call! What use is a phone call… if you are unable to speak? (as seen on /.)