From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MhJXI-0008Bi-PO for mharc-grub-devel@gnu.org; Sat, 29 Aug 2009 04:43:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhJXH-0008AW-5f for grub-devel@gnu.org; Sat, 29 Aug 2009 04:43:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhJXG-00089f-GU for grub-devel@gnu.org; Sat, 29 Aug 2009 04:43:46 -0400 Received: from [199.232.76.173] (port=59868 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhJXG-00089U-Cy for grub-devel@gnu.org; Sat, 29 Aug 2009 04:43:46 -0400 Received: from fg-out-1718.google.com ([72.14.220.159]:25011) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MhJXF-0003yx-UV for grub-devel@gnu.org; Sat, 29 Aug 2009 04:43:46 -0400 Received: by fg-out-1718.google.com with SMTP id l26so143245fgb.12 for ; Sat, 29 Aug 2009 01:43:45 -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=kD93iveS3aDQKurPGqwy2O4Jupt7dmJjIlyPSIhVvrg=; b=XOAY9WXc7BNs6x7bmnzicWUUtjSdwwuSm6tVKhRcwEbdoevhkqd3d2yjTrak18OvkM 8xAo4EYseLCQqZSogLmAXnJH6rHyzmSyi142Y38C2u8w6fmLVwR3SQg3ccWc0kEOw/e5 hijVEcB2RTudxGJE5tPunWE/fyay0KEv3vPzY= 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=X6qHegwbtH/h9OJgjics5A9kwMvvItY/0ueS78PEESNJEdYyog0q1aiAmWduOh/PAF m5LceO5XfH2GrhUZwNcqTf81HraNKdgnm0dfqGEBHa3U95s8sEDKKrroKG4/5YEP0h/F HA9SSqSkq26A6/9i5XXFX9YCpWuTKxKN+Ol7Q= MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.86.240.9 with SMTP id n9mr313086fgh.70.1251535425051; Sat, 29 Aug 2009 01:43:45 -0700 (PDT) In-Reply-To: References: <48f46e890904190626l78773fdbp17f4ddd18566cdec@mail.gmail.com> Date: Sat, 29 Aug 2009 10:43:45 +0200 X-Google-Sender-Auth: aa6b17989798222b Message-ID: From: Michal Suchanek To: The development of GRUB 2 Content-Type: text/plain; charset=UTF-8 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:43:47 -0000 2009/8/29 Bean : > 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. > They are multiple but different. I guess automatic detection would be nice to have but writing detection for multiple formats might take some time so it would be better to get a bless command without detection initially and possibly add detection later. Thanks Michal