YaST/Development/Tools/StartInstall
From openSUSE
Contents |
Intro
Automates usage of driverdisk to boot a modified installation in qemu:
- qemu supports booting directly from a kernel and initrd, so I could use the http repositories and download those instead of needing a iso.
- I could append kernel parameters telling qemu about them
- I could automatically repack my local directory with updated files and avoid running mkcramfs by hand (latter [Steffen][3] told me I could even use cpio)
- Why bothering with apache in my machine? As qemu can't access the driverdisk image from my local disk, I could start a embedded web server on demand and tell linuxrc about it.
Download
git clone git://git.opensuse.org/people/dmacvicar/startinstall.git
Usage
The structure of the driver update disk is something like this:
./linux/suse/i386-11.0/dud.config ./linux/suse/i386-11.0/inst-sys ./linux/suse/i386-11.0/inst-sys/usr ./linux/suse/i386-11.0/inst-sys/usr/share ./linux/suse/i386-11.0/inst-sys/usr/share/YaST2 ./linux/suse/i386-11.0/inst-sys/usr/share/YaST2/theme ./linux/suse/i386-11.0/inst-sys/usr/share/YaST2/theme/openSUSE ./linux/suse/i386-11.0/inst-sys/usr/share/YaST2/theme/openSUSE/wizard ./linux/suse/i386-11.0/inst-sys/usr/share/YaST2/theme/openSUSE/wizard/logo.png ./linux/suse/i386-11.0/inst-sys/usr/share/YaST2/theme/openSUSE/wizard/installation.qss
In this case, I only want to replace the logo and css file. The important part is the directory with the architecture and version. dud.config has:
UpdateName: openSUSE 11.0 DUD UpdateID: 193a399fca4b4da9 UpdatePriority: 100
Which I guess are random values for our specific case ;-) This directory tree is available at /foo/driverupdate on my machine.
Now you need a http or ftp repository (I will add more features later...). In the example, it will be http://distros.foo.com/openSUSE-11.0-RC4-DVD/i386/DVD1
Now just run it:
ruby startinstall.rb --tree /foo/driverupdate http://distros.foo.com/openSUSE-11.0-RC4-DVD/i386/DVD1
startinstall.rb will download the kernel, initrd, pack the driverdisk, start a (webbrick based) webserver offering this driverdisk and launch qemu with the right parameters:
qemu -kernel /tmp/kernel20081030-5149-1yn5upf-0
-initrd /tmp/initrd20081030-5149-uquvmh-0
-append
"install=http://distros.foo.com/openSUSE-11.0-RC4-DVD/i386/DVD1
driverupdate=http://mymachine.suse.de:9999/updatedisk20081030-5149-ogaqpl-0 "
-hda /dev/zero
-no-reboot
-net nic,macaddr=00:BE:C3:B9:4C:BD,model=pcnet
-m 666
-net user
-usb -usbdevice tablet
After booting, you will see your modified (see the logo) installation:


