Re: [patch] set prefix on PPC

2005-04-17 Thread Hollis Blanchard
On Apr 17, 2005, at 2:38 PM, Marco Gerards wrote: Hollis Blanchard <[EMAIL PROTECTED]> writes: Updated patch which uses devaliases. On my pegasos the devalias is looked up perfectly for both ethernet and the harddisk. :) + if (partition) +{ + unsigned int partno = grub_strtoul (partition,

Re: partition numbering

2005-04-17 Thread Marco Gerards
"Yoshinori K. Okuji" <[EMAIL PROTECTED]> writes: > On Sunday 17 April 2005 08:23 pm, Hollis Blanchard wrote: >> Anyways, GRUB, as a bootloader that uses firmware services, surely must >> match firmware names and numbering. For example, on x86 you identify >> disks as "hd0" and "hd1" because this i

Re: [patch] set prefix on PPC

2005-04-17 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > Interestingly, as Nico mentioned before, there are often multiple > aliases to the same device. In my case, when I boot from "hd", prefix > is set to "ultra0", because that comes first in the /aliases property > list. Everything works, but it could be

Re: [patch] set prefix on PPC

2005-04-17 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > Updated patch which uses devaliases. On my pegasos the devalias is looked up perfectly for both ethernet and the harddisk. :) > + if (partition) > +{ > + unsigned int partno = grub_strtoul (partition, 0, 0); > + partno--; /* GRUB part

Re: partition numbering

2005-04-17 Thread Yoshinori K. Okuji
On Sunday 17 April 2005 08:23 pm, Hollis Blanchard wrote: > Anyways, GRUB, as a bootloader that uses firmware services, surely must > match firmware names and numbering. For example, on x86 you identify > disks as "hd0" and "hd1" because this is how the firmware enumerates > them. Not true. It cou

Re: [patch] set prefix on PPC

2005-04-17 Thread Hollis Blanchard
On Apr 15, 2005, at 3:24 PM, Marco Gerards wrote: When booting on the pegasosII I see the following problem: grub> set prefix=(/[EMAIL PROTECTED]/[EMAIL PROTECTED],1/[EMAIL PROTECTED],0,3) That is when I am booting using `boot hd:4 grub)'. The prefix contains an OF device name which will not work i

Re: partition numbering

2005-04-17 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > On Apr 17, 2005, at 12:44 PM, Marco Gerards wrote: > >> Hollis Blanchard <[EMAIL PROTECTED]> writes: >>> >>> If GRUB counts partition numbers different than Open Firmware, I >>> consider this a bug that must be fixed. 0-based partition numbers are >>>

Re: [patch] set prefix on PPC

2005-04-17 Thread Hollis Blanchard
Updated patch which uses devaliases. -Hollis 2005-04-17 Hollis Blanchard <[EMAIL PROTECTED]> * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_encode_devname): New prototype. (grub_ieee1275_get_filename): Likewise. * kern/powerpc/ieee1275/init.c (grub_tr

Re: partition numbering

2005-04-17 Thread Hollis Blanchard
On Apr 17, 2005, at 12:44 PM, Marco Gerards wrote: Hollis Blanchard <[EMAIL PROTECTED]> writes: If GRUB counts partition numbers different than Open Firmware, I consider this a bug that must be fixed. 0-based partition numbers are quite confusing enough. And I do not consider that a bug. We can no

Re: partition numbering

2005-04-17 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > On Apr 14, 2005, at 12:05 PM, Marco Gerards wrote: > > + unsigned int partno = grub_strtoul (partition, 0, 0); > + partno--; /* GRUB partition numbering is 0-based. */ Right. But how can you be sure both match? >>> >>> Eh

Re: partition numbering (was: set prefix on PPC)

2005-04-17 Thread Hollis Blanchard
On Apr 14, 2005, at 12:05 PM, Marco Gerards wrote: + unsigned int partno = grub_strtoul (partition, 0, 0); + partno--; /* GRUB partition numbering is 0-based. */ Right. But how can you be sure both match? Eh? OF partition numbers are 1-based. To convert to GRUB's 0-based numbering, we s