Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MhIq2-0004Hk-Jf for mharc-grub-devel@gnu.org; Sat, 29 Aug 2009 03:59:06 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhIq1-0004HK-0a for grub-devel@gnu.org; Sat, 29 Aug 2009 03:59:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhIpz-0004H8-G8 for grub-devel@gnu.org; Sat, 29 Aug 2009 03:59:04 -0400 Received: from [199.232.76.173] (port=44457 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhIpz-0004H5-Bn for grub-devel@gnu.org; Sat, 29 Aug 2009 03:59:03 -0400 Received: from mx20.gnu.org ([199.232.41.8]:46862) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MhIpy-0002xw-Na for grub-devel@gnu.org; Sat, 29 Aug 2009 03:59:02 -0400 Received: from fg-out-1718.google.com ([72.14.220.157]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MhIpx-0008A0-BM for grub-devel@gnu.org; Sat, 29 Aug 2009 03:59:01 -0400 Received: by fg-out-1718.google.com with SMTP id 22so145169fge.12 for ; Sat, 29 Aug 2009 00:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=tayQzoWyrB7dBgaPhviF4TVSIReJByBf2dFHgIcTJEE=; b=kdSGLLylrjwnquR95SL5lRmc52emQsk86C3ayvqlQvBeZHA05AbWfclctZC3k9fMOI W0UleDekDq0JGLyciNtGMYZ3uER2IKGCLR+/5y+ObxibqyEuxwM5qVeM3XGOiqC9jEdE XV7r0dQU3HMY3PuVg4+sEBwXtYXRWAtG924rk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=MzqGD+OJxuoKnMDWtb0/U7AsdAIFgU17LEVtn6l+/5lMk6owskci1nEjJvLvEYX/y0 OvUfal/ZesR2x/KyBBl4w+Uo/xXLOOcSS+3zdNk/BzrYgEvL+RrGzmGwYJZQ8nmOewsy 6FmVnO5nYcq09xIx69FSdGJHX0E/5RY8pm8GM= MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.86.214.12 with SMTP id m12mr311427fgg.55.1251532739039; Sat, 29 Aug 2009 00:58:59 -0700 (PDT) In-Reply-To: References: <48f46e890904182151t55ad5e29sd7a280c62574ba40@mail.gmail.com> <48f46e890904190626l78773fdbp17f4ddd18566cdec@mail.gmail.com> Date: Sat, 29 Aug 2009 09:58:59 +0200 X-Google-Sender-Auth: 5159ea01bf99b8a9 Message-ID: From: Michal Suchanek To: The development of GRUB 2 Content-Type: text/plain; charset=UTF-8 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:59:05 -0000 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? Thanks Michal