Here is my experience with autoinstall, including questions that I was
not able to find the answers to by looking in the
documentation or the suse-install mailing list archive.
Description of system:
I want to install SuSE 8.0 on a cluster of dual PentiumIIIs over
nfs. I set up the nfs server with the installation
repository by copying the dvd that came with the distribution to the
hard drive of the nfs server as described in the
documentation. Suse8.0 was already installed on the nfs server. I also
set up the configuration repository on the nfs server
using the Autoinstall module for Yast2 to create the control files. I
used the bootdisk image (/disks/bootdisk) from the dvd
that came with the distribution as a template to create floppies which
contained an info file and the initial networking
information needed to connect to the nfs server. This required that I
use the modules1 and modules3 disks in addition to the
bootdisk, but I figured switching disks twice is a lot easier than
compiling my own kernel (I am still a beginner).
Step 1:
Configure nfs server to export install repository. Made sure root
install directory was entered in /etc/exports on nfs
server:
nfsserver:# cat /etc/exports
$Install_root/ $target_ip(ro)
Next, exported directory on nfs server:
nfsserver:# /usr/sbin/exports -rv
Enabled portmap service requests from $target_ip on the nfs server
(following entry was put in /etc/hosts.allow on nfs
server):
nfsserver:# cat /etc/hosts.allow
portmap:$target_ip
Made sure nfs server was active (type command on nfs server):
nfsserver:# /etc/rc.d/nfsserver start
At this point, nfs server should be ready.
Step 2:
Create floppy disks containing the info file. I first copied the
bootdisk from installation repository to a separate
workstation hard drive and mounted it using loop device:
workstation:# scp $user@nfsserver:$Install_root/disks/bootdisk .
workstation:# mount -oloop bootdisk /mnt/bootdisk
List the contents of the bootdisk:
workstation:# ls /mnt/bootdisk
total 1428
drwxr-xr-x 2 root root 512 Dec 31 1969 .
drwxr-xr-x 5 root root 128 Sep 25 16:18 ..
-r-xr-xr-x 1 root root 11912 Apr 3 2002
ldlinux.sys
-rwxr-xr-x 1 root root 964815 Apr 3 2002 linux
-rwxr-xr-x 1 root root 523 Apr 3 2002 message
-rwxr-xr-x 1 root root 399010 Oct 2 18:14 small
-rwxr-xr-x 1 root root 81988 Apr 3 2002
suselogo
-rwxr-xr-x 1 root root 600 Oct 2 18:16
syslinux.cfg
Here, I was confused to see a file called small instead of the
expected initrd. No worries, it is the initial ram disk,
just with a different name to confuse us. I modified both small and
syslinux.cfg, but all other files were left untouched.
First, I modified small. We need to add an info file to the root
directory of this ram disk. Copy the file to the local
directory, decompress it, and mount it using the loop device:
workstation:# cp /mnt/bootdisk/small .
workstation:# zcat small > small.tmp
workstation:# mount -oloop small.tmp /mnt/small
Create an info file and copy it to root directory of ram disk:
workstation:# cat info
insmod tulip #or the necessary network driver for your
target machine.
workstation:# cp info /mnt/small
Unmount small.tmp, compress it, and replace new compressed ram disk
on bootdisk:
workstation:# umount /mnt/small
workstation:# gzip -9 small.tmp
workstation:# cp small.tmp.gz /mnt/bootdisk/small #make sure to
overwrite old small file
Next, I modified syslinux.cfg, umounted the newly created bootdisk,
and copied the bootdisk to floppy:
workstation:# cat /mnt/bootdisk/syslinux.cfg
--snip--
label linux
kernel linux
append initrd=initrd ramdisk_size=65536 rw netdevice=eth0 \
server=x.x.x.a serverdir=$Install_root ip=x.x.x.b \
netmask=255.255.255.0 gateway=x.x.x.c nameserver=x.x.x.d \
autoyast=nfs://x.x.x.a/$Install_root/$control_file
instmode=nfs
--snip--
workstation:# umount /mnt/bootdisk
workstation:# dd if=bootdisk of=/dev/fd0
At this point, the floppy now has all the information it needs for
your target machine to connect to the nfs server. At
this point, the control file is found and the installation initiated
over nfs.
Problems with creating boot floppy: The documentation in Section
5.2 gave me plenty of grief. First off, it wasn't
immediately clear what was meant by the command line that linuxrc uses
to detect an autoinstallation. It wasn't until after
lots of time-consuming trial and error that I figured out that the
command line refers the "append" entry in the syslinux.cfg
file (see above). Once I figure this out, I thought I'd enter as little
information on this "command line" as was needed and
put everything else in the info file. Bad move on my part. After
trying unsuccessfully for many, many times to get the
networking information to work in the info file, I finally gave up the
info file and decided to enter all the information on the
"command line" in syslinux.cfg (see above). Voila, it worked like a
charm. So the only information I ended up putting in the
info file was the "insmod tulip" line (this was recognized by linuxrc,
so I knew that it actually found and parsed
t!
he info file). There is no example in the documentation for what the
entries in the info file should look like. Should they be
like this?:
ip=x.x.x.a
server=x.x.x.b
nameserver=x.x.x.c
etc.
or should they look like this?:
ip x.x.x.a
serever x.x.x.b
nameserver x.x.x.c
etc.
or should they look like something else? Neither one of these syntaxes
worked, so it must be entered some other way. But you
wouldn't know what the syntax should be, because there are no examples
of what it should look like. Could someone clue me in on
this, please?
So, once I decided to put this networking information in syslinux.cfg,
the next major frustration surfaced. At this point, I
was able to connect to the nfs server, but it couldn't find the control
file. First, I tried to use nfs. The entry in
syslinux.cfg looked like this -- autoyast=nfs://x.x.x.a:$Install_root.
Once that didn't work, I tried using --
autoyast=default. Problems here as well (see below). It wasn't until
later, when I was looking through the mailing list
archives that I found an email explaining that he had also spent many
hours of frustration trying to get nfs to recognize the
control file, only to find that the documentation had a typo: the entry
in syslinux.cfg should've looked like this -- autoyast=
nfs://x.x.x.a/$Install_root. The colon should be a slash. This has
since been changed in the documentation, but I hope you are
fortunate to have the updated documentation so you don't spend hours
before resorting to the mailing list archive.
The problems I had with autoyast=default. Section 5.2 explains that the
default behavior of yast2 is to look for a file named
autoinst.xml in the root directory of the initial ram disk on the
floppy, then in the root directory of the installation
repository on the nfs server, then finally on the root directory of the
floppy. Well, yast2 found the autoinst.xml file in the
root directory of the installation repository, but it never found it at
either place on the floppy. Could someone help me out
on this? Of all the options for specifying the location of the control
file, placing it in the root directory of the
installation repository was the least desirable to me (I didn't want 100
or more control files in the root installation
directory - what a mess!!). I was very happy I wasn't left with this
last option when I found the solution to the nfs issue
mentioned above. Still, I spent way too much time just getting yast2 to
find a control file, anywhere, just because the doc
u!
mentation was either incorrect or unclear.
Step 3:
Create the control file. I used the autoinstall module for yast2 to
create control files. The graphic user interface made
creating the control file very easy (thank goodness, because everything
else had been difficult so far). Overall, the
documentation is helpful for this step, but there were a few issues or
concerns that came up.
First, my concerns. These didn't cause problems, but just seemed
inconsistent. When I set up the partitioning plan, yast2
specified that the swap partition was to be created as a linux native
filesystem. Here is a snippet from my control file:
<partition>