So if you haven’t been deploying your SLES/SLED systems through AutoYast, you’re missing some pretty cool stuff. AutoYast is Novell’s XML based scripted install for its Linux systems and because of its underlying XML format, it allows you to do some very cool stuff. I’ll be writing a couple of small articles to highlight some of the more powerful features of AutoYast.

 

First up is the system reconfig option. This in and of itself isn’t a feature of AutoYast, but can be combined to work with AutoYast files. The SUSE Linux installer (SLED, SLES, openSUSE) uses a 2 stage system. The first stage is everything you do while booted off the install media, whatever that may be, CD, DVD, network, etc. It includes disk partitioning, software installation and a couple of other small pieces. A large part of the system config is then started during the second stage, where the system reboots off of the local media and runs through options such as account configuration, LDAP setup, network configuration and a host of others.

 

SUSE includes the ability to re-run this second stage of the installation process at anytime. To do so, simply use the following process on a running desktop/server

 

1. Create an empty /etc/install.inf

touch /etc/install.inf

2. Tell the installer to run at next boot

 

 

 

touch /var/lib/YaST2/runme_at_boot

3. Reboot

 

 

At the next boot up you should be returned to the second stage of the installation. There is an off chance that some of your display resolution settings are a little bit goofy, but we’ll fix that in a minute. Typically this process will work fine and you’ll run through all of the second stage install wizard, its a really easy way to re-config a box quickly and easily.

 

Ok, so what does all of this have to do with AutoYast? Well, you can also automate some or all of that second stage wizard by modifying the steps we took by adding in an AutoYast file.

 

First, we need to make sure install.inf has a little more info in it this time. Take a look at /var/lib/YaST2/install.inf. It probably looks like the following (yours may have a lot more, or a lot less stuff in it, but 99% of it is irrelevant at this point anyway):

 

If you installed the desktop/server initially with AutoYast it should have a parameter called “AutoYast: <some path to XML file>”. If not, you’ll have to add it yourself, or you can even create a blank line that looks like the following

 

Locale: en_US

Sourcemounted: 1

Display: Color

Keytable: us

Framebuffer: 0x0314

X11i:

XServer: vmware

XVersion: 4

XBusID: 0:15:0

 

Now, instead of using a blank install.inf like we did the first time around, we can use a modified version of your install.inf to run an AutoYast XML file. Simply append an AutoYast: parameter to the end of your file

 

Locale: en_US

Sourcemounted: 1

Display: Color

Keytable: us

Framebuffer: 0x0314

X11i:

XServer: vmware

XVersion: 4

XBusID: 0:15:0

AutoYast:

 

Yes, you see correctly, the AutoYast: parameter has no value…thats ok. If you installed the desktop/server initially with AutoYast, you don’t have have to worry about adding this line, as your install.inf will already contain the AutoYast: value. Now, make sure you have an AutoYast file to test with that contains any values run by the second stage of the install (a new root password, new network settings, etc) ready for step 3 below

1. Copy your modified install.inf with the AutoYast parameter to /etc/

 

 

cp /var/lib/YaST2/install.inf /etc/

2. Tell the installer to run

 

 

touch /var/lib/YaST2/runme_at_boot

3. Copy your AutoYast XML file to /var/lib/autoinstall/autoconf.xml

 

 

cp /path/to/your/autoyast.xml /var/lib/autoinstall/autoconf.xml

4. Reboot

 

 

If all went well the second stage installer should run automatically using the parameters in your AutoYast XML.