Re: Testing changes to the Anaconda loader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel F. de Araujo wrote:
Hello,

It is my understanding that there are two "sections" of Anaconda: the
loader (written in C) and the installer (written in Python).  I
understand that in order to test changes to the python portion of
Anaconda, I can simply copy my updated python modules to a floppy or to
an updates.img file and Anaconda will use my updated source code.
Unfortunately, I don't understand how to exactly go about testing
changes to the Anaconda loader.  Do I simply make my changes to the C
source code and follow the instructions listed on
http://lal.bizhat.com/docs/anaconda.html (steps 1-7)?  If this is not
correct, could someone please layout the exact steps--or point me to
some documentation--I can follow in order to test my changes?

Thanks in advance for your help.

Regards,
-Dan


Welcome to one of the most fun and irritating parts of anaconda development!

How do we test and develop the loader? Well, we use netbooting at RH to do development work because making new CDs over and over is wasteful and slow.

If you know how to set up a PXE boot server, great. If you don't, you should probably get that going before playing around with loader.

Make your changes to the C code and then recompile. Note that you will also need to build libisys and libutil (also in anaconda), so it's best to do a 'make' from the toplevel first and then you can do make from within the loader2 subdir as you work on loader. There are also other build requires which you can see by reading the anaconda.spec file.

Now, to test it, you have to boot it. There is *NO WAY* to run loader in a test or debugging mode. Why? Because it starts poking at hardware and taking control of terminals.

You need to update initrd.img from the images/pxeboot subdirectory in the Fedora tree with a new 'loader' binary that you just built. initrd.img is a gzipped cpio archive. Take a look at scripts/upd-initrd to see one way you can update initrd.img for testing. In my script, I also copy in the newly built 'init' as well as 'loader' since I sometimes make changes in init.

Enjoy!

--
David Cantrell
Red Hat / Westford, MA


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux