XXXX/pxelinux.0
Yup, you really do - bizarre.
/install/suse9.1/Suse/suse # cp -r /linux/suse/i386/9.1/suse/* .
linux:/install/suse9.1/Suse/suse # create_package_descr -x ./setup/descr/EXTRA_PROV
using settings:
datadirs: .
languages: english
output dir: ./setup/descr/
extra_provides: ./setup/descr/EXTRA_PROV
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
........ done
processed 5737 packages
now recoding to UTF-8: packages packages.DU packages.en
linux:/install/suse9.1/Suse/suse # ls
. .. i586 i686 noarch nosrc setup src
I had to copy the whole of /suse/i386/9.1 from a mirror and then run the above
create_package_descr perl script to get a coherent package descr that would
work with the auto install process.
ls -lu
is very useful for checking the last access time of files
such as the autoyast xml file or the ftfboot files to find out if the
autoinstall process actually read them, or not.
how to debug the pre-install shell script
Of course you can just run the shell script to make sure it all works.
If the shell script is messing with partitions, then you might wish to
test it using a computer that is booted from CD (Knoppix is useful for this)
and a HDD you do not mind trashing.
A nice way to find out what kind of environment you have to play with
is to put this in your XML file for autoyast:
#!/bin/bash
exec /bin/bash -x
I then use wget to grab the pre-install script and run it so I do not have
to keep on editing the xml file:
wget http://XXXX/suse9.1/pre_install_suse91.sh
wget http://XXXX/suse9.1/sfdisk
chmod +x sfdisk
chmod +x pre_install_suse91.sh
./pre_install_suse91.sh
So a nice combination for debugging is to grab the sripts, chmod them
then drop to an interactive shell and test:
#!/bin/bash
wget http://XXXX/suse9.1/pre_install_suse91.sh
wget http://XXXX/suse9.1/sfdisk
chmod +x sfdisk
chmod +x pre_install_suse91.sh
exec /bin/bash -x
It is a VERY good idea to use a loghost to log what is going on during the
installation. You will need the kernel boot parameter "loghost=somecomputer"
to be set on boot media or
tftboot kernel file thingumy.
Change the file /etc/sysconfig/syslog so that you have:
SYSLOGD_PARAMS="-r -m 0"
The -r is to enable remote logging and the -m 0 to stop the annoying time stamps in
/var/log/messages
Disk Partitioning
Well this was a pain as I wanted to do it using sfdisk in the pre-install script, but
autoyast does not like that as it seems to probe the current disk partitioning before
the pre-install script runs (not very pre-install is it?).
I tried to use the rules based install so that I could define partitioning based upon
disk size, but failed to get this to work using a simple rule and two xml files.
Could not debug the install process as no understandable error message about install -
it just told me that I did not have a valid xml file. Went back to using sfdisk
during the pre-install and forcing a reboot afterwards. This is not nice
Example Config Files and Scripts
XML for autoyast
The REAL post install script that does all the work
The small post install script that is specified in the XML
The wee pre install script that does the partitioning
List of files that we replace in the suse installation using skel directory structure
kernel boot params from /tftboot/pxelinux.cfg/HEXFILE
Some Example Config Files from someone else
http://www.bio.ifi.lmu.de/~steiner/ayex.tgz
dhcpd.conf - part for using pxelinux
fstab.zassenhaus - example fstab to create partition profile
info - specific info file for the initrd
lilo-i386.xml - lilo profile
lmu.xml - my standard profile
makeInfo - put the info file into the SuSE initrd
transferer by pxelinux
makePartition - create a partition profile from an fstab
part_zassenhaus_keep.xml - the partition profile created from the
fstab.zassenhaus
pxelinux.cfg - the pxelinux.cfg. Needs pxelinux.0,
and "linux" and "initrd" from boot/loader/
rules.xml - put the profiles together.
Some Questions I have been asked + Answers
> Thanks for posting the following web links:
welcome
>
> http://www.tcm.phy.cam.ac.uk/~mr349/suse/boot.html
> http://www.tcm.phy.cam.ac.uk/~mr349/suse/autoyast.html
>
> The boot info was especially helpful. When you have some time I'd
> like some assistance to understand a couple of things that are not
> working for me. I have an http server for installation (works fine) &
> use a boot CD (thanks to your web page) that work to install a system.
> However, the configure sections of my profile don't seem to work
> (attached).
dunno, but your configure section is rather large and I've generally found
it better not to rely on the autoyast XML as the documentation is
absolutely awful and completely lacking, I suggest you check the
differences between that and mine:
http://www.tcm.phy.cam.ac.uk/~mr349/suse/ay.xml
also use a loghost:
http://www.tcm.phy.cam.ac.uk/~mr349/suse/kernel_params.txt
>
> Also, the installation reboots right after the install of all the
> packages (addons) & post install doesn't occur. Can I somehow force
> these items before reboot or is another method suggested? I noticed
should happen anyway. rpm's are installed, then first boot happens and
some other things are sorted out.
> you call a first_boot.sh in the post of your autoyast.html page, is
> that what keeps the autoyast from going into a loop (due to boot CD =
> default autoyast)?
nope. first_boot is put in place by my post install script -
pre_install_suse91.sh - (run by autoyast during first boot after rpm's are
installed) with:
cd /root
wget http://www.XXXX/suse9.1/first_boot.sh
wget http://www.XXXX/suse9.1/boot_suse91.sh
chmod +x /root/first_boot.sh
chmod +x /root/boot_suse91.sh
cp /root/first_boot.sh /etc/rc.d
ln -s /etc/rc.d/first_boot.sh /etc/rc.d/rc5.d/S99first_boot
the "real" post install script: boot_suse91.sh then does most of the work
and:
# Remove soft link from /etc/rc.d/rc3.d straight away so that we do not
# risk the system getting into a reboot loop
rm /etc/rc.d/rc5.d/S99first_boot
# and script
rm /etc/rc.d/first_boot.sh
so no reboot loop happens
However, I would like to see examples of what your
S99firstboot and first_boot.sh look like.
Would you mind sending the along to me?
first_boot.sh:
#!/bin/sh
# Call the script that should be in ./root and run it with the -x option
# and log output to log file in /root
/bin/sh -x /root/boot_suse91.sh 2&> /root/boot_suse91.log
exit 0
S99firstboot is a soft link to first_boot.sh
> Hello,
> First I would like to thank you for answering my request for the
> first_boot.sh script! And also thanks for the sharing your information
> regarding AutoYast/AutoInstall.
> If you have the time, I have an issue with my version of the post install
> script. I have added this to my xml file using the autoinstall module
> from YaST.
> Here it is:
Hi,
I suggest you remove the backticks.
Then you need to work out what is wrong with your networking.
Try putting a sleep into your XML /bin/sh script then you should be able
to use a console on the target workstation to see what is going on
(ifconfig -a, route print, etc.)