Full automatic installation of SLES8 with update
Here some tips to help you to install a sles8 with update.
I think it will be usefull for many people.
=========================================================
== 1 == Setting up install directory
=========================================================
Use the script in section 6.1.3 of the autoyast documentation for sles8
You have now a repository with SLES CD and UL CD 1,2,3
I have setup my repository in /suse/install
I have used UL/CD{1,2,3} and SLES/ instead of unitedlinux-i386/CD{1,2,3}
and sles8-i386/CD1 directory
=========================================================
== 2 == Download update
=========================================================
Go to http://sdb.suse.de/download/i386/update/SuSE-SLES/8/rpm/
Download all rpms like this : foo-x.xx-xx.rpm
Do NOT download foo.patch.rpm and foo.rpm files
Save files in directory like this
/suse/update/update/i586
/suse/update/update/i686
/suse/update/update/noarch
Download SP3 CD1 iso to get driverupdate file
You must have it later.
=========================================================
== 3 == Creating package description for update
=========================================================
Install autoyast2 rpm
### script ###
cd /suse/update/update/
/usr/local/YaST2/bin/create_package_descr -d /suse/update/update -l
english -l german -l french
cd /suse/update
mkdir media.1
touch content
touch media.1/media
###############
### file : content ###
PRODUCT SuSE SLES
VERSION update
DISTPRODUCT SuSE-Linux-SLES-i386
DISTVERSION 8.1-0
BASEPRODUCT UnitedLinux
BASEVERSION 1.0
YOUTYPE business
YOUPATH i386/update/SuSE-SLES/8
YOUURL http://www.suse.de/cgi-bin/suseservers.cgi
VENDOR SuSE Linux AG
ARCH.i686 i686 i586 i486 i386 noarch
ARCH.i586 i586 i486 i386 noarch
ARCH.i486 i486 i386 noarch
ARCH.i386 i386 noarch
DEFAULTBASE i386
REQUIRES distribution-release
LINGUAS de en
LABEL SuSE SLES Update
LABEL.de SuSE SLES Update
DESCRDIR update/setup/descr
DATADIR update
LANGUAGE en_US
TIMEZONE America/Los_Angeles
###############
### file : media.1/media ###
SuSE Linux AG
20021022191434
1
###############
You must have this in your /suse/update
/suse/update
|-- content
|-- media.1
| `-- media
`-- update
|-- i586 -- *.rpm
|-- i686 -- *.rpm
|-- noarch -- *.rpm
`-- setup
`-- descr
|-- packages
|-- packages.DU
|-- packages.en
`-- packages.fr
=========================================================
== 5 == setting up the final repository with update rpms
=========================================================
#### script ################
mv /suse/update /suse/install/
cd /suse/install
mkdir -p yast/update/update/setup/descr
mkdir -p yast/update/media.1
cp -a update/content yast/update/
cp -a update/media.1/media yast/update/media.1/
cp -a update/update/setup/descr/*.* yast/update/update/setup/descr/
############################
Your /suse/install/yast must look like this :
|-- TRANS.TBL
|-- order
|-- sles8
| |-- content
| |-- media.1
| | |-- TRANS.TBL
| | |-- info.txt
| | |-- media
| | `-- products
| `-- suse
| `-- setup
| `-- descr
| |-- Minimal+X11.sel
| |-- Minimal.sel
| |-- X11.sel
| |-- packages
| |-- packages.DU
| |-- ....
|-- ul
| |-- TRANS.TBL
| |-- UnitedLinux
| | |-- TRANS.TBL
| | `-- setup
| | |-- TRANS.TBL
| | `-- descr
| | |-- Minimal+X11.sel
| | |-- Minimal.sel
| | |-- X11.sel
| | |-- packages
| | |-- packages.DU
| | |-- packages.cs
| | |-- .....
| |-- content
| `-- media.1
| |-- TRANS.TBL
| |-- info.txt
| |-- media
| `-- products
`-- update
|-- content
|-- media.1
| `-- media
`-- update
`-- setup
`-- descr
|-- packages
|-- packages.DU
|-- packages.en
`-- packages.fr
----
/!\ Don't forget to put the driverupdate file of SP3 CD1
in /suse/install
=========================================================
== 6 == Important files
=========================================================
/suse/install/yast/order :
--------------------------
/yast/update /update
/yast/ul /UL/CD1
/yast/sles8 /SLES
=========================================================
== 7 == Make a custom boot cd
=========================================================
Mount and copy your SLES8 CD1 to /iso/cdboot/
You can delete all rpm in /iso/cdboot/ to reduce the size of the final
cd
Mount the SP3 CD to /mnt/sp3
### script ###
cp /mnt/sp3/boot/loader/linux /iso/cdboot/boot/loader/
cp /mnt/sp3/boot/loader/initrd /iso/cdboot/boot/loader/
cp /mnt/sp3/boot/loader/initrd /iso/
touch /iso/info
###############
the file info is used to setup network and connect to the nfs repository
to install the system
### file : /iso/info ###
install: nfs://128.1.217.166/suse/install/
netdevice: eth0
hostip: 128.1.33.60
gateway: 128.1.6.23
nameserver: 128.1.6.228
netmask: 255.255.0.0
textmode: 1
forceinsmod: 1
nopcmcia: 1
###############
I have tweak the isolinux.cfg to get different autoyast control file
### file /iso/cdboot/boot/loader/isolinux.cfg ####
default harddisk
# hard disk
label harddisk
kernel linux
append SLX=0x202
# ide
label ide
kernel linux
append initrd=initrd ramdisk_size=65536
autoyast=nfs://128.1.217.166/suse/autoyast/ide.xml
# scsi
label scsi
kernel linux
append initrd=initrd ramdisk_size=65536
autoyast=nfs://128.1.217.166/suse/autoyast/scsi.xml
# custom1
label custom1
kernel linux
append initrd=initrd ramdisk_size=65536
autoyast=nfs://128.1.217.166/suse/autoyast/custom1.xml
# custom2
label custom2
kernel linux
append initrd=initrd ramdisk_size=65536
autoyast=nfs://128.1.217.166/suse/autoyast/custom2.xml
# custom3
label custom3
kernel linux
append initrd=initrd ramdisk_size=65536
autoyast=nfs://128.1.217.166/suse/autoyast/custom3.xml
failsafe
label failsafe
kernel linux
append initrd=initrd ramdisk_size=65536 ide=nodma apm=off acpi=off
# apic
#label apic
# kernel linux
# append initrd=initrd ramdisk_size=65536 apic
# manual
#label manual
# kernel linux
# append initrd=initrd ramdisk_size=65536 manual=1
memory test
label memtest
kernel memtest
implicit 0
gfxboot bootlogo
display message
prompt 1
timeout 100
readinfo 2
framebuffer 1
#######################
Here my script to create a cdboot with sp3 kernel and info file
##### script makeiso.sh #######
#!/bin/bash
INITRD=/iso/initrd
INITRD_GUNZIP=/iso/initrd_gunzip
INITRD_MOUNT=/iso/temp/initrd
INFO=$1
CDBOOT=/iso/cdboot
ISO=$2
INITRD_FINAL=$CDBOOT/boot/loader/initrd
if [ "$#" -lt 2 ]
then
echo "Usage: makeiso file_info image.iso"
exit 1
fi
mkdir -p $INITRD_MOUNT
gunzip -q < $INITRD > $INITRD_GUNZIP
mount -o loop -t minix $INITRD_GUNZIP $INITRD_MOUNT
cp $INFO $INITRD_MOUNT
umount $INITRD_MOUNT
gzip < $INITRD_GUNZIP > $INITRD_FINAL
mkisofs -R -l -J -o $ISO -b boot/loader/isolinux.bin -c boot.catalog \
-no-emul-boot -boot-load-size 4 -boot-info-table \
$CDBOOT
rm -f $INITRD_GUNZIP
###############################
in /iso simply use :
./makeiso.sh info slescustom.iso :)
=========================================================
== 7 == Creating a good control file with nfs postinstall script and LVM
stuff :)
=========================================================
Here my ide.xml control file
---------------------
<?xml version="1.0"?>
<!DOCTYPE profile SYSTEM
"/usr/share/YaST2/include/autoinstall/profile.dtd">
<profile xmlns="http://www.suse.com/1.0/yast2ns"
xmlns:config="http://www.suse.com/1.0/configns">
<configure>
<scripts>
<chroot-scripts config:type="list"/>
<post-scripts config:type="list" >
<script>
<filename>postinstall.sh</filename>
<interpreter>shell</interpreter>
<source>
<![CDATA[
#!/bin/sh
UPDATE_SRV=128.1.217.166
UPDATE_DIR=/suse/postinstall
eject
echo "Mounting update server"
mkdir -p /tmp/postinstall
mount -t nfs $UPDATE_SRV:$UPDATE_DIR /tmp/postinstall
sh /tmp/postinstall/update_rpm.sh
]]>
</source>
</script>
</post-scripts>
<pre-scripts config:type="list"/>
</scripts>
</configure>
<install>
<bootloader>
<location>mbr</location>
</bootloader>
<report>
<messages>
<show>false</show>
<timeout>5</timeout>
<log>true</log>
</messages>
<errors>
<show>true</show>
<timeout>5</timeout>
<log>true</log>
</errors>
<warnings>
<show>true</show>
<timeout>5</timeout>
<log>true</log>
</warnings>
</report>
<general>
<clock>
<hwclock>GMT</hwclock>
<timezone>Europe/Paris</timezone>
</clock>
<keyboard>
<keymap>french</keymap>
</keyboard>
<language>fr_FR</language>
<mouse>
<id>20_imps2</id>
</mouse>
</general>
<lvm config:type="list">
participants (1)
-
Nicolas Marciniak