Hi all!

I have (what I consider) pretty extensive experience with Doing 
JumpStarts on SPARC machines, using RARP/BOOTPARAMS. I've learned 
through trial and error where the gotchas are, and where to look for 
problems when funny things appear.

Now, I'm no longer in a SPARC world, and I'm exploring how to JumpStart 
on X86 systems. I'm knee deep in GRUB, DHCP, and PXE, and like there 
were with RARP/BOOTPARAMS (but even more so it seems) there seem to be 
many ways to get the same job done, and I'm trying to learn the details, 
the differences between them so I can pick the ones that fit my needs 
the best.

With RARP/BOOTPARAMS, I quickly learned what changes 'add_install_client 
was making (and more importantly "why it was making them",) and found it 
was much easier to do them myself,  or that I could setup things so that 
they were ready and waiting and didn't need to be done each time. (I set 
most things in /etc/bootparams with a *, and really only needed to 
create a soft link in /tftpboot for each machine.)

I'd really like to understand how DHCP, GRUB, and PXE fit into all of this.

I know DHCP has been available on the SPARC for a while, and I probably 
should have tackled it there, since it be one less thing to cover now. 
I've come to the conclusion from the limited info in the docs (GRIPE: 
Which only seem to cover what to type, and *NOT* what typing that will 
do?, or why you need that done?) that DHCP is capable of replacing both 
RARP and BOOTPARAMS in this process, and really is a more elegant way to 
solve this part of the problem since through the macros, there is little 
need to repeat the same info that I used to cut and paste in 
/etc/bootparams.  It appears that on SPARC to use DHCP this way, you 
need to 'boot net:dhcp - install dhcp'??

Over in the x86 world though, It seems that the choices multiply and 
none of the suggestions make sense or seem to work together. Many of the 
defaults and documtentation suggestions seem to assume you will only 
ever have one solaris image you will want to install from, and that 
you'll always want all your clients to install using the same image. On 
top of this I need to keep redirecting the console out to ttya, the 
changes for which aren't even mentioned.

 From my memory (I don't have a SPARC to verify against - so pardon any 
mistakes please) the old RARP/BOOTPARAMS went like this:

1) RARP to get IP for MAC addr.
2) TFTP to get a file named <IP in HEX> or <IP in HEX>.SUN4U
3) Run that file.
4) RARP again to get IP for MAC addr.
5) BOOTPARAMS to get root server and filesystem, mount options, and
   other info rpc.bootparams always threw in the response like the
   netmask, gateways, etc.
6) Load Kernel
7) Mount Root
8) BOOTPARAMS to get sysidcfg file if possible.
9) BOOTPARAMS again to find install image server and path
10) If 'boot net - install' was used instead of just 'boot net' then
    use BOOTPARAMS again to get the Jumpstart config path.
11) Start the correct installer.

Can anyone point out what changes when using DHCP on either SPARC or X86?

Can anyone point out what parts are only for X86? (or only for PXE booting?)

Can anyone explain where GRUB fits?

I'll take a stab at it:

1) PXE does a DHCP to get address and network config, and Boot Server
   and FILE.
2) PXE does a TFTP to load the boot file (In ourcase PXEGRUB.)
3) Run the boot file
4) Somehow?? GRUB locates and loads (TFTP??) the menu.lst file.
5) GRUB locates and loads the kernel (with TFTP? or NFS?)
6) The Kernel (or GRUB?) get the root file server and path from DHCP?
   (or -B options?)
7) Mount Root?
8) DHCP query? (or -B option?) to get sysidcfg file.
9) DHCP query? (or -B option?) to get install image server and path.
10) If '-install' is used, or option 2 is picked, then DHCP query (or
    -B options?) for JumpStart server and path.
11) Run the correct installer.

For instance, From the docs, I went through the steps to create macros 
for configuring the install server, and path, the sysidcfg file server 
and path, and the jumpstart dir server and path. But then when I ran:

./add_install_client -d  <somestring> i86pc

The PXE macro produced didn't show how the DHCP server was going to 
reference the other macros I had created, or how the the image I wanted 
installed would be selected? (I made different Macros for different 
images already.)

NOTE: I put <somestring> above in the command line, because it doesn't 
seem to matter what I type there, and the docs are very unclear as to 
what it is used for. /tfpboot ends up populated with files and links for 
various combinations of the string you specify, but nowhere is it 
explained what this needs to match up with (if anything?) On top of that 
the docs give various names for this argument to the script. In Some 
places it is 'client name', others 'platform name', and I think I've 
seen other names too.

So I decided to supply the other -s, -c, -p, options and see if 
add_install_client would add those values to the Macro definitions that 
it prints out for me to enter into DHCP. Nothing changed. Or so I 
thought. I discovered later that it wrote those options to 
/tftpboot/boot/grub/menu.lst as argumentd for GRUB to pass to the 
kernel? Why?

