A new way to install Fedora

Gene Czarcinski gczarcinski at ec.rr.com
Sun Nov 9 16:15:27 UTC 2014


While not exactly new I have not seen this described elsewhere.

First, some background:

For years I have been using kickstart to perform installs on both real 
hardware and virtual systems.  I found that a kickstart install allowed 
me to defines the parameters before the install and minimize the  human 
error that would occur in a regular gui install.  The kickstart install 
also allowed me to define the exact set of packages I wanted for that 
system.

Another factor are my "rules" for installation  / backup / recovery:

  * Rule 0: never, ever install over a working/current system just to
    install the "next release" ... do not do upgrades but fresh installs
    into different partitions/subvolumes.  This means that all my
    systems are multiboot.  In fact, I generally have predefined
    partitioning for last release, current release, new release and test
    release.
  * Rule 1: Separate all user data from the system/application
    software.  Backup all user data early and often.
  * Rule 2: Recovery of user data is to restore it from backups.
  * Rule 3: To recover the system and application software, do a fresh
    install.
  * Rule 4: You do not want to test the recovery process when you really
    need it because of a hardware failure.  So, occasionally test
    performing a full system, application, and user data recovery/restore.

And then the new approach;

Prior to Fedora 21, I have been using a GA DVD and doing basically a 
netinstall or creating my own DVD based on everything plus updates repos 
which included all of the basic packages I wanted installed. With 
product-ized Fedora 21 and some rethinking, I realized that a better 
approach would be to use a live install.  A live install not only 
installs faster than the equivalent DVD or netinstall but also fixes the 
release/version for each package installed to a known "good" values.

So, we are going to switch to using live installs.  The first thing that 
occurs to me is how I can invoke kickstart from liveinst.  I found that 
anaconda developers really, really do not want to support kickstart from 
liveinst!  However, while investigate that I found that turning the 
question around is doable and supported: doing a kickstart install which 
installs a live image.  For my kickstart reference, I use 
http://fedoraproject.org/wiki/Anaconda/Kickstart and the kickstart 
command of interest is:
|liveimg --url=<url> [--proxy=<proxyurl>] [--checksum=<sha256>] 
[--noverifyssl]|
where --url=<path_to_squashfs.img> and can be --url=http:// or 
--url=file:///

The squashfs.img is copied from the LiveOS directory of a livecd iso and 
should be renamed something meaningful to differentiate between 
different live installs (e.g., F21-Live-Ws-Beta-4.img).

The simple case which works now is to put the kickstart file and the 
renamed squashfs.img file on a webserver.  Boot up a "good" netintall 
and specify inst.ks=http://<path_to_ks_file>.  That kickstart file includes
   liveimg --url=http://<path_to_squashfs.img>

Done!

Now that we have a basic kickstart plus liveimg install, there are some 
additional opportunities.

1. You can create you own "nonproduct" (semi-product) liveimg using 
livecd-creator and a kickstart file modified to include the set of 
packages you want installed.  Note that you can use the same setup 
described here:
https://fedoraproject.org/wiki/How_to_create_a_Fedora_install_ISO_for_testing
     https://fedorahosted.org/pungi/wiki/PungiDocs/RunningPungi
to run livecd-creator under mock.  Once the livecd iso has been created, 
mount it and copy out the LiveOS/squashfs.img file. Creating your own 
livecd has the additional advantage of being able to include local 
updates.  In my case, this includes my updated grubby supporting /boot 
on btrfs [currently targeted for Fedora 22].

2. Since many/most computers these days are able to boot of a usb-stick, 
you can put the netinstall on a stick and include some or all of the 
kickstart and squashfs.img files too.  In fact, you can put multiple 
kickstart files for different systems and multiple squashfs.img files 
for different LiveOS/squashfs.img files on that same usb-stick so that 
you are network independent.

The command to specify getting the squashfs.img frle from the usr-stack is:
       liveimg  --url=*file:///run/install/repo/*<path_to_squashfs.img_file>

For example:
       liveimg  
--url=file:///run/install/repo/payload/F21-Live-Ws-Beta-4.img

*Some gotchas*:

1.  While the network (liveimg --url=http://) currently works, there is 
a bugfix for anaconda which is needed for file:/// to work. See:
https://lists.fedorahosted.org/pipermail/anaconda-patches/2014-November/014500.html
https://lists.fedorahosted.org/pipermail/anaconda-patches/2014-November/014501.html
https://lists.fedorahosted.org/pipermail/anaconda-patches/2014-November/014513.html

I have this anaconda updates image for the Beta:
http://czarc.org/fedora/updates/anaconda-21.48.13-1d1-updates.img

2.  To use a usb-stick with virt-manager, you may need to patch it with 
the update:
https://bugzilla.redhat.com/show_bug.cgi?id=1146297
This patch applies to the fedora-virt-preview repo for Fedora 20.

Please feel free to comment, suggest, or add to this ... it is a work in 
progress.

Gene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/kickstart-list/attachments/20141109/8125bd2f/attachment.htm>


More information about the Kickstart-list mailing list