Mailinglist Archive: opensuse-autoinstall (49 mails)

< Previous Next >
HOWTO Create a Yast2 Autoinstall Custom CD for Network Installation (long)
  • From: Hella.Breitkopf@xxxxxxxxxx
  • Date: Wed, 22 May 2002 17:47:13 +0000 (UTC)
  • Message-id: <OF87D74FDB.3461E2B4-ONC1256BC1.003FA2DC@xxxxxxxxxx>
* CREATING AN AUTOINSTALLATION CD FOR AUTOYAST2 NETWORK INSTALLATION *
V 0.001 - draft - hella.breitkopf@xxxxxxxxxx

For SuSE version: SuSE 8.0
(This description is not validated, yet. No guarantee, that it works for
you.)

Objective:
Fully unattended installation - boot from cd, fetch installation source
and installation description ("control file") from your local network

You'll need:
1) NFS Server with a copy of the DVD installation source
(not described here - more infos in the autoyast2 documentation)
In my example: 192.168.0.10 with /install/suse8.0

2) NFS Server with a XML installation control file
(not described here)
In my example: 192.168.0.5 with /path/1.xml
(You could try to refine this with hex-ip-named.xml's
and the like, see chapter 5.2 of AutoYast2 documentation.
And of course, if you keep your xml files on http or tftp,
it should work too.)


3) A working DHCP server (not described here)
4) SuSE 8.0 boot cd (CD1)
5) Linux machine (I did it on SuSE 7.3) with package "mkisofs"
and enough free hard disk space (2 to 3 times 640 kbytes)
6) root password on that system, or sudo rights to mount stuff
on all locations ..
7) One unused system to test the auto-installation

It'll only work on machines which can boot from CD,
the network card should be supported .. (try a manual installation
with nfs source)



I) Test your bootprompt line



Boot CD1 in your test system and type as kernel options following line

linux autoyast=nfs://192.168.0.5/path/1.xml
install=nfs://192.168.0.10/install/suse8.0

Remark1 : You don't have to type in "linux"
Remark2: If you've got a German keyboard connected:
"=" is on "´"(Akzent) , ":" is on "ö", "/" is on "-"

This should install all things you've configured in your xml file.
(Tip: Start with a minimal system - It's installed much faster.)

If it works, proceed to step II ..



II) Prepare CD Contend



create a "working directory", I named mine "bootmedia":
~> mkdir bootmedia
~> cd bootmedia
~/bootmedia>

* Get an original iso Image *

We steal it from the SuSE Installation CD:
~/bootmedia> dd if=/dev/hdc of=susecd1.orig.iso

~/bootmedia> mkdir susecd1
~/bootmedia> sudo mount -o loop ./susecd1.orig.iso ./susecd1

* Prepare the content for your own iso image *

~/bootmedia> mkdir autoinst-master
~/bootmedia> tar -C susecd1 -cf - . | tar -xvf - -C autoinst-master

We need to change things, so make all files writable:
~/bootmedia> chmod +w -R autoinst-master

We don't need the RPM sources, we fetch them from the network, anyway:
~/bootmedia> find autoinst-master/ -name "*.rpm" -exec rm {} \;
( 547 Mbyte less data result in a 538 Mbyte smaller iso image )

* Prepare syslinux config file
Here we put the stuff which we previously had to type in at the boot
prompt.

Change "autoinst-master/suse/images/boot/isolinux.cfg" that it looks like
this:

~/boodmedia> cat autoinst-master/suse/images/boot/isolinux.cfg

#----- isolinux.cfg - syslinux config file
default autoyast

# default - autoinstallation with configuration settings
# + installation sources from the network
label autoyast
kernel linux
#one line from "append" - "suse8.0" !!!
append initrd=initrd ramdisk_size=65536
autoyast=nfs://192.168.0.5/path/1.xml
install=nfs://192.168.0.10/install/suse8.0

# nfs installation: manual installation with sources from the network
label nfsinstall
kernel linux
append initrd=initrd ramdisk_size=65536
install=nfs://192.168.0.10/install/suse8.0

implicit 0
gfxboot suselogo
display message
prompt 1
timeout 100
readinfo 2
framebuffer 1
#---- end of isolinux.cfg



III) Create Your Own ISO Image


The tricky thing is to get a bootable cd image. This is done by using the
"El Torito" technique: a floppy boot image is included
... luckily we can orientate on the way SuSE did it.

The nice thing with iso images created with the tool "mkisofs":
one can see the options with which they were created. Just do a

~/boodmedia> head susecd1.orig.iso
# (or take a look with some editor, the konqueror, whatever)

and look at that line:

mkisofs 1.14 -p CD-Team, feedback@xxxxxxx -P SuSE GmbH, suse@xxxxxxx
-r -T -J -pad -sort /var/tmp/m_cd-Wbjzkb -no-emul-boot -boot-load-size 4
-boot-info-table -b suse/images/boot/isolinux.bin -c
suse/images/boot.catalog -A SuSE-Linux-Professional-DE-i386-8.0.0#0 -V
SU8000.001
-o ../../iso/SuSE-8.0-Prof-i386-de-RC4-CD1.iso /var/tmp/m_cd-YiiVui CD1

We use (mostly) the same options - with other values.
For full information on all this options look in the man-page of mkisofs

! one line: !

~bootmedia> mkisofs -p your.email@domain -P "company+department info"
-r -T -J -pad -no-emul-boot -boot-load-size 4 -boot-info-table
-b suse/images/boot/isolinux.bin -c suse/images/boot.catalog
-A SuSE-Linux-Professional-DE-i386-8.0.0#autoinstall0
-V SuSEautoinst.001 -o autoinst1.iso autoinst-master

Remark: suse/images/boot/isolinux.bin is the "floppy-boot-image" for El
Torito.



IV) Write ISO Image on CD


If you've got your boot CD iso-image (here named autoinst1.iso), you can
burn it
with any cd record tool you want - if it can do iso images (Most do).
(I did it on windows with nero, since my cd-rw drive is not here, yet.
On Linux "cdrecord" whith option "-data" should do.)



POSSIBLE IMPROVEMENTS:

- Probable one can solve this much more elegant. But it did work, on my
side.
- One might make the iso image smaller with deleting more (not needed)
files.
- No slide-show ( Or own slide show )

NEEDED IMPROVEMENT:
->> How to integrate the autoyast updates?


SUGGESTIONS: are highly welcome!

----

Regards,

Hella Breitkopf





< Previous Next >
This Thread
  • No further messages