Evan Layton wrote:
> Dave Miner wrote:
>> Evan Layton wrote:
>>> Evan Layton wrote:
>>>> Dave Miner wrote:
>>>>> Evan Layton wrote:
>>>>>> I need to get a code review for the following simple fix:
>>>>>>
>>>>>> 5221 Improper message when creating a BE if no grub/menu.lst file
>>>>>> http://defect.opensolaris.org/bz/show_bug.cgi?id=5221
>>>>>>
>>>>>> Webrev:
>>>>>> http://cr.opensolaris.org/~evanl/5221/
>>>>>>
>>>>> No issues with the revised code, per se, but it raises a related 
>>>>> question: how should a user recover from a situation where the menu 
>>>>> file has been deleted or otherwise mangled?  Should beadm (or 
>>>>> bootadm) have a subcommand to regenerate a menu from an existing pool?
>>>>>
>>>>> Dave
>>>>>
>>>> That's not only feasible it's a great idea (I wish I'd thought of it. 
>>>> ;-) )
>>>> I'm adding that and will resend the code review when I'm finished.
>>>>
>>> I've added this and updated the webrev.
>>>
>> Well, I didn't necessarily expect it to be dealt with here, but that's 
>> fine.  However, I had something a bit more complete in mind.  If you've 
>> got a bunch of existing BE's already and somehow manage to wipe out your 
>> menu.lst, how do you get back?  We don't take snapshots of rpool itself 
>> (though perhaps we should), so unlike the rest of the system, there's 
>> nothing already present to fall back to.  The boilerplate piece of the 
>> menu file at the beginning isn't the interesting part, it's the menu 
>> entries for all of the existing BE's that I was more interested in 
>> recreating.
>>
>> Dave
> 
> The code is already in place such that if the BE doesn't have an entry
> in menu.lst one will be added when the BE is activated. I didn't add the
> code to fill in all the entries. I was thinking that because activating
> the BE will add the entry nothing more would be needed to at least get
> that BE to boot. I can certainly add code to fill in all the entries but
> it didn't seen necessary.
> 

OK, I understand your thinking, anyway.  I think it would be much nicer 
to do the whole thing, either automatically or as a separate subcommand.

I'd really like to figure out a means of not hard-coding the boilerplate 
stuff that you have in be_create_menu(), though.

Dave

Reply via email to