[PATCH] Support for booting multiple network profiles (netfarm)

Paulo Ricardo Paz Vital vital at br.ibm.com
Sat May 12 05:45:39 EST 2007


One scenario we have here, and extremely used, is based in a machine
booting via network and one TFTP server in the same network. If you want
to boot via network a machine with a specific config file, you can use
the netbooting like PXE patch, creating a config file named with the MAC
adrress of that machine you want boot. 

One problem in this schema, is that the number of specific config files
is large if you have a big network infra-structure. Trying to minimize
the number of different config files provided by TFTP server, we thought
in a new schema to set the default image entry (option used to load
automatically a kernel image if no arguments is inputed in yaboot
prompt) by that label is better for that machine who is booting. 

How can we do it? Using the MAC address in label entry and checking,
when yaboot is booted via network, if the MAC address of that machine
has a same label in the image structure.

So, the yaboot.conf can be wrote like this:

# yaboot.conf 
init-message = "\nNETBOOT\nHit <TAB> for boot options.\n"
timeout=600
default=install-rh4
image=bootp/vmlinuz
        label=install-rh4
        initrd=bootp/initrd
        initrd-size=10240
        append="devfs=mount,dall init=/linuxrc --"
        read-only
image=bootp/vmlinuz-A
        label=a2-42-10-00-80-04
        initrd=bootp/initrd-A
        initrd-size=10240
        append="devfs=mount,dall init=/linuxrc --"
        read-only
image=bootp/vmlinuz-B
        label=ee-22-60-00-20-04
        initrd=bootp/initrd-B
        initrd-size=10240
        append="devfs=mount,dall init=/linuxrc --"
        read-only
image=bootp/vmlinuz-C
        label=00-14-5e-9c-4e-aa
        initrd=bootp/initrd-C
        initrd-size=10240
        append="devfs=mount init=/linuxrc --"
        read-only

When the machine that has the MAC address 00:14:5e:9c:4e:aa boots via
network, yaboot will set up the default cf_option to label
00-14-5e-9c-4e-aa and load the kernel file vmlinuz-C. 

If a none of these MAC-style labels match with the machine's MAC
address, the default cf_option will not be modified and will load the
vmlinuz kernel.

We've extensively tested these patch on an IBM System p 505 LPAR and IBM
BladeCenter JS21.

Thanks.
Paulo  

-- 
Signed-off-by: Paulo Ricardo Paz Vital <vital at br.ibm.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yaboot-1.3.14rc1-netfarm-pvital20070509.patch
Type: text/x-patch
Size: 11236 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/yaboot-devel/attachments/20070511/143a4aef/attachment.bin>


More information about the Yaboot-devel mailing list