Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MhIkU-0000tS-G1 for mharc-grub-devel@gnu.org; Sat, 29 Aug 2009 03:53:22 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhIkT-0000sE-QV for grub-devel@gnu.org; Sat, 29 Aug 2009 03:53:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhIkP-0000kY-8Z for grub-devel@gnu.org; Sat, 29 Aug 2009 03:53:21 -0400 Received: from [199.232.76.173] (port=33382 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhIkP-0000kK-40 for grub-devel@gnu.org; Sat, 29 Aug 2009 03:53:17 -0400 Received: from mx20.gnu.org ([199.232.41.8]:46624) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MhIkO-0002O0-AS for grub-devel@gnu.org; Sat, 29 Aug 2009 03:53:16 -0400 Received: from mail-yw0-f188.google.com ([209.85.211.188]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MhIkN-0007uB-OJ for grub-devel@gnu.org; Sat, 29 Aug 2009 03:53:15 -0400 Received: by ywh26 with SMTP id 26so3676214ywh.5 for ; Sat, 29 Aug 2009 00:53:14 -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=i8BcyJhjXWprzagSuKoKVJrSIMHIuMf1x60fI/US9Cc=; b=he7ZoYg8cPVwEqOasmGkstyc9rk6bBgQmJgceYPbkyakm6mfE+H9r7mJJsUEVuDIEB wgYl2aPX9e6PCf1X5L0gbHWU1J86vzjV6Md8kMSG9jCGqkCvuQ8p5CHAUKv315Ho0FVn DyixrnRYcnZfFEp7ps37do/h9PKENAXN3Hxqw= 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=gic/bo9qrTEa1uqVw5c2l0bgdSysu4wdbJqx6wUaqNd42OjK8Ykpnw9Ky/eJEqerQY pwQ22MlSrfKgT6cfPy996E45L5+r7a4EU1DNgBEGhbEVyTpzxKCWbP+vFjZVYup134hT 3hJyk6+Pq9JxAplfQ4UyiykeGi9i9izc/1Klg= MIME-Version: 1.0 Received: by 10.150.213.18 with SMTP id l18mr2405749ybg.183.1251532393899; Sat, 29 Aug 2009 00:53:13 -0700 (PDT) In-Reply-To: References: <48f46e890904182151t55ad5e29sd7a280c62574ba40@mail.gmail.com> <48f46e890904190626l78773fdbp17f4ddd18566cdec@mail.gmail.com> Date: Sat, 29 Aug 2009 15:53:13 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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 07:53:22 -0000 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 -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/