[SLOF] [PATCH] Fix ugly boot menu if devices have been specified with bootindex

Alexey Kardashevskiy aik at ozlabs.ru
Tue Apr 11 17:18:48 AEST 2017


On 11/04/17 16:17, Segher Boessenkool wrote:
> On Tue, Apr 11, 2017 at 01:52:11PM +1000, Alexey Kardashevskiy wrote:
>> On 10/04/17 19:26, Segher Boessenkool wrote:
>>> On Mon, Apr 10, 2017 at 05:34:58PM +1000, Alexey Kardashevskiy wrote:
>>>> imho aliases only make some sense when the user got just few devices,
>>>> preferably one of each type.
>>>
>>> How so?  Aliases are typically set up by platform-specific code, and
>>> such code will know what devices to call disk0 and disk1, or enet0 until
>>> enet3, etc.
>>>
>>> Aliases are useful because they a) are much shorter names, and b) are
>>> names that make more sense to the user.
> 
> [ snip ]
> 
>> SLOF:
>> 0 > devalias
>> disk3 : /pci at 800000020000000/scsi at 2
>> disk2 : /pci at 800000020000000/scsi at 1/disk at 101000000000000
>> disk1 : /pci at 800000020000000/scsi at 1/disk at 100000000000000
>> usb0 : /pci at 800000020000000/usb at 0
>> hvterm : /vdevice/vty at 71000100
>> scsi : /vdevice/v-scsi at 71000001
>> disk : /vdevice/v-scsi at 71000001/disk at 8000000000000000
>> nvram : /vdevice/nvram at 71000000 ok
> 
> Those are set up some automated way, numbered in the order they are
> found.  That is not very helpful if the configuration can change, no.

Not just configuration but QEMU version also can change this.

> If there is only ever one disk, or maybe two, having them automatically
> named "disk" and "disk1" is pretty handy.

Sure but since this is KVM/QEMU and there are already ways to control boot
order via other means (like bootindex property), aliases lost their initial
handiness.

In order to fix the initial bugreport, may be it could make sense to
create aliases such as "bootindexN" for all devices with a valid bootindex
property... Although I am not sure it is worth the effort and there will be
users for it, ever.


> 
> If the platform code does not set sane aliases, the user can do it
> himself:
>    nvalias boot-disk /some/long/path
> 
>> Personally I found aliases useful for:
>>
>> 1. typing "boot disk" in the firmware prompt of the actual console of Apple
>> G5 machine - where I could not cut-n-paste -
> 
> You can use a telnet console on Apple OF.  It works well :-)
>    " enet:telnet,10.0.0.1" io

But in reality I need it once - set up the correct boot command and that's
it :) But good to know, thanks!



-- 
Alexey


More information about the SLOF mailing list