Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MtRkS-0008LQ-Ps for mharc-grub-devel@gnu.org; Thu, 01 Oct 2009 15:55:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtRkR-0008Jt-I8 for grub-devel@gnu.org; Thu, 01 Oct 2009 15:55:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtRkM-0008Cv-Kb for grub-devel@gnu.org; Thu, 01 Oct 2009 15:55:31 -0400 Received: from [199.232.76.173] (port=34440 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtRkM-0008Ch-GE for grub-devel@gnu.org; Thu, 01 Oct 2009 15:55:26 -0400 Received: from mail-px0-f202.google.com ([209.85.216.202]:64893) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtRkL-0006lq-Vj for grub-devel@gnu.org; Thu, 01 Oct 2009 15:55:26 -0400 Received: by pxi40 with SMTP id 40so547714pxi.24 for ; Thu, 01 Oct 2009 12:55:24 -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=pDZb1JHZIyzNDM6EGZxhm4khlD33KDNFcYknNsKYCGM=; b=xTAmdWhs8fHU6w4i4JF/9DvVqxjZ3+ox7JNY1dr3JnLbG1SiW/09G+Y5HBSOFY3LrZ q15iJqgO5/W+MeAShqpAfwt5dWiO7ZN6A5uNNpFqjAWE3SDunr9ak2BrDH6YihzadquD H7Mq4mxxU9eNHMCL2ANGOF9dp0rex6Y9qSOio= 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=B030of+8cYLgrJdu23V4z81ESIWngSw9TE1t6m9KSHhx6ocN2/r9Xu6x2EUk4gieQ5 1MeN0UmmE5r8rTP4dEVf9SMpybiZmffw3jN9+0UdDGbIS9KGaEdhnthpJyc458STAl4E 33s8PTYBGt3hUmCZRrYPUNYclu9xwuxcIYdbw= MIME-Version: 1.0 Received: by 10.140.172.20 with SMTP id u20mr651209rve.276.1254426924586; Thu, 01 Oct 2009 12:55:24 -0700 (PDT) In-Reply-To: References: Date: Fri, 2 Oct 2009 03:55:24 +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: Creating an (Apple) EFI bootable media 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: Thu, 01 Oct 2009 19:55:31 -0000 On Fri, Oct 2, 2009 at 2:29 AM, Michal Suchanek wrote: > 2009/10/1 Bean : >> On Thu, Oct 1, 2009 at 11:17 PM, Michal Suchanek wrote: >>> Hello >>> >>> Is there a way to reproducibly create Grub bootable media (CD, USB >>> stick) that can be used with Apple efi? >>> >>> I tried some ways of blessing the boot loader which I found on the net >>> but none works. >> >> Hi, >> >> You should format it as GPT, MBR may not work. The fs of choice is >> hfsplus, although I heard someone have successful boot with FAT. >> >> To bless the disk, use something like this: (only available for hfsplus) >> >> sudo bless --folder=/Volumes/USBDISK --file=/Volumes/USBDISK/efi/grub/grub.efi > > That's what I use and what can be found on varoius forums and wikis. > > It works neither with rEFIt nor grub for me. Perhaps I am not using > the = character, I should check that but bless does not report any > error and it actually changes the information (there is another bless > option to show the state). > >> >> bless writes the location of boot file to the hfsplus header. bless >> doesn't work on FAT. >> >> At startup, you need to press the Option key to show startup disk, and >> select the usb disk. > > The disk does not show in the options offered by the firmware. > Hi, Oh, perhaps some model doesn't support the usb boot method. >> >> The following command writes the boot device to nvram so that it's >> used by default: >> >> sudo bless --folder=/Volumes/USBDISK >> --file=/Volumes/USBDISK/efi/grub/grub.efi --setBoot > > As I understand it this is not required for hfsplus, only for fat > which cannot be blessed permanently. > It makes no difference either way. Each partition has a default boot file, but the default boot device is stored in the nvram. --setBoot sets this value. This is the same as selecting the boot device from Startup Disk. Although if firmware can't boot from usb, setting this would have any effects. > >> >>> >>> Also the default core image probably lacks some essential parts. I >>> managed to load it as rEFIt shell command by placing it in the tools >>> directory but it complained about "prefix" not being defined and I >>> seemingly had no commands - the help command was not available, and >>> pressing tab did not show anything. >> >> You can add the command to the generated EFI image with grub-mkimage, >> here are the list of modules I usually use: >> >> ./grub-mkimage -d . -o grub64.efi minicmd part_gpt part_msdos >> part_apple fat ext2 hfsplus hfs ntfs reiserfs xfs iso9660 udf ls >> search loopback linux chain reboot halt appleldr help configfile >> hexdump loadbios memrw fixvideo crc sh video efi_fb gfxterm font png >> coreui loadcfg menutest gfxmenu textmenu > > Hmm, I'm probably missing the shell or something. Can't the > installation pre-create an efi image that contains most options? AFAIK > the size of the image is not of much concern on efi so creating a > mostly complete image would simplify things. The above list contain most of the things I need, although you can use *.mod to include all modules, but I think some have unresolved symbol issue and you can get an error. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/