Debugging Customizable Kickstart File
Kickstart file automates the installation Linux system. It does not provide a convenient way to pass parameters. Luckily, passing kernel parameters to %pre installation section works. This method requires you to write your kickstart generation script in
%pre section, then in the command section, you call the generated kickstart file.
Unfortunately, this mean it is more likely to fail if the parameters are not correct. How to debug? If you can at lease reach the installer, this document may point you direction.
1. Get the shell access
After anaconda the installer starts, there are several console tabs, the ones that are useful are:
- main: the main information screen (Alt-F1 or Ctrl-Alt-F1)
- Shell: the shell access (Alt-F2 or Ctrl-Alt-F2)
- GUI: show the install progress if graphical mode is not disabled (Alt-F6 or Ctrl-Alt-F6)
For now, shell access is the focus. Switch to Shell tab by pressing Alt-F2 or Crt-Alt-F2.
2. Inspect parameters by looking at
cat /proc/cmdfile to inspect whether the parameters looks right. Personally, I do not want to write complex parser, thus I use
quote_plus() from python to encode tricky characters like space, line feed, $ and so on.
3. Inspect the generated scripts and log files
The first thing to check is generated kickstart file. Then check following interesting files in
- ks-script-XXX: The script in section
%pre will be here. Inspect it, and even run it to see how it works or not
- *.log: various of log files
Enjoy the debugging. 🙂