The english openSUSE wiki has been moved and updated recently. If you encounter any issue, please let us know by mail to firstname.lastname@example.org.
SDB:Creating customized installation source
tagline: From openSUSE
This article describes how to create a customized installation source which can be later used for installation via YaST, mostly for debugging purposes.
For openSUSE 11.0 and later, please, use this article.
What Is This All About?
Suppose you want to debug something in the installation process. Or test that a bug you've reported is already fixed, but the fix is not yet included on the official media (DVDs, FTP mirrors etc.). You may have a patch you want to test, the whole fixed rpm package or you may need to add some extra packages, scripts or libraries to ease the debugging and want to use them during installation.
For all these, you need customized installation source.
How To Do It (step-by-step)
1. First of all, mirror over some existing installation source. Do e.g.
wget -r -np -nH ftp://cool-suse-mirror.example.org/pub/suse/$build
for network installation source. Alternatively, you can download DVD iso, mount it over loopback device and copy its content to your local directory.
2. In the local directory with downloaded installation source data, do:
cd boot/$your_arch mkdir inst-sys
where $your_arch stands for the architecture you want to use (i386, x86_64, ppc)
3. Mount temporarily image named boot/$your_arch/root to /mnt directory over loopback device
mount -o loop root /mnt
Note: this mount of cramfs image is not cross-platform, i.e. you normally cannot mount and thus create inst-sys from ppc image on i386 architecture.
4. Copy the directory structure from /mnt directory to inst-sys (as hard links need to be preserved when copying, you need to use rsync; simple cp is not enough since it cannot do this).
rsync -AHPSXav /mnt/ inst-sys/
5. To make YaST prefer inst-sys directory over root image and to make rollback possible in case something fails, backup root image
mv root root.backup
6. Now you have inst-sys directory structure ready (note it is actually similar to the one in real running system) and you can do whatever you want with it - apply patches, unpack rpm contents (use rpm's content.cpio for this purpose), edit files, create new bugs,...
7. When ready, export your local directory with customized installation source data via nfs. You may use yast2-nfs-server module for this purpose, or do it manually by editing /etc/exports file (do not forget to do exportfs -rv afterwards)
You can even create new ftp or http installation source out of it, but nfs way is the simplest one. Since the inst-sys directory accessed via http or ftp cannot be mounted, you have to recreate the root image
mkfs.cramfs inst-sys root
8. You're almost done. Now boot your test computer e.g. from mini-iso and point its installation source to your customized one by setting this parameter on boot commandline:
(for more info on boot parameters, see Linuxrc article)
And that's it. Enjoy installation debugging and testing :-)