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.
July 14, 2007 at 9:01 am
Dude. Seriously cool stuff. When we gonna do Chinese again? =;)
June 2, 2009 at 12:53 pm
[…] time, I am wondering if a certain capability exists within Red Hat that I have found within SUSE. Cool stuff you might not know that AutoYast can do ? Part 1 Linux In Novell’s East Region points to how you can force SUSE to reconfigure itself when you decide to re-purpose the machine […]
September 29, 2014 at 2:07 am
I work in an OES environment, I would like to know How can I retain the oes configuration , because when I am doing the changes and rebooting the server, After reboot It is not listing the OES configuration/reconfiguration tabs