Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MhJ1G-0007tn-TM for mharc-grub-devel@gnu.org; Sat, 29 Aug 2009 04:10:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhJ1F-0007tB-6z for grub-devel@gnu.org; Sat, 29 Aug 2009 04:10:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhJ1A-0007qX-QN for grub-devel@gnu.org; Sat, 29 Aug 2009 04:10:40 -0400 Received: from [199.232.76.173] (port=43886 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhJ1A-0007qU-NG for grub-devel@gnu.org; Sat, 29 Aug 2009 04:10:36 -0400 Received: from mail-yw0-f188.google.com ([209.85.211.188]:35449) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MhJ19-0004tO-Ue for grub-devel@gnu.org; Sat, 29 Aug 2009 04:10:36 -0400 Received: by ywh26 with SMTP id 26so3688386ywh.5 for ; Sat, 29 Aug 2009 01:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=s+geQ4nScQyR9ZORsbmzvOcDDrfWNnqC+GJoQ4pk5fU=; b=oOrOxdCwL9B9A87lUdB6i+RxRQnzzMb3PSMLcn7uuVzNHj1vRqV2yEGDQz5806nRCd +c+U7KPR3URHsNDxLmPT/uU+siY9iTuH/FsAsMHDvVEXx9qGFBUAtswSUzVE1yB9lFTx 8urjYAIpo/Gp0xu8NqjPpbMTflZapC8381Dts= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=jHlZfIVAa50D98k4LVlj/8XnnBI6Pvfppzd0jJoT317II8n7LKqijtHKFlCiZCzXQw YlzIeN4cnMYvJ1z3GkaNd1Jn1f3bglt7yRgQzpKNCOBlTYIQmflEyfuuDLgXvTSCTF/r oT2NIrEEH6uRW5T9zGCCigDnfZbG8SPlXOWZs= MIME-Version: 1.0 Received: by 10.150.114.1 with SMTP id m1mr3749563ybc.182.1251533435450; Sat, 29 Aug 2009 01:10:35 -0700 (PDT) In-Reply-To: References: <48f46e890904182151t55ad5e29sd7a280c62574ba40@mail.gmail.com> <48f46e890904190626l78773fdbp17f4ddd18566cdec@mail.gmail.com> Date: Sat, 29 Aug 2009 16:10:35 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] bless command 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: Sat, 29 Aug 2009 08:10:41 -0000 On Sat, Aug 29, 2009 at 3:58 PM, Michal Suchanek wrote: > 2009/8/29 Bean : >> On Sat, Aug 29, 2009 at 2:27 PM, Vladimir 'phcoder' >> Serbinenko wrote: >>>> Actually, I think the correct handling is to first bless a boot >>>> directory (storing the directory id in header), then bless a boot file >>>> (add +tbxi attribute), that's why the bless command in OSX needs needs >>>> both --folder and --file option. >>> AFAIK --file has no effect for intel macs. >> >> Hi, >> >> After more testing, I believe the booting process works like this: >> >> One important difference between openfirmware and efi is that >> openfirmware stores file path in nvram, while efi stores device path. >> The default boot file for openfirmware is like this: >> >> device:\\+tbxi >> >> Which means the files which +tbxi attribute in the blessed directory. >> >> But efi only store the boot device (uuid), so it needs to use the >> blessed file to boot. >> >> So to distinguish these two situation, we can have too options for bless: >> >> bless [--bootinfo PATH_TO_BOOTX] [[--bootefi PATH_TO_BOOTEFI] >> >> --bootinfo set the blessed directory plus +tbxi, while --bootefi set >> the blessed file, this way we could specify different boot files for >> openfirmware and efi, something like this: >> >> bless --bootinfo /grub.elf --bootefi grub.efi >> > > Wouldn't it be possible to do a check in bless that determines if the > file is for openfirmware of efi? Hi, I think it would be better to specify the type explicitly, as there are multiple formats supports by both platform. OpenFirmware support bootinfo, xcoff and elf, while efi support i386-efi, x86_64-efi and fat binary. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/