Firstboot on Yast2, wow… it’s a powerful paradigm for those that are going redistribute *SuSE based images.
The YaST firstboot utility is a special kind of configuration workflow that can be run after the basic system is installed. It is started on the first boot of the system and guides a user through a series of steps that allow for easier configuration of their desktops. http://en.opensuse.org/YaST_Firstboot
To get started with YaST Firstboot and generate your first addition to the workflow, you can do the following.
Type zypper install yast2-firstboot
To confirm, type Y
Setup the license and welcome directories
Type mkdir /etc/firstboot
Type mkdir /etc/firstboot/welcome
Type mkdir /etc/firstboot/license
Type chmod -R 755 /etc/firstboot
Change FIRSTBOOT_LICENSE_DIR=”” to FIRSTBOOT_LICENSE_DIR=”/etc/firstboot/license”
Change FIRSTBOOT_WELCOME_DIR=”” to FIRSTBOOT_WELCOME_DIR=”/etc/firstboot/welcome”
*** You can launch yast2. You can click on System > /etc/sysconfig > Firstboot.
Upload your Welcome Message file and your license files to the corresponding directories
Modify the Workflow
I like to comment out the ac_step with printers.
I then change the license agreements
I enable the license view for Novell/SuSE
I then enable the License file for the custom image
I then edit the Networking proposal, so I can set custom networking details.
I then add a custom network proposal, the label is what appears on the left during the FirstBoot wizard
Creating the QuickStart Proposal
For our purposes, you’ll create a shell for your QuickStart proposal.
Mount your OpenSuSE DVD
Type zypper install yast2-devtools yast2-testsuite
Confirm the installation, type Y
Change to home folder, cd ~
Type /usr/bin/y2tool create-new-package config quickstart “Paul Bastide” “email@example.com”
The create package command has created a YCP language project, it’s pretty straightforward to read through the files in the quickstart folder
Change directory into quickstart
Build and deploy the quickstart proposal, make -f Makefile.cvs && make && make install
You’ll want to run through the log output and validate it is compiled and installed
you can launch it using yast2 quickstart (note, you can get a Graphical output if you have a Windowing environment, eg export DISPLAY=:0.0 )
To trigger firstboot on next restart, type touch /var/lib/YaST2/reconfig_system
Once, the reboot and the corresponding workflow has been completed the file will be removed.
Reboot and Test
When you are all done, you can page through your wizard and validate it’s operation.
To wrap it all up, you package the image, and ship it. Note, you can also refer to the control.xml for more more details on the final message / finish message.
Good Luck and I hope this helps with your wizard.
I ran into a few issues with the workflow that spanned beyond the obvious, double wizard prompts, so I needed to add debugging.
Add Y2DEBUG=1 to the end of the kernel line
Save the file
type touch /var/lib/YaST2/reconfig_system
Restart the Server
Run through your FirstBoot workflow
Navigate to /var/log/YaST2/
Review the log file for any errors or issues in your workflow
Issues I ran into included double prompting of the configuration wizard, I found that running through the wizard a second time after reconfig_system fixed the issue.