grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] bless command


From: Michal Suchanek
Subject: Re: [PATCH] bless command
Date: Sat, 29 Aug 2009 10:43:45 +0200

2009/8/29 Bean <address@hidden>:
> On Sat, Aug 29, 2009 at 3:58 PM, Michal Suchanek<address@hidden> wrote:
>> 2009/8/29 Bean <address@hidden>:
>>> On Sat, Aug 29, 2009 at 2:27 PM, Vladimir 'phcoder'
>>> Serbinenko<address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]