Personal tools
     DOCUMENTATION

User:Xiaowen

From rPath Wiki

Jump to: navigation, search

Contents

Main

  • Email: xiaowen AT rpath SPAMFREE DOT com
  • IRC: xiaowen

Pictures!

Stuff to remember

  • According to dugan, a trove gets listed in updateall --items if it's not in a group, or changed labels, or changed flavors. If it changes versions, it does NOT get listed. If it gets changed back to the same flavor/label as in the group, then it does not get listed any more.
  • Conary version string is documented in Conary:Shadowing_Examples.
  • To delete jobs in rBA in a running state that aren't actually running: sqlite3 /srv/rbuilder/data/db "DELETE FROM Jobs WHERE status=1;"
  • To use breakpoints to debug an rBA, run httpd -X.
  • rMake tracebacks: rmake q --troves --info --tracebacks <jobId>

Anaconda

So the story begins with syslinux, which is the bootloader. It's like grub, but it can boot from CD. syslinux loads the kernel into memory, and also passes it the initrd. This initrd has a very simple binary called init that's not linked (dynamically or statically) to anything. Its only job in life is to run the anaconda loader. The reason the kernel doesn't execute the loader directly instead of indirectly through init is that since init is so simple, it can be easily recompiled to say insert a call out to gdb to debug anaconda (how does this work?)

The loader displays the screen that prompts the user for how to boot. There are two images in the anaconda image, one used for a text-mode install, and the other for graphical install. Depending on user selection, anaconda mounts one of them. These are the stage 2 images.

Anaconda also mounts a product.img. This contains release notes (?) and can optionally contain anaconda source files and other types of files. Anaconda sets PYTHONPATH, LD_LIBRARY_PATH, PATH, and such variables to contain the appropriate subdirectory of the mounted product.img first, so that's a method to customize the behavior of anaconda at run time. The products.img can be found on the CD, or in the install tree (HTTP directory if you're installing via the network for example). Anaconda can also use an updates.img to customize its behavior the same way products.img does. The difference is that updates.img can also replace the anaconda executable.

When rBuilder builds a CD, it uses anaconda-templates to generate the stage 1 (initrd) and the stage 2 images. These images are cached, so subsequent builds can skip this step. rBuilder creates the products.img somehow. It also figures out all the changesets required by the top-level group and drops them all into rPath/changesets. It does a lot more other stuff, and makes that a CD.

Files in anacona-custom replace the corresponding files in anaconda, but how?

To run anaconda on a running system for debugging, check it out from mercurial, run make, then run sudo ./anaconda -r /path/to/root -m nfs://path/to/tree, where root is the chroot to install into and tree can be the mounted CD to install from.

Appliance Overviews

PXE

http://www.debian.org/releases/stable/i386/ch04s06.html.en http://en.opensuse.org/SuSE_install_with_PXE_boot http://www.stanford.edu/~alfw/PXE-Kickstart/PXE-Kickstart-4.html

Troubleshooting the rAA backup plugin

  1. Make sure the directory and the file inside it are readable by everybody.
  1. Try a backup of the empty rBA to that directory and a restore and see if that works.
  1. If the backup works, see if the file it created has a similar name to the backup file you're trying to restore from. The names should be the same except for the time stamp embedded in the name.
  1. Check the rAA logs in /var/log/raa.