Topic
  • 3 replies
  • Latest Post - ‏2012-11-16T14:05:13Z by anibal.carvalho
swellkarl
swellkarl
7 Posts

Pinned topic Kickstart with DHCP

‏2012-11-09T20:45:23Z |
We have RHEL 6.3 LPARs running on 770 B systems and on a 740 B system.
 
When we Kickstart a new LPAR, we using the following format:
 
linux ksdevice=eth0 ip=10.X.Y.Z gateway=10.X.Y.1 netmask=255.255.255.0 ks=http://IP_ADDR_OF_NIM_AND_KS_SERVER/KS_DIR/KS_FILE.cfg
 
But, within the KS_FILE.cfg Kickstart file above, we also specify the IP address, gateway, and mask again on the "network" line. And even if we use SMS mode to enter the IP address, gateway, and mask like we would normally do to NIM an AIX LPAR, we still have to put the address, gateway, and mask on the "linux" command line.  Do those address, gateway, and mask entries in SMS mode only work with AIX?  Is the only way to specify the address, gateway, and mask in only the Kickstart file and no where else is to use a DHCP server on that same network?
 
Hopefully I was clear enough in my explanation.
 
Thanks.
 
Karl
 
Updated on 2012-11-16T14:05:13Z at 2012-11-16T14:05:13Z by anibal.carvalho
  • JayFurmanek
    JayFurmanek
    102 Posts

    Re: Kickstart with DHCP

    ‏2012-11-09T21:43:13Z  
    I'm not entirely certain what you're asking but I can try to illustrate a few things.
     
    In SMS (or the OpenFirmware prompt), setting the IP parameters is necessary if the firmware needs to access the network for some reason. This is mostly to enable a remote/network boot.
     
    Once the Linux kernel starts to load, it will come to a boot prompt. Anything given here will be passed to the kernel as it starts to load. The IP parameters set in the firmware are not automatically passed along, which is why it may seem like you have to 'set that again'.
     
    One way to send everything at once, is to start the new LPAR and boot into the OpenFirmware prompt (also called OK prompt - looks like "0 >") first.
    Once at the OpenFirmware prompt, you can do nifty things like:
     
    • 0 > boot network:<serverIP>,,<clientIP>,<gatewayIP> linux ks=nfs:server.example.com/mydir/ks.cfg ksdevice=eth0 ip=<clientIP> netmask=<clientNetMask> gateway=<gatewayIP> noipv6
     
    The boot command boots from a device, in this case an alias for a network device. It can then be passed the IP parameters for the firmware. Note the 2 commas after <serverIP>. There is another parameter there, but I forget what it is, but I usually leave it out and continue with <clientIP>. Everything after <gatewayIP> gets passed on to the booting entity, in this case the Linux kernel. So we pass the IP params again to the kernel along with the KS info. This command should just go until the install is done.
     
    You could also use the following commands from the OpenFirmware prompt, but I like the one above as its all in one.
    To get the network device location code:
    •  0 > display_boot_devices #network
    To boot:
    • 0 > set_boot_device 1 #network <location code>
    • 0 > boot
      or
    • 0 > set_ipparams <ip address>,<boot server ip address>,<gateway>,<netmask> <location code>
    • 0 > boot_from_device #network <location code>
        For completeness, here are some more basic OpenFirmware commands:
    • ls - list the device tree entries viewable at the current ‘directory’
    • dev – the ‘change directory’ command; changes to specified device node
    • .properties – Lists the device properties of the current node/directory
    • nvalias – define/list device aliases. 'nvalias’ with no arguments will list all of you aliases. To set a new alias use:
    nvalias <alias> <full device path>
    • pwd – print current device node
    • ping – ping another system
  • swellkarl
    swellkarl
    7 Posts

    Re: Kickstart with DHCP

    ‏2012-11-09T22:31:12Z  
    I'm not entirely certain what you're asking but I can try to illustrate a few things.
     
    In SMS (or the OpenFirmware prompt), setting the IP parameters is necessary if the firmware needs to access the network for some reason. This is mostly to enable a remote/network boot.
     
    Once the Linux kernel starts to load, it will come to a boot prompt. Anything given here will be passed to the kernel as it starts to load. The IP parameters set in the firmware are not automatically passed along, which is why it may seem like you have to 'set that again'.
     
    One way to send everything at once, is to start the new LPAR and boot into the OpenFirmware prompt (also called OK prompt - looks like "0 >") first.
    Once at the OpenFirmware prompt, you can do nifty things like:
     
    • 0 > boot network:<serverIP>,,<clientIP>,<gatewayIP> linux ks=nfs:server.example.com/mydir/ks.cfg ksdevice=eth0 ip=<clientIP> netmask=<clientNetMask> gateway=<gatewayIP> noipv6
     
    The boot command boots from a device, in this case an alias for a network device. It can then be passed the IP parameters for the firmware. Note the 2 commas after <serverIP>. There is another parameter there, but I forget what it is, but I usually leave it out and continue with <clientIP>. Everything after <gatewayIP> gets passed on to the booting entity, in this case the Linux kernel. So we pass the IP params again to the kernel along with the KS info. This command should just go until the install is done.
     
    You could also use the following commands from the OpenFirmware prompt, but I like the one above as its all in one.
    To get the network device location code:
    •  0 > display_boot_devices #network
    To boot:
    • 0 > set_boot_device 1 #network <location code>
    • 0 > boot
      or
    • 0 > set_ipparams <ip address>,<boot server ip address>,<gateway>,<netmask> <location code>
    • 0 > boot_from_device #network <location code>
        For completeness, here are some more basic OpenFirmware commands:
    • ls - list the device tree entries viewable at the current ‘directory’
    • dev – the ‘change directory’ command; changes to specified device node
    • .properties – Lists the device properties of the current node/directory
    • nvalias – define/list device aliases. 'nvalias’ with no arguments will list all of you aliases. To set a new alias use:
    nvalias <alias> <full device path>
    • pwd – print current device node
    • ping – ping another system
     We are booting from a virtual CD on the VIOS with the netboot image, so even if we don't specify anything in SMS for the address, gateway, and mask, it still works.
     
    But on the boot line, we specify the following:
       linux ksdevice=eth0 ip=CLIENT_ADDR gateway=GW_ADDR netmask=SM_ADDR ks=http://KS_SERVER/KS_DIR/KS_FILE.cfg
     
    And in the kickstart file, we have the following:
       network  --bootproto=static --device=eth0 --gateway=GW_ADDR --ip=CLIENT_ADDR --nameserver=NAMESERVERS --netmask=SM_ADDR --onboot=on --hostname HOSTNAME
     
     
    What I was looking for is whether there was a way to NOT have to specify the address, gateway, and mask on the "linux" line since it is already in the kickstart file.  But thinking about it again, it needs to be on the linux line so eth0 is configured enough to give it a way to communicate to the web server to download the Kickstart file that has the address, gateway, and mask again.  So I guess I just answered my own question.
     
  • anibal.carvalho
    anibal.carvalho
    19 Posts

    Re: Kickstart with DHCP

    ‏2012-11-16T14:05:13Z  
    • swellkarl
    • ‏2012-11-09T22:31:12Z
     We are booting from a virtual CD on the VIOS with the netboot image, so even if we don't specify anything in SMS for the address, gateway, and mask, it still works.
     
    But on the boot line, we specify the following:
       linux ksdevice=eth0 ip=CLIENT_ADDR gateway=GW_ADDR netmask=SM_ADDR ks=http://KS_SERVER/KS_DIR/KS_FILE.cfg
     
    And in the kickstart file, we have the following:
       network  --bootproto=static --device=eth0 --gateway=GW_ADDR --ip=CLIENT_ADDR --nameserver=NAMESERVERS --netmask=SM_ADDR --onboot=on --hostname HOSTNAME
     
     
    What I was looking for is whether there was a way to NOT have to specify the address, gateway, and mask on the "linux" line since it is already in the kickstart file.  But thinking about it again, it needs to be on the linux line so eth0 is configured enough to give it a way to communicate to the web server to download the Kickstart file that has the address, gateway, and mask again.  So I guess I just answered my own question.
     
     Hi Karl.
     
    If you are using kickstart, you need to specify the network settings on command line, so the kickstart file can be download from the server, as you already concluded yourself. On the other way around, if your system is under a DHCP server you can change your line about network settings on kickstart to:
     
    network --bootproto=dhcp --device=eth0 --hostname=HOSTNAME
     
    Anibal.