On Fri, 2011-06-03 at 20:12 +0800, twu wrote:
Hi folks,
I'm trying to build a hard drive auto installation script but have a
puzzle on the several methods of locating repo.
As we know, there are at least 3 ways to locate the iso image:
1. add the boot argument 'askmethod', then choose the location when
anaconda prompts, like:
https://fedoraproject.org/wiki/QA/TestCases/InstallSourceHardDrive
2. add the boot argument 'repo=hd:<device>:/<path>', like:
http://fedoraproject.org/wiki/Anaconda/Options#repo
3. write the repo location into kickstart file, like:
https://fedoraproject.org/wiki/Anaconda/Kickstart#install
4. add the repo graphically (this method does not support using iso
file), like:
https://fedoraproject.org/wiki/QA:Testcase_Ftp_Repository
Can someone tell me that are these methods the same to anaconda, and if
they are different, which one can be treat as the third one(kickstart
method)?
Certainly refer to Chris' feedback for the internal differences on how
these options are handled. From a test perspective, the unfortunate
answer is that it would be great to test all of the combinations, since
bugs surface unique to each of the methods listed. Of course, testing
all of the options is going to get pretty rough for a first version of a
test script. I'd recommend choosing the evaluating which will give the
best results for the time invested.
Option #1 is the documented procedure (install-guide) for performing a
HD-ISO installation. However, I don't know of an efficient and
straight-forward way to test this since it involves 1) custom boot args
('askmethod') and 2) user input during loader.
I think we have some examples of doing #1 (for pxe-based booting and for
ISO-based booting), so that might not be tremendously difficult, and
option #2 could use the same method, or just blindly emit the proper key
sequences to stdin of loader and assume it works right.
If option#1 gives any trouble devising a solution that works for all
boot scenarios (ISO and pxeboot images), I'd likely fallback to
option#2. Option#2 would include a script that boots only using pxeboot
images (since that's easier to pass kernel boot parameters), and skips
data entry during loader.
Option#3 is another valid test scenario we'll need, in addition to other
installation repository types (nfs, url, cdrom).
The sweet spot will be a test script that is 1) capable of preparing a
guest with a partition containing a DVD ISO image, then able to 2) boot
the installer with custom boot args and a custom kickstart. Those boot
arguments could include "repo=hd:vda1/ ks=hd:vda1:/ks.cfg" (option#2),
or just "ks=hd:vda1:/ks.cfg" (option#3). Ideally, the same script, when
called with different options would be able to perform those two
functions.
4. add the repo graphically (this method does not support using iso
file), like:
https://fedoraproject.org/wiki/QA:Testcase_Ftp_Repository
As Chris mentioned, while similar, adding a package repository URL at
the reposetup phase only adds a package repo. Meaning, it isn't
preparing installation media or the installation source repository. I'd
consider option#4 a distinct future exercise that isn't unique to the HD
ISO install scenario.
Thoughts/comments/concerns?
Thanks,
James