Why isn't the kernel (or GRUB? whose job is it?) getting them from DHCP 
where I put them in my macros? Also is this one menu.lst for all PXE 
clients? if so, I really can't have this install info in there since I 
want different clients to boot different images. This isn't mentioned in 
the Docs.

The PXE Macro seems to apply to all PXE booting clients? so I'm pretty 
sure I don't want to add ":Include=Inst-Sol-NV76-I86pc" to that macro 
since then everything will install NV_76? ( I have 74, 75a, and s10u4 
too so that's not what I want.)

So do I want a macro tied to the MAC address of the machine I'm booting? 
I tried that. I ran add_install_client with -d -e <MACADDR> i86pc. Now I 
got suggestions for a macro named for the MAC address, but whose 
contents were not much different than the PXE Macro. Again where are the 
install and jumpstart macros going to be picked up? This also left me 
with similiar files in /tftpboot as the PXE example, but the MAC addr 
was inserted where ever <somestring> had been. Only this time the 
menu.lst file was right in /tftpboot, not in /tftpboot/boot/grub? Why 
the inconsistency? why is the PXE one not just /tftpboot/menu.lst? What 
else would ever go in /tftpboot/boot, or /tftpboot/boot/grub?

This all got me looking at the GRUB menu files closer. When actually 
running these installs, I kept having to keep choosing '2. Custom 
Jumpstart Install' which I thought was strange, but since on X86 I 
didn't have a place to type the '- install' I thought that might be how 
it had to be.

Now when I started looking at the Menu files, I thought "hey maybe if I 
put the '- install' here...", and it worked! I didn't see any info in 
the documentation on this though. The parts that talk about running 
add_install_client don't tell you what it does, and don't tell you that 
you need to add '- install' if you want to avoid that menu.

Why can't add_install_client put it in there for you? It should be safe 
to always put in since if the Jumpstart config info isn't available, it 
will fall back to interactive anyway. aking of what add_install_client 
puts in the menu.lst, why does add_install_client set the timeout to 
30sec? There is only one option in the menu to choose, Why not choose it 
sooner?

While in here, I also realized that this menu file is the right place to 
put the serial options:

serial --unit=0 --speed=38400
terminal serial

and add: "console=ttya,ttya-mode=38400,8,n,1-" to the -B options for the 
kernel.

Now booting the machine kept all the output on the serial port (except 
the messages from the PXE BIOS, which must be after the BIOS turned off 
the serial port, but before GRUB reenables it.) Why is this serial port 
configuration not mentioned in the Docs? Why isn't there an option to 
add_install_client to set it up? At the very least it should mention 
that it is creating the menu file, and where it is writing it to!

So now I have the Jumpstart booting. It gets hung up determining the 
Nameservice (more on this in another email -snoop shows it working.) I'm 
not sure how it's booting though - or more importantly where to make my 
changes if I want to? Is it getting the install path from the menu file? 
or DHCP?

How do I debug this? In the past I ran in.rarpd and rpc.bootparamd in 
debug mode, and kept a snoop running in another window. How do I get the 
DHCP daemon into debug mode? How do I get GRUB to tell me what files it 
is attempting to load? I suppose I should run the tftpd in debug mode too.

I noticed in the custom Jumpstart and advanced install document, SPARCs 
need 'dhcp' added to 'boot net - install' to be told to use DHCP instead 
of BOOTPARAMs? Do I need to add 'dhcp' also in the menu file after 
'install' for X86?

 From what little I know, I think Ideally what I'd like to setup is:

1. PXE Macro specifiying only the boot server and pxegrub as the file.

   This will apply to all machines doing a PXE boot, correct?
   Different Solaris images are going to have different PXEGRUB
      builds though. Will that matter?
   If all clients load the same GRUB file, will they all end up with
      the same menu file too?

2. MAC Address Macro specifying all the S* DHCP options for this
      client only.

   This should allow  each client to get a different  install image
      right?
   If the  initial boot was through the PXE Macro will the MAC Macro
      still be looked for?
   What piece of code looks for this info?
   Does it need to be attached to the original DHCP response? or is
       it queried later like BOOTPARAMs?
   Will this macro always be returned to the client by the DHCP server?
       or do I need to enter it as the macro for the address I assign
       to the client? (I'm setting up the DHCP server to give each
       client the same address every time.)

3. One or maybe 2 Menu.lst files (one Console, one Serial ) with
   '- install' (or is it '- install dhcp'?)

    Where do I put these? Where does GRUB search for this?
    How to assign different menu.lst files to each client?
    If GRUB was loaded from a file named for the MAC address will
        it only look for the menu with the MAC address also?


Why doesn't the Documentation cover any of this?

  -Kyle

Reply via email to