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"> <lvm_group> <logical_volumes config:type="list"> <lv> <lv_fs config:type="symbol">reiser</lv_fs> <lv_mount>/</lv_mount> <lv_name>lvroot</lv_name> <lv_size>2147483648</lv_size> </lv> <lv> <lv_fs config:type="symbol">reiser</lv_fs> <lv_mount>/tmp</lv_mount> <lv_name>lvtmp</lv_name> <lv_size>536870912</lv_size> </lv> <lv> <lv_fs config:type="symbol">reiser</lv_fs> <lv_mount>/var</lv_mount> <lv_name>lvvar</lv_name> <lv_size>536870912</lv_size> </lv> </logical_volumes> <lvm_name>vgroot</lvm_name> <pesize>8M</pesize> </lvm_group> </lvm> <partitioning config:type="list"> <drive> <device>/dev/hda</device> <partitions config:type="list"> <partition> <filesystem config:type="symbol">ext2</filesystem> <mount>/boot</mount> <partition_id config:type="integer">131</partition_id> <partition_nr config:type="integer">1</partition_nr> <size>49348609</size> </partition> <partition> <mount>swap</mount> <partition_id config:type="integer">130</partition_id> <partition_nr config:type="integer">2</partition_nr> <size>1069219841</size> </partition> <partition> <lvm_group>vgroot</lvm_group> <partition_id config:type="integer">142</partition_id> <partition_nr config:type="integer">3</partition_nr> <size>auto</size> </partition> </partitions> <use>all</use> </drive> </partitioning> <software> <base>Minimal+X11</base> </software> </install> </profile> -------------- Note : report directive doesn't work, whatever the timeout value , it's always 10s and is always show A Postinstall script on the nfs repository is executed. ========================================================= == 8 == postinstall script and nfs setting ========================================================= My setup is like this /suse/install : repository used to install /suse/autoyast : store .xml control file /suse/update : store homemade and update rpms which are not in /suse/install /suse/postinstall : store postinstall scripts ### file : /suse/postinstall/update_rpm.sh #### #!/bin/sh SERV_UPDATE=128.1.217.166 PATH_UPDATE=/suse/update PATH_SLES=/suse/install mkdir -p /tmp/nfs mount -t nfs $SERV_UPDATE:$PATH_UPDATE /tmp/nfs ### useless since update rpms are in install repository #rpm -Fvh /tmp/nfs/update/i686/*.rpm #rpm -Fvh /tmp/nfs/update/i586/*.rpm #rpm -Fvh /tmp/nfs/update/noarch/*.rpm ### ###### Install homemade rpms (cfengine etc...) ######### rpm -Uvh --nodeps /tmp/nfs/update/add/*.rpm umount /tmp/nfs ##### install sles8 banner ###### mount -t nfs $SERV_UPDATE:$PATH_SLES /tmp/nfs rpm -e --nodeps unitedlinux-release rpm -Uvh /tmp/nfs/SLES/suse/i586/sles-release*.rpm rpm -e --nodeps yast2-theme-UnitedLinux rpm -Uvh /tmp/nfs/SLES/suse/noarch/yast2-theme-SuSE*.rpm umount /tmp/nfs ######## SOURCE UPDATE ########### PATH_UPDATE=/suse/install/update PATH_SLES=/suse/install/SLES PATH_UL=/suse/install/UL/CD1 echo "Deleting old sources" rm -rf /var/adm/YaST/InstSrcManager/* echo "Adding new sources" installation_sources -ea nfs://$SERV_UPDATE:$PATH_UPDATE installation_sources -ea nfs://$SERV_UPDATE:$PATH_SLES installation_sources -ea nfs://$SERV_UPDATE:$PATH_UL #################################### --------------------------------------------------------- ### file : /etc/exports #### /suse/autoyast *(sync,ro) /suse/update *(sync,ro) /suse/install *(sync,ro) /suse/postinstall *(sync,ro) ################# ========================================================= == 9 == Conclusion ========================================================= A sles8 installation is made within 5-10 minutes depending the install machine. No human intervention is needed after the boot (all you must do is to choose the right .xml at the lilo cd screen) After installation the machine reboots on harddrive (in fact it reboot on cd but the cd boots by default on harddrive :p) Update is done at install time : you can say goodbye to smp/bcm5700 driver bug in kernel 2.4.19 Postinstall script on nfs provide easy way to install homemade rpms I hope this set of tips will be on Anas Nashif autoyast Homepage :) Regards, Nicolas Marciniak
participants (1)
-
Nicolas Marciniak