Commit Graph

262 Commits

Author SHA1 Message Date
Fabian Deutsch 1a653dad7f livemedia-creator: Use discard during installation
This could help to keep the disk size down during installation,
if the FS within the VM is also supporting TRIM.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2015-12-02 16:29:31 -08:00
Fabian Deutsch f2239d7860 livemedia-creator: Use cache=unsafe for the installation disk
This should improve the installation speed, as no sync is required on the
underlying disk.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2015-12-02 16:29:31 -08:00
Brian C. Lane e728e9ccee Include qemu modules in the initrd
This includes, among other things, virtio-rng. Without it the initrd may
take longer to initialize the random non-blocking pool on KVM
installations.
2015-11-23 09:33:42 -08:00
Brian C. Lane 50bda8cf17 livemedia-creator: Check kickstart for shutdown (#1207959)
When using virt with livemedia-creator the kickstart needs to include
shutdown to make sure it doesn't hang at the end of the installation.
2015-11-23 09:26:33 -08:00
Brian C. Lane 83acd6cec7 livemedia-creator: Correctly handle not mounting image
mktar may not be run if the mount failed, this is also an error so just
set rc=1
2015-11-23 09:26:09 -08:00
Brian C. Lane 4bc4b4c5a5 livemedia-creator: Use hd:LABEL for stage2 iso
The correct way with the current dracut (and it should be backwards
compatible) is to reference it as stage2=hd:LABEL=...
2015-11-23 09:26:09 -08:00
Brian C. Lane 7a1227a522 Add support for .repo files (#1264058)
This adds the --repo command which can be added multiple times to point
to dnf .repo files.

--enablerepo and --disablerepo can be used multiple times to control
which repos from the .repo files are actually used for the boot.iso
creation.

--repo can be used instead of --source, or in addition to it.
2015-11-18 16:53:32 -08:00
Brian C. Lane 8935460d06 livemedia-creator: Actually pass vcpus to virt-install
This passes the # of cpus from --vcpus to --virt-install. Previously it
was using whatever number virt-install defaults to.
2015-11-13 13:46:08 -08:00
Brian C. Lane e5c0c634b0 Add --virt-uefi to boot the VM using OVMF
This requires OVMF to be setup on the system, and for the kickstart to
create a /boot/efi/ partition. You can then use it to create UEFI
bootable partitioned disk images.
2015-11-05 09:33:15 -08:00
Brian C. Lane a252baed18 lorax: Improve argument parsing and help
Make the metavars useful, not STRING. Simplify some of the error
checking, let the parser handle it. Add type=os.path.abspath to several
path arguments so that relative paths will be converted to absolute
paths when they are processed.
2015-10-30 08:46:06 -07:00
Brian C. Lane 77a7eb266d lorax: Add --sharedir to override configuration path
One of the most useful things to override is the path to the templates,
this adds a cmdline option to do that instead of needing to create a
whole configuration file and pass it.
2015-10-30 08:46:06 -07:00
Brian C. Lane 3338de31f3 livemedia-creator: Allow novirt ostree partitioned images (#1273199)
A --no-virt --make-ostree-live build uses a partitioned disk image.
2015-10-28 14:44:24 -07:00
Brian C. Lane 5a9ffebe7c livemedia-creator: Make --make-vagrant work with --no-virt
Also added a check to make sure the optional vagrant metadata.json file
actually exists, if passed.
2015-10-20 17:45:53 -07:00
Brian C. Lane 04878b2a16 livemedia-creator: Add --make-vagrant command
This adds support for creating Vagrant boxes using virt-install. It also
includes an example kickstart that sets up the vagrant user with the
default ssh key.

The default result, without passing --image-name, is in
/var/tmp/vagrant.tar.xz
2015-10-20 17:45:53 -07:00
Brian C. Lane 6ccebefc26 livemedia-creator: Make --make-oci work with --no-virt
Also added a check to exit early if the config and runtime files don't
actually exist.
2015-10-20 17:43:39 -07:00
Brian C. Lane 3de5c0b53e livemedia-creator: Add --make-oci for Open Container Initiative images
This implements the bundle spec from:
https://github.com/opencontainers/specs

It creates a tar with the filesystem under /rootfs/ and includes user
provided config.json and runtime.json files.
2015-10-19 15:35:50 -07:00
Brian C. Lane d282f1fa8c Reduce the size of macboot.img (#952747)
The size estimate was counting the /EFI/BOOT/ contents twice and then
doubling that. Only count things once, then double it for the
System/Library/CoreServices/ copy.

hard-links don't work. With CoreServices hardlinked to /EFI/BOOT/ the
Mac won't boot. With /EFI/BOOT/ hardlinked to CoreServices grub2 cannot
read the config file so there are 2 real copies.

This reduces the image size from 21M to about 12M
2015-10-02 13:34:12 -07:00
Brian C. Lane 1c928080f2 Do not install weak deps in boot.iso 2015-09-11 14:04:34 -07:00
Brian C. Lane bf255a41a5 Don't include early microcode in initramfs (#1258498)
The system the image boots on will likely not match the host where lorax
was run, and in some cases this can cause systems to hang.

Resolves: rhbz#1258498
2015-09-01 09:51:47 -07:00
Brian C. Lane 394d37fbb5 livemedia-creator: no-virt fsimage should only use / size from ks
The amount of free space for / should be consistent between installation
types, otherwise some may have enough space, and others won't.
2015-08-28 11:37:05 -07:00
Brian C. Lane 9f702f5624 Use execReadlines in livemedia-creator
Log output from anaconda as it is received so that progress can be
monitored.
2015-07-30 09:05:31 -07:00
Brian C. Lane 11b8eb8b97 Add reset_lang argument to everything in executils.
Running anaconda from lmc needs to override the language reset,
otherwise libuser crashes because it cannot support "C".
2015-07-27 11:27:43 -07:00
David Shea 04d170bb09 Add a verification step to Lorax.run.
After the cleanup step, check that everything in /usr/bin and /usr/sbin
can still run. Currently, this just checks that ELF files have
everything they need to link, and scripts have an interpreter.

Verifying is on by default but can be skipped with --noverify
2015-07-20 16:18:20 -04:00
Chris Lumens c3743c54bc Pass setup_logging the log file, not the whole opts structure. 2015-06-03 08:55:34 -04:00
Chris Lumens ffa25dd609 Move IsoMountpoint into its own module. 2015-06-01 14:27:32 -04:00
Chris Lumens d23605d3cc Move setup_logging into pylorax/__init__.py. 2015-06-01 14:27:29 -04:00
Chris Lumens 893791cf7d Break all the log monitoring stuff from LMC out into its own module. 2015-05-29 13:53:07 -04:00
Brian C. Lane 1305d4d0f9 livemedia-creator: Catch missing package errors 2015-05-15 17:11:20 -07:00
Brian C. Lane 80f66d438d Convert livemedia-creator to py3 2015-05-15 17:11:20 -07:00
Brian C. Lane ca0bb2681e Change mkefiboot to py3
Just a couple prints.
2015-05-15 17:11:20 -07:00
Brian C. Lane 2f927118a7 Update lorax for python3 and argparse 2015-05-15 17:11:20 -07:00
Brian C. Lane a6e469e0e6 Clean up some pylint warnings
Mostly logging, using .format() on the strings.
2015-05-15 17:11:20 -07:00
Brian C. Lane 3148a2b215 livemedia-creator: Clean up resultdir handling 2015-03-24 14:21:18 -07:00
Colin Walters 67217f5642 Add ability for external templates to graft content into boot.iso
I originally added --add-template to support doing something similar
to pungi, which injects content into the system to be used by default.
However, this causes the content to be part of the squashfs, which
means PXE installations have to download significantly more data that
they may not need (if they actually want to pull the tree data from
the network, which is not an unusual case).

What I actually need is to be able to modify *both* the runtime image
and the arch-specific content.  For the runtime, I need to change
/usr/share/anaconda/interactive-defaults.ks to point to the new
content.  (Although, potentially we could patch Anaconda itself to
auto-detect an ostree repository configured in disk image, similar to
what it does for yum repositories)

For the arch-specfic image, I want to drop my content into the ISO
root.

So this patch adds --add-arch-template and --add-arch-template-var
in order to do the latter, while preserving the --add-template
to affect the runtime image.

Further, the templates will automatically graft in a directory named
"iso-graft/" from the working directory (if it exists).

(I suggest that external templates create a subdirectory named
 "content" to avoid clashes with any future lorax work)

Thus, this will be used by the Atomic Host lorax templates to inject
content/repo, but could be used by e.g. pungi to add content/rpms as
well.

I tried to avoid code deduplication by creating a new template for the
product.img bits and this, but that broke because the parent boot.iso
code needs access to the `${imggraft}` variable.  I think a real fix
here would involve turning the product.img, content/, *and* boot.iso
into a new template.
2015-03-19 16:48:16 -04:00
Brian C. Lane 7404a28c6f livemedia-creator: Fix up fake yum object for DNF change
pylorax unconditionally calls reset() on the dbo, so provide an empty
method to keep it happy.

The lmc dbo is minimal because it is only used for creating the iso, not
anything related to package installation.
2015-03-09 09:15:31 -07:00
Brian C. Lane c0ac3ad3bb Update logic for stage2 detection on boot.iso
The stage2 image can be either LiveOS/squashfs.img or it can be
images/install.img, adjust the IsoMountpoint for this and rename the
flag to .stage2 instead of .liveos
2015-03-09 08:32:57 -07:00
Brian C. Lane 62de8c26f8 Skip using srpm repos
DNF has a bug (#1191289) when the SRPM repo isn't the first one used,
and we don't need them for lorax anyway.
2015-02-16 08:47:31 -08:00
Brian C. Lane 9ff5897eee Get the log directory from the configfile
In the lorax script create it if missing and override it with the
path of --logfile
2015-02-16 08:47:30 -08:00
Brian C. Lane fe457ed71b lorax: Add --cachedir, --force and --workdir cmdline options
--cachedir allows the user to specify where the DNF cache is located.
This doesn't actually appear to do much since dnf erases the cache when
it is done. May be useful in the future.

--workdir sets the top level directory for lorax to use for installing
packages, creating installtree and installroot. Normally a temporary
directory under /var/tmp.

Note that the workdir will *not* be removed if there is an error setting
up the DNF object.

--force skips checking if the output directory exists, allowing things
like pungi to use lorax to place the output next to the repo tree it has
already created.
2015-02-16 08:47:30 -08:00
Brian C. Lane 1ec35938b3 Cleanup help alignment 2015-02-16 08:47:30 -08:00
Brian C. Lane 345cc89ee0 dnf: remove files from installed packages
This is a workaround for a current dnf bug, it doesn't update the state
of the packages after they are installed so we tear down the base dnf
object and create a new one pointing to the installroot.

There is an additional issue with the list of files returned, hawkey and
dnf don't appear to make a distinction between files, dirs and ghosted
dirs like yum did, this can result in too much being removed (eg. all of
/etc/selinux/) so we only remove files not directories.
2015-02-16 08:47:30 -08:00
Brian C. Lane 431ca6cea4 Switch lorax to use dnf instead of yum
pylorax users will need to change to using dnf and pass a dnf.Base()
object as the dbo argument instead of a yum object as the yum or ybo
argument. See the lorax script for an example of how to do this.

The lorax cmdline argument --excludepkgs has been removed since dnf
doesn't appear to have any way to support it and packages should be
controlled using templates anyway.
2015-02-16 08:47:30 -08:00
Brian C. Lane 3f77b80d6c Use /usr/bin/python2 in scripts
New packaging guidelines:

https://fedoraproject.org/wiki/Packaging:Python#Multiple_Python_Runtimes
https://fedorahosted.org/fpc/ticket/327#comment:9
2015-02-09 08:48:22 -08:00
Brian C. Lane 30c21a1b97 livemedia-creator: Add --timeout option to cancel install after X minutes
Installations sometimes get stuck. This adds the option to cancel it
after some number of minutes have passed.
2015-02-02 12:44:32 -08:00
Brian C. Lane c231c2a63f livemedia-creator: Bump default releasever to 22 2015-01-20 10:59:18 -08:00
Radek Vykydal 5aa6bb5f0c Add --live-rootfs-keep-size option 2015-01-16 10:01:41 +01:00
Radek Vykydal d16bdcaf6d Add --live-rootfs-size option. 2015-01-16 10:01:41 +01:00
Brian C. Lane 879d831ffc livemedia-creator: Turn on debug output for dracut
Some dracut failures are hard to detect without debug enabled, so just
turn it on all the time.
2015-01-15 09:39:15 -08:00
Brian C. Lane 563f4386e8 livemedia-creator: Copy all the logs from /tmp/
It wasn't copying new logs from dnf, kickstart script logs or
tracebacks.
2015-01-15 09:39:15 -08:00
Brian C. Lane 8641caca9e livemedia-creator: Create parent dirs for logfile path
The directory where the --logfile is located is also used for other log
files and for the anaconda logs when using --no-virt. Create the parent
directories if they don't exist.
2015-01-15 09:39:15 -08:00
Radek Vykydal 14494461a9 --make-pxe-target: change permissions of regenerated initramrfs to 0644 2015-01-15 11:03:15 +01:00
Brian C. Lane cd7adac241 livemedia-creator: add a timeout to the log monitor startup 2015-01-14 07:47:19 -08:00
Radek Vykydal a19c509430 Add --make-pxe-live and --make-ostree-live (for Atomic) targets.
--make-pxe-live target generate live squashfs and initrd for pxe boot.
Also generates pxe config template.

--make-ostree-live is used for installations of Atomic Host. Additionally to
--make-pxe-live it ensures using deployment root instead of physical root of
installed disk image where needed. Atomic installation needs to be virt
installation with /boot on separate partition (the only way supported by
Anaconda currently). Content of boot partition is added to live root fs so that
ostree can find deployment by boot configuration.
2015-01-13 12:45:06 +01:00
Brian C. Lane d96ed99621 Add log monitoring to lmc --no-virt installation
Previously if there was an error during a novirt installation that
didn't exit the process there was no way to detect it. This uses the new
--remotelog option for anaconda to monitor the logs for errors using the
same criteria as it does when monitoring a virt install. If there is an
error the anaconda process will be terminated and the logs will be
gathered up into ./anaconda/
2015-01-09 15:05:12 -08:00
Colin Walters 52d962d613 Add --includepkg argument
Recently, Fedora has been trying to do a 3 product split.  As part of
that, lorax was changed to do "installpkg lorax-product-*" via
provides.

I think that approach is awkward; a much simpler approach is to simply
specify the product package as input to lorax on the command line, via
external rel-eng scripts.

This patch therefore adds --includepkg (and we should probably add an
option to remove the implicit lorax-product-* glob).
2014-12-05 15:58:58 -08:00
Brian C. Lane 30501ff492 livemedia-creator: Add nfs support for no-virt mode (#1121255) 2014-10-09 17:27:39 -07:00
Peter Jones a05348ee9f Look for "BOOT${efiarch}.EFI" in mkefiboot as well.
The aarch64 change to use shim (6907567) also stopped using mixed-case
names for BOOT${efiarch}.efi (so it's always .EFI and ${efiarch} is X64
IA32 AA64 etc. now), and mkefiboot needs to match that.

Related: rhbz#1043274
Related: rhbz#1100048
2014-10-07 10:53:08 -04:00
Brian C. Lane 1688a3c3a9 livemedia-creator: Make sure ROOT_PATH exists (#1144140)
If ROOT_PATH doesn't exist when making a tar file, create it first.

Related: rhbz#1144140
(cherry picked from commit da68471b33)
2014-09-23 11:49:02 -07:00
Brian C. Lane c8afae35b4 livemedia-creator: Add ppc64 live creation support (#1102318)
The ppc config files were missing from the live config_files directory
and ppc needs the correct lib directory so lmc has been switched to use
ArchData driven from the installed kernel arch.

Resolves: rhbz#1102318
(cherry picked from commit 59f256e989)
2014-08-27 16:40:50 -07:00
Brian C. Lane bb445e2deb livemedia-creator: Padd disk size by 2MiB
When using GPT it reserves a few more sectors at the end of the disk for
the copy of the GPT so pad the size of the partitions in the kickstart
by 2MiB instead of 1MiB to account for this.
2014-08-08 15:38:33 -07:00
Brian C. Lane ffa40722dd livemedia-creator: Run setfiles after no-virt installation
Depending on the environment that --no-virt is run inside the resulting
filesystem may need to have the SELinux labels updates. Run setfiles on
the new filesystem after the anaconda run has finished.

eg. when run from inside mock the labels will be incorrect.
2014-08-06 09:11:59 -07:00
Colin Walters 611cef1823 https is a sane package source URL scheme
Add https as a URL source and use list comprehension to check the
supported protocols.
2014-07-31 14:29:02 -07:00
Brian C. Lane c875a72020 livemedia-creator: close the socket when done
In some cases the socket may not be closed, so make sure it is to
prevent hangs when shutting down the virt.
2014-07-16 11:50:25 -07:00
Brian C. Lane 41b58f8f6c livemedia-creator: Allow the boot.iso to be shared
This allows the boot.iso to be used by multiple instances of lmc (or
virt-install if they also set --disk shareable=on)
2014-07-09 10:05:18 -07:00
Brian C. Lane 5f96701caf livemedia-creator: log more failure information
This switches on the rc checking in execWithRedirect and logs the error
it raises.
2014-07-08 13:24:58 -07:00
Brian C. Lane fd4afe2530 livemedia-creator: drop console=ttyS0
This no longer seems to be needed, and causes images created without
passing --vnc vnc to start up with a serial console. If you need a
serial console you can pass it using --kernel-args
2014-07-08 13:24:58 -07:00
Brian C. Lane ee54cc6c31 livemedia-creator: Log the line that caused the failure
Sometimes it can be hard to tell exactly what triggered the error
detection, so log the line that matched.
2014-07-08 13:24:58 -07:00
Brian C. Lane 380a6ddd6d livemedia-creator: add more errors
Add check for running traceback script and when the retry fails.

This also indicates something went wrong with the installation, exit
when they are seen in the logs.

Also drop looking for WARNING in the regex errors, they will be errors
after the syslog level name remap patch goes into anaconda.
2014-07-08 13:24:58 -07:00
Chris Lumens b7be1d97fe Allow doing non-URL installs if using virt.
In this case, we don't need to pass a repo parameter to anaconda.  It's running
in a VM and knows how to deal with a kickstart file.
2014-07-07 10:01:43 -04:00
Peter Jones c789f20b66 Don't emit media labels with spaces in them.
Spaces cause various bugs like #923374 and #855849 , and it would be
better if we just didn't use them.

Note that there's a corresponding pungi change to go with this.

Signed-off-by: Peter Jones <pjones@redhat.com>
2014-07-01 11:59:19 -04:00
Brian C. Lane 29de1d43a5 livemedia-creator: Ignore IGNORED errors in anaconda logs 2014-06-26 13:01:59 -07:00
Brian C. Lane b22a7df476 livemedia-creator: Handle virt-install failure cleanup
Unmount the iso and remove the disk, if it exists.
2014-06-19 16:43:39 -07:00
Brian C. Lane d79222e8ea livemedia-creator: Fail when there are missing packages
Watch the logs for  WARNING packaging: .* requires .* which indicates
that there are missing packages and it is sitting at a prompt waiting
for user input.
2014-06-19 16:43:39 -07:00
Colin Walters 66359415be Add --add-template{,-var}
What I need is to make something like the traditional DVD which also
includes packages.  At present this is apparently handled by the
entirely separate pungi tool.

At the moment for me, it's the least bad option to modify lorax to
inject data from an external source than to create a new tool, or
attempt to also modify pungi to do this.

This would also allow pungi's DVD creation to eventually be a set of
external templates for Lorax.
2014-05-12 16:04:28 -07:00
Brian C. Lane d25c0b0594 Update copyright statements 2014-05-09 15:13:39 -07:00
Brian C. Lane 1807a39ace livemedia-creator: Cleanup docstrings
Start using Sphinx style docstrings.
2014-05-09 11:46:37 -07:00
Brian C. Lane 833d64d1f7 livemedia-creator: Cleanup some style issues 2014-05-09 09:28:01 -07:00
Brian C. Lane 0094fab0d4 Cleanup other misc pylint warnings 2014-05-09 08:10:41 -07:00
Brian C. Lane b3e80b7564 livemedia-creator: Copy fsimage if hardlink fails
If the user supplies a fsimage to use for the iso it may not be on the
same filesystem as the working directory. Try to hardlink first, but if
that fails copy the image.
2014-04-28 10:03:11 -07:00
Brian C. Lane d04a99e8f4 livemedia-creator: Add support for making tarfiles
This adds the --make-tar option which will produce a xz compressed tar
of the root filesystem. This works with either virt-install or no-virt
modes. Use --image-name to set the output filename.

--compression is used to set the compression type to use, which defaults
to xz. Supported types are xz, lzma, gzip and bzip2.

--compress-arg is used to pass arguments to the compression utility.
2014-04-07 10:58:32 -07:00
Brian C. Lane 94e92ee9ea livemedia-creator: Allow disk sizes to be < 1GiB
Anaconda seems to insist on 3G minimum, but that is a different issue.
2014-04-07 10:58:32 -07:00
Brian C. Lane 30591349ca livemedia-creator: Check fsimage kickstart for single partition 2014-04-07 10:58:32 -07:00
Brian C. Lane 39f9e14838 livemedia-creator: Output all the errors at once
Instead of handling one error at a time, gather them all up and print
them all in one block and then exit.
2014-04-04 15:01:09 -07:00
Brian C. Lane 19d8304070 livemedia-creator: Make --make-fsimage work with virt-install
--make-fsimage was only working with --no-virt, this re-structures
things so that virt-install partitioned disk images can be converted to
a fsimage. --make-ami was actually already doing this, so change it to
use --make-fsimage and set the default image name to "ami-root.img" with
a label of "AMI".

This also adds the ability to set the fs label on iso fsimage and
fsimages created with --make-fsimage and --make-ami by passing
--fs-label, but note that bootable iso's expect the Anaconda label.
2014-04-04 15:01:02 -07:00
Brian C. Lane b73aeb92a9 livemedia-creator: Add option to create qcow2 disk images
This adds the --qcow2 option to create qcow2 disk images in virt and
no-virt modes. You can pass extra options to qemu-img with --qcow2-arg
2014-03-13 14:10:44 -07:00
Brian C. Lane 0a547d8f2a Use string for releasever not int (#1067746)
environmental variables need to be strings and there is no compelling
reason to force this to an int.

Related: rhbz#1067746
2014-02-28 16:44:56 -08:00
Brian C. Lane d9eda042f8 livemedia-creator: Set the product and release version env variables (#1067746)
When doing an image install there is no .buildstamp file to pull the
information from so use the cmdline variables (or their defaults) and
pass them to anaconda in the environment.

Resolves: rhbz#1067746
2014-02-21 09:57:47 -08:00
Brian C. Lane 04ba927777 livemedia-creator: virt-image needs ram in MiB not KiB (#1061773)
Resolves: rhbz#1061773
2014-02-07 14:19:56 -08:00
Brian C. Lane 0ae9e79a72 livemedia-creator: Use findkernels instead of KernelInfo
It only uses it for the arch, but findkernels properly excludes rescue
images and handles the new + seperator for kernel flavor.
2014-01-14 16:06:41 -08:00
Brian C. Lane dc017445ff Print error when kickstart is missing (#1052872) 2014-01-14 11:29:30 -08:00
Brian C. Lane 4b0acdc567 livemedia-creator: Cleanup temp yum files (#1025837) 2013-11-19 10:24:22 -08:00
Brian C. Lane fca6a13875 livemedia-creator: Add minimal disk example kickstart (#1019728)
Also adds a check for a bad url repo, and fix ram calculation for
appliance mode. Updates the README.livemedia-creator documentation.

Resolves: rhbz#1019728
2013-11-01 10:27:24 -07:00
Brian C. Lane 5e589be004 Add macboot option (#1012529)
Add a macboot option to lorax and both macboot and nomacboot to lmc.

Related: rhbz#1012529
2013-09-27 08:58:18 -07:00
Brian C. Lane 0319abbb58 Make sure dracut uses no-hostonly mode 2013-08-14 15:22:25 -07:00
Harald Hoyer 2402b6a85f dracut-nohostonly and dracut-norescue got renamed for dracut >= 030 2013-08-01 09:04:29 -07:00
Brian C. Lane 31dd8048ab livemedia-creator: pass inst.cmdline for headless installs (#985487)
Also add console=ttyS0 so you can run virsh console XX to follow the
install/look for errors.
2013-07-25 15:34:23 -07:00
Brian C. Lane 14fa40556c Stop using /usr/bin/env (#987028) 2013-07-24 13:41:03 -07:00
Brian C. Lane f88d42a03f livemedia-creator: clarify required package errors (#985340) 2013-07-17 10:34:43 -07:00
Brian C. Lane 23b2ddeb5c livemedia-creator: Fix logic for anaconda test (#958036) 2013-05-24 12:20:56 -07:00
Brian C. Lane 67863bbf03 livemedia-creator: Ignore rescue kernels 2013-04-16 16:31:33 -07:00
Brian C. Lane 12bad32223 Fix import of version
If the import fails it wipes out the global pylorax import.
2013-04-03 16:28:29 -07:00
Mark Hamzy 52070f045c fix version query and add one to the log file
Fix "lorax -V" and add a "version is ???" to the log file so we can easily know
what version of lorax is used to build an iso.
Changed to try/import for versioning because the version file is autogenerated.
2013-04-03 15:43:09 -07:00
Brian C. Lane fd8684f1af Add yum logging to yum.log 2013-03-12 14:09:21 -07:00
Brian C. Lane 8e84ef10c1 Add filesystem image install support
This adds support for installing to a filesystem image instead of a
partitioned disk image. It requires Anaconda's --dirinstall support.
Also re-organized the code to break it up into smaller methods.

This speeds up iso creation in no-virt mode by removing the need to copy
the filesystem from the partitioned disk image to the filesystem image
that is used to make the squashfs image.
2013-02-12 10:35:52 -08:00
Brian C. Lane 5afa0c631d livemedia-creator: don't pass console=ttyS0
passing console=ttyS0 makes the virt hang until there is input. Remove
it and now it will run unattended in text mode.
2013-01-09 16:31:49 -08:00
Martin Gracik 263618e12a Add --noupgrade option 2012-12-18 12:04:03 +01:00
Brian C. Lane 07c99ae8d0 livemedia-creator: Use SELinux Permissive mode 2012-12-13 15:58:18 -08:00
Brian C. Lane 591891c303 livemedia-creator: use cmdline mode 2012-12-13 15:52:08 -08:00
Brian C. Lane 2b8075af3a use /var/tmp instead of /tmp
Also add a --tmp option so users can specify a top level tmp dir.
2012-10-02 11:35:16 -07:00
Brian C. Lane 97cfc71664 livemedia-creator: use stage2 instead of root 2012-08-21 07:12:23 -07:00
Brian C. Lane 91ff02eae3 livemedia-creator: add location option
--location specifies an iso directory tree to be used by virt-install
instead of the iso. This allows you to update the initrd in the tree for
debugging.

virt-install uses the images/pxeboot/ directory for initrd.img and
vmlinux.

An iso is still required for the LiveOS/squashfs.img stage2 file.
2012-08-21 07:12:23 -07:00
d.marlin 5e677160cd Add a command line option to override the ARM platform.
Passed on to anaconda to make ARM images where the compose hardware
does not match the target hardware.

Signed-off-by: Brian C. Lane <bcl@redhat.com>
2012-08-15 11:09:50 -07:00
Peter Jones 72c1aa9cd3 Add grub2-efi support and Secure Boot shim support.
This adds grub2-efi support in general as well as using the Secure Boot
shim loader on uefi media.
2012-08-13 11:03:40 -04:00
Peter Jones 0f2c6ed007 Fix GPT code to allocate space for /2/ tables.
17408 is the size of the table being made, but there's one at the
beginning and one at the end.
2012-08-13 11:03:40 -04:00
Brian C. Lane 700d5007a3 add logging to lorax 2012-07-30 09:22:10 -07:00
Brian C. Lane 505d5bf164 move live templates into their own subdir of share
live media isn't exactly the same as the Anaconda install media. Right
now this amounts to needing a root= cmdline argument but in the future
there may be other differences.

This also reverts 5437557846 on the new copies of the templates.
2012-07-30 09:22:10 -07:00
Brian C. Lane 134eec24d5 clean up command execution
Switch to using execWith* so that the command and its output can be
logged. To capture the output setup a logger named "program"

livemedia-creator captures all of this into program.log
2012-07-30 09:22:10 -07:00
Brian C. Lane 994ff776c7 livemedia-creator: cleanup logging a bit 2012-07-30 09:22:10 -07:00
Brian C. Lane de3d3e17b7 livemedia-creator: add some error checking
- Add a check to livemedia-creator for /usr/bin/virt-install (#841566)
- Suggest the correct package for livemedia-creator's libvirt (#841552)
- Add to list of packages needed to build a livemedia-creator iso (#841594)
2012-07-20 17:50:00 -07:00
Will Woods 6080ff3b2a mkefiboot: add --debug
You can use the --debug flag to get debugging output from mkefiboot and
pylorax.imgutils. Helpful!
2012-06-19 19:59:59 -04:00
Brian C. Lane c143d5b72d Add pollcdrom module to dracut
From Harald Hoyer <harald@redhat.com>:

pollcdrom is used to poll for the install medium. A lot of CDROM drives
are not polled by the kernel correctly, so we have to actively poll for
the medium.
2012-06-11 10:31:57 -07:00
Brian C. Lane cc384f6e7a livemedia-creator: Hook up arch option
Pass arch to virt-install and make_appliance.
2012-06-01 11:15:31 -07:00
Brian C. Lane 6e2fdfe23f livemedia-creator: Add appliance creation
This adds support for creating an appliance description file for the
disk image. Mako templates are used to make it easy to support other
appliance targets. The included example works with virt-image.
2012-06-01 11:15:21 -07:00
Brian C. Lane 7a23c600c6 livemedia-creator: handle failed mount for ami 2012-06-01 11:15:17 -07:00
Martin Gracik 7e133c7e86 Fix typo in help (#819476) 2012-05-25 08:51:29 +02:00
Martin Gracik 6f3d8b55f3 Add --nomacboot option
Needed for systems without hfsplus support.
2012-05-25 08:47:52 +02:00
Brian C. Lane c336f4ed06 livemedia-creator: check kickstart for display modes (#819660)
lmc uses script mode. Putting one of these into the kickstart will
confuse it, especially when running in no-virt mode.
2012-05-15 13:38:56 -07:00
Brian C. Lane 9b8c2f9d19 livemedia-creator: Removed unused ImageMount class 2012-05-14 15:09:10 -07:00
Brian C. Lane eb82d0dccf livemedia-creator: cleanup after a crash
Make sure we don't leave any device-mapper or loop devices laying around
after a crash.
2012-05-14 15:08:59 -07:00
Brian C. Lane 84fdff0e50 livemedia-creator: start using /var/tmp instead of /tmp 2012-05-14 15:08:54 -07:00
Brian C. Lane 878e4c3e85 livemedia-creator: make libvirt module optional
When running with no-virt mode libvirt and virt-install are not needed
so make the import optional and update the usage info reflect that the
virt options are disabled.
2012-05-14 15:08:45 -07:00
Matthew Garrett 3aa1fcadb9 mkefiboot: Add support for disk label files
The Apple boot picker provides drive names by reading small icon files
off the filesystem. Add support for including them.
2012-05-03 10:03:13 -07:00
Matthew Garrett 0ec326eb3c mkefiboot: Copy Mac bootloader, rather than linking it
The Mac firmware needs special-casing for hardlinked bootloaders, and
it's kind of awkward to handle that in python. Just copy them for now
instead.
2012-04-13 12:54:41 -07:00
Martin Gracik 366cd617b2 Remove workdir if it was created by lorax (#807964) 2012-04-13 10:44:15 +02:00
Matthew Garrett bb18614c3b mkefiboot: Make Apple boot images appear in the startup preferences
There's a small amount of additional metadata required for the Mac boot
images to appear as bootable devices in the startup preferencs, so add
support for generating that.

Signed-off-by: Brian C. Lane <bcl@redhat.com>
2012-03-30 13:23:02 -07:00
Brian C. Lane af99682215 use cache outside the installtree
reenable the yum cache in the tmpdir, this means it doesn't end
up on the final squashfs.img, reducing the boot.iso size from
400M to 154M
2012-03-28 08:38:46 -07:00
Brian C. Lane 607bd49ed7 livemedia-creator: update TreeBuilder use for isolabel
TreeBuilder class changed its __init__ so add --volid switch,
length check and isolabel.
2012-03-08 10:01:18 -08:00
Brian C. Lane 3a5fb1415c livemedia-creator: console=ttyS0 not /dev/ttyS0 2012-03-02 16:41:27 -08:00
Brian C. Lane 69c14b8f84 livemedia-creator: Add support for making ami images
AMI images are un-partitioned filesystem images with a grub.conf that
is read by the pv-grub bootloader used by EC2. Most of the actual work
making the AMI is done in the kickstart. This just creates the image
file.
2012-03-02 16:41:27 -08:00
Martin Gracik 20fa29b32b Add option to specify volume id on command line (#786834) 2012-02-28 12:50:34 +01:00
Brian C. Lane a09806f607 Add dracut convertfs module (#787893)
Fedora 17 changes top level directories like /bin, /lib, etc. to
symlinks to the corresponding dirs in /usr/

dracut can convert old systems to the new layout using its convertfs
module.
2012-02-08 14:55:40 -08:00
Brian C. Lane 0ba566aebe update lorax and livemedia_creator to use isfinal 2012-01-30 11:02:56 -08:00
Brian C. Lane befdc218ac livemedia-creator: Mount iso if rootfs is LiveOS
In the latest method for booting the rootfs is in the LiveOS
directory of the media, not appended to the initrd. Detect this
and mount the iso and pass the CDLABEL to virt-install.
2012-01-25 17:23:25 -08:00
Martin Gracik 1bbc546147 Allow specifying buildarch on the command line (#771382)
Some repos may contain anaconda packages for more architectures,
so it's not possible to get the right buildarch.
This patch allows optional specifying of the buildarch on the
command line when running lorax.
If the buildarch is not specified manually, lorax tries to get
it from the anaconda package as before.
If there's no anaconda package in the repository, don't fallback
to the system architecture and continue, because this is pointless.
We need the anaconda package.
2012-01-10 09:34:01 +01:00
Brian C. Lane b41ab87427 lorax: Add option to exclude packages
Sometimes the repos you are using have broken deps. Now you
can exclude packages with -e or --excludepkgs
2012-01-04 13:39:12 -08:00
root dc815d10fb better debug, handle relative output paths 2012-01-03 16:32:50 -08:00
Brian C. Lane a98134b316 lorax: check for output directory early and quit 2011-12-20 17:48:45 -08:00
Brian C. Lane 10acb5e5b9 lorax: Add --proxy command 2011-12-20 17:48:44 -08:00
Brian C. Lane 0434b7d47a lorax: add --config option 2011-12-20 17:48:44 -08:00
Brian C. Lane 7149adee25 Add no-virt mode to livemedia-creator
This runs anaconda directly, using the --image install feature. The host
system should be the same release as the target system in order to avoid
unexpected problems.
2011-12-20 14:59:58 -08:00