Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MhIyF-0006kq-CG for mharc-grub-devel@gnu.org; Sat, 29 Aug 2009 04:07:35 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhIyD-0006k7-AI for grub-devel@gnu.org; Sat, 29 Aug 2009 04:07:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhIy8-0006i5-LH for grub-devel@gnu.org; Sat, 29 Aug 2009 04:07:32 -0400 Received: from [199.232.76.173] (port=53255 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhIy8-0006hz-GD for grub-devel@gnu.org; Sat, 29 Aug 2009 04:07:28 -0400 Received: from mail-bw0-f222.google.com ([209.85.218.222]:41045) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MhIy7-0004IO-Vw for grub-devel@gnu.org; Sat, 29 Aug 2009 04:07:28 -0400 Received: by mail-bw0-f222.google.com with SMTP id 22so2366410bwz.42 for ; Sat, 29 Aug 2009 01:07:27 -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=52moOLNcYC/KssUlQCKltrmQ8OkK6mK/CyIZqqrfCtM=; b=YvhwDp0/avwXZoB+Rlb6JOb18SN/+2HtCPHOZALNpzutgEk5nN/qdsGWN8UUMGcfxD WAAIsTdLGUyJgNMEQt5IkiZk/ytT3VYluPIPkMIhCrtR12ZIlJ4J/kGh5jSziAZXOj6E u+171VsgxqtCeg79kGyoHsZbBcWEXRQIENKFs= 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=i447rfNBx7k00D+y15IfrpEXazejG5Qwqze0dwYx29tR77gLZxoPV/l+jBJscYbeC6 UxHSxlvG+9kLRp0bHTl4ZBlvNR5QnBON40DruJERfT6LY+OWoTS44rayUORw8krhQ63u /Oe1my2mwQ+wrbJgtuzmfK7SXTtE2BQvmpDIs= MIME-Version: 1.0 Received: by 10.204.160.143 with SMTP id n15mr1742978bkx.183.1251533247605; Sat, 29 Aug 2009 01:07:27 -0700 (PDT) In-Reply-To: References: <48f46e890904182151t55ad5e29sd7a280c62574ba40@mail.gmail.com> <48f46e890904190626l78773fdbp17f4ddd18566cdec@mail.gmail.com> Date: Sat, 29 Aug 2009 10:07:27 +0200 Message-ID: From: "Vladimir 'phcoder' Serbinenko" 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:07:33 -0000 On Sat, Aug 29, 2009 at 9:58 AM, 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? > Actually it's even easy. EFI files are exes (Mark Zbykowsky or some fat binaries signatures) while OFW files are ELF AFAIR > Thanks > > Michal > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git