Commit Graph

39 Commits

Author SHA1 Message Date
Colin Walters 50f9f48cc1 Add ability for external templates to graft content into boot.iso (#1202278)
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.

Resolves: rhbz#1202278
2015-06-25 09:18:25 +02:00
Brian C. Lane b3dabdd2e0 Update templates to use installimg for product and updates
With these templates if a package has installed files in
/usr/share/lorax/product or /usr/share/lorax/updates/ they will be used
to create product.img and/or updates.img which will be included in the
images/ directory of the iso and of the final output tree.

These can be used to customize the installation environment or provide
updates. See README.product for current documentation.

Related: rhbz#1202278
2015-06-25 09:18:24 +02:00
Daniel Mach 68f7637cab Fix gcdx64.efi path to work for other distros than Fedora. 2013-01-08 11:59:33 +01:00
Daniel Mach 356482d75e Several 'doupgrade' fixes in the x86 template. 2012-12-19 10:04:06 +01:00
Martin Gracik a0791d3074 Only run installupgradeinitrd if upgrade 2012-12-18 14:31:45 +01:00
Dennis Gilmore 78e3d0f115 add installupgradeinitrd function and use it to install the upgrade initrds 2012-11-30 13:28:38 -06:00
Dennis Gilmore 138cb06cd5 use installinitrd to install the upgrade.img initramfs so that we get correct permissions 2012-11-30 13:28:38 -06:00
Will Woods 88f027d506 make templates install upgrade.img 2012-11-30 13:28:38 -06:00
Brian C. Lane de50815e5e use inst.stage2=hd:LABEL (#848641)
The iso is able to autodetect the device and find stage2, but when they
are written to USB via dd it needs to know where to find the install
media.
2012-08-31 20:12:03 -07:00
Brian C. Lane 7ba88931ac change grub-cd.efi to gcdx64.efi (#851326)
grub2-2.00-5 has changed.
2012-08-23 14:59:46 -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
Will Woods 5437557846 Don't set a root= argument (#837208)
Using root= overrides the anaconda magic code for finding product.img
and updates.img. Anaconda can find the CDROM itself without needing
root=, though, so we can omit it safely for boot.iso.
2012-07-10 09:58:48 +02:00
Martin Gracik a17746f69c Use --mac for isohybrid only if doing macboot images 2012-05-25 08:48:03 +02:00
Martin Gracik 6f3d8b55f3 Add --nomacboot option
Needed for systems without hfsplus support.
2012-05-25 08:47:52 +02:00
Martin Gracik 4762c45b22 Fix product name replacing in templates (#799919)
The product name may contain spaces, so it needs
to be in quotes, otherwise the other words get stripped.
2012-03-30 13:22:45 -07:00
Brian C. Lane 141312ba0e add memtest to the boot.iso for x86 (#787234) 2012-02-13 07:06:09 -08:00
Martin Gracik bbd758d998 Change the squashfs image section in .treeinfo
Related: rhbz#782108
2012-02-09 16:59:15 +01:00
Martin Gracik cb6d0758d9 Add path to squashfs image to the treeinfo
Related: rhbz#782108
2012-02-09 16:28:03 +01:00
Will Woods 0fed4e33c2 Add --mac to isohybrid args (makes Apple EFI work) 2011-11-02 13:17:20 -04:00
Will Woods 1ec2fe9fbd x86.tmpl: add eltorito alt boot entry for macboot.img
This should allow us to boot the created image on Apple EFI systems.
2011-10-31 15:02:01 -04:00
Will Woods 0236440581 clean up config_files dir (and fix templates to match)
move arch-specific stuff to arch-specific subdirs and move all the
common stuff to a subdir named 'common'. Also, rename '.profile' and
'.bash_history' so you actually see them when you 'ls' the 'common' dir.

also added some helpful(?) comments to the templates.
2011-10-21 17:35:52 -04:00
Will Woods 2f4b9c16b6 New syslinux config (#734170)
Adapted from commit b3301595bc.
2011-10-21 13:17:15 -04:00
Will Woods f640a2faab Use a predictable ISO Volume Label (#732298)
New images find their root device by looking at the CDLABEL. Since pungi
is building ISO images separately from lorax, if it uses a different ISO
Volume Label we'll end up with unbootable images.

This changes the volume labels to match what pungi uses, so both should
boot OK.
2011-10-12 20:21:06 -04:00
Will Woods 9df3348a71 Move images/install.img to LiveOS/squashfs.img (#732298)
Since pungi doesn't know that images/install.img needs to be moved to
LiveOS/squashfs.img for images to be "live", they aren't bootable.

This is the simple solution to the problem. Thanks to Karsten Hopp
for the original patch.
2011-10-11 14:58:30 -04:00
Will Woods efea74ad12 syslinux-vesa-splash changed filename (#739345) 2011-09-21 23:46:48 -04:00
Will Woods bf7ed5aa4e Build EFI hybrid (usb-bootable) images
From: Matthew Garrett <mjg@redhat.com>

If we're producing EFI bootable images then we should also support
making them bootable from USB sticks. This adds support for doing so.
2011-08-29 16:29:43 -04:00
Will Woods 058fa13a54 rename ANABOOTDIR to configdir 2011-08-08 20:35:35 -04:00
Will Woods fbd23c4234 add boot config files from anaconda to configdir
This adds the boot config files from anaconda to lorax's configdir.

They've been edited to include a '@ROOT@' placeholder, so lorax can put
the proper root=... argument in place, and to use the @VAR@ convention
everywhere (instead of some using @VAR@ and some using %VAR%).

This should probably fix EFI booting, since the EFI BOOT*.conf was
missing its root=... arg.

Also some default settings were changed in syslinux.cfg (so we don't
have to rewrite those two lines every time).

One last change - the '-magic' arg and ppc 'magic' file have been
dropped, because that's kind of silly and unnecessary.
2011-08-08 20:09:32 -04:00
Will Woods f1b5c77e50 Add <%page args="..."/> to templates 2011-07-25 19:39:48 -04:00
Will Woods fbc8977105 clarify isolinux.cfg twiddling stuff 2011-06-30 16:05:04 -04:00
Will Woods da2b53d91f Fix x86 "root=..." quoting problem and add udev_escape()
udev_escape gets passed to the arch templates so they can properly
escape the root=live:CDLABEL=... argument.
2011-06-30 13:24:07 -04:00
Will Woods d1266ff4e9 x86,ppc: add "root=live:CDLABEL=..." boot arg to CD images
The current implementation is hacky and gross; we should at least update
the bootloader files in anaconda to have a %ROOT% param in them.
2011-06-27 19:22:33 -04:00
Will Woods 8122690ab9 runtime is images/install.img, or LiveOS/squashfs.img on boot.iso
rename the runtime image in the tree and on the ISO.
2011-06-24 17:26:01 -04:00
Will Woods b73132af75 rename "runtime" template arg to "runtime_img"
Mako uses "runtime" internally for things, and if you clobber it stuff
will just break in weird ways. So don't do that.
2011-06-23 10:46:28 -04:00
Will Woods 5eb6c9b12f arch templates: install runtime to /images/, put it on boot.iso
make sure the arch templates (s390 excluded) copy the runtime image in
to the /images/ dir, and make sure it gets grafted/copied into the
boot.iso.
2011-06-22 20:37:09 -04:00
Will Woods cd59bbc1f3 drop efidisk.img from boot.iso on x86 2011-05-12 17:32:03 -04:00
Will Woods 18279ba4c5 fix EFI path 2011-05-12 17:32:03 -04:00
Will Woods ba8e7e6945 x86.tmpl/efi.tmpl fixups
fix initrd hardlink
splash.xml.gz should be splash.xpm.gz
fix mkisofs args
actually replace vars in isolinux.cfg
2011-05-12 17:31:20 -04:00
Will Woods 1350cd028f treebuilder.py: uses templates to create trees/images
TreeBuilder uses templates full of commands (like ramdisk.ltmpl) to
create the output tree and boot images. There are 4 arch-specific
templates, plus a bonus EFI template which can handle EFI image creation
for any arch that implements EFI.
2011-05-09 15:33:54 -04:00