Forwarding Pavel Pisa's e-mail to the subscribers only list.
On Friday 16 October 2009 13:57:47 Vladimir 'phcoder' Serbinenko wrote:
Aleš Kapica wrote: > Dear friends,
Hello Vladimir and other GRUB2 developers, I am replying to your review as one of the patch authors.
> Nobody can't use options 150 from DHCP, because GRUB2 don't have any > driver for network adapters. Network task are done only through > adapters PXE firmware. PXE passes informations only about IP > addresses, but no DHCP options. I let someone more familiar with PXE than me to answer this.
The 150 option would be usesfull a lot, but I do not know PXE good enough to support that. The PXE firmware seems to be problematic (high probability of bugs and diversity) to me anyway so we want to use as small subset as possible. As for scalability, I agree, that use of single config file with checking for each IP is horrible hack, but there is no problem to source to another IP specific file (menu-xxx.xxx.xxx.xxx.lst) with separate menu configuration when own IP is known and if file is not found switch do default one. The knowledge of own IP can be even win in other situations. We use same diskless bootup setup provided by single server from multiple networks connected through more VLANs. The server provids NFS root through direct connection to the more subnets behind local firewall and server IP is different for these subnets. The knowledge of pxe_sever_ip from DHCP provides a simple way to use same conjfiguration with Linux commandline adjusted for right server IP for each subnet direct connection. So I strongly vote for a way to be able to use server IP provided by DHCP/PXE. The implementation details are other story. I have almost no Grub programming experience and I am prepared to follow your suggestions.
> In current state these informations is possible only to list, that > means that they aren't a part of the grubs environment. > My patch solve this. Now is this possible to set PXE informations as > grubs environment variables, and use in them in grub.cfg for > identification of the booting machine. > > Is there any problem with adding of my patch? I've looked into your first patch. The idea is good however patch has some problems: 1) Don't hardcode array sizes. Use sizeof ("XXX.XXX.XXX.XXX") instead
Yes, that a good idea, may it be add +1 or +2 for safety even that not required.
2) Exporting variables shouldn't require user to run a command. Just export them as soon as possible (e.g. on module load)
I am not sure about module initialization order, if the module is integrated to the main grub image. Is it ensured, that internal PXE C variables are set before any module is loaded? May it be, better solution would be to ensure unconditional variables setting if PXE base is used. But is the environment variables subsystem ready at that time? My knowledge is not deep enough to reply to these without longer analysis so I would take this safe approach.
3) "your_ip" is problematic name. I would prefer "local_ip" and "remote_ip"
I agree that name is strange but I tried to follow names already used in the sources. My personal vote would be to have "station_ip" and "server_ip" but I do not see this so much important. Feel free to modify or suggest names according your preferences. If you prefer to receive new patch version, we will prepare and test it in university labs and VLANs infrastructure on Monday. By the way we have experienced some troubles with actual kernel image load over PXE with our motherboards. Short files reading and typing over PXE has no problems. Has somebody this experience. Can that be PXE mainboard firmware bug? Thanks in advance, Pavel Pisa e-mail: p...@cmp.felk.cvut.cz www: http://cmp.felk.cvut.cz/~pisa university: http://dce.felk.cvut.cz/ company: http://www.pikron.com/ _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel