Commit Graph

37 Commits

Author SHA1 Message Date
Will Woods a3e1a275ff don't build upgrade.img anymore
fedup is deprecated and abandoned. Let's save time and disk by not
building `upgrade.img` when nothing is going to use it anymore.

For the record, performing upgrades using an initramfs from the new
system turns out to be fragile and hard to support:

* dracut initramfs isn't generic enough to handle booting all systems
  (e.g. missing vconsole.conf means you get keymaps wrong, so users
  can't unlock encrypted disks)

* The ABI differences between the two versions of plymouth, systemd,
  etc. requires nasty workarounds at best and causes nightmarish
  systemd crashes at worst

This patch removes all the code that built and installed `upgrade.img`.

For backwards compatibility, the API retains the `doupgrade` keyword
argument, and the `--noupgrade` flag is still accepted.
2015-08-31 16:24:39 -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 c548084ccf Move stage2 to images/install.img (#815275)
Use the same stage2 location for all arches, put it in images with all
the other images. This only effects boot.iso, live images still use
LiveOS/squashfs.img because that's where dracut's 90dmsquashfs-live
module expects to find it.

For boot.iso anaconda-dracut handles finding stage2, looking at
images/install.img and LiveOS/squashfs.img
2015-03-03 09:01:21 -08:00
Brian C. Lane d6f7c83c2e Remove the ppc magic file
magic is no longer needed.
2014-11-05 16:28:15 -08:00
Brian C. Lane ac6e4a29c3 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.
2014-11-05 16:13:40 -08:00
Brian C. Lane 364ce363f7 Add ppc64le arch (#1136490)
basearch is ppc64le so we needs to check for that in addition to ppc64.

Resolves:rhbz#1136490
2014-09-03 10:41:42 -07:00
Erik Larsson 0b825ab3ab Bless grub2 for PPC (#1020112) 2013-12-11 10:27:12 -08:00
David W. Aquilina 71d1461e3f Yaboot to grub2 conversion cleanup. 2013-09-09 16:30:31 -07:00
Paulo Flabiano Smorigo 44638fbc8d GRUB2 as the ISO boot loader for POWER arch
Currently, yaboot is the ISO boot loader in fedora and the Fedora on
POWER team is making an effort in order to replace it by GRUB2 in the
F20 release cycle. I'm sending a lorax patch so you guys can comment
on it. I'm planning to create a feature page for that too.

This patch only change the lorax template for ppc and should not
affect other archs, like x86.

--
Paulo Flabiano Smorigo
Software Engineer
Linux Technology Center - IBM Systems & Technology Group
2013-08-28 16:06:48 -07: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
Dennis Gilmore 69c251aa20 ppc and arm need to use kernel.upgrade not kernel.upgrader 2012-11-30 13:28:38 -06:00
Will Woods 88f027d506 make templates install upgrade.img 2012-11-30 13:28:38 -06: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 7ba6af6d29 Copy mapping and magic to BOOTDIR on ppc (#815550) 2012-05-25 13:47:33 +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
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 27dda6eae6 ppc.tmpl: work around yaboot's crippling fear of backslashes
If yaboot so much as catches a whiff of a backslash in yaboot.conf, it
will reject the entire file. No bootloader config means no booting.

So as long as we're still using yaboot on PPC, we need to use ISO volume
labels it can handle. So: filter the isolabel, replacing any non-ASCII
characters with underscores.
2011-11-16 15:18:47 -05:00
Will Woods 86937d2c0a ppc.tmpl: clarify comments, fix yaboot.conf for Apple systems
So there's actually two copies of yaboot on a PPC image, and they each
use different config files:

  ppc/chrp/yaboot --> /etc/yaboot.conf
  ppc/mac/yaboot  --> /ppc/ppc{32,64}/yaboot.conf

So we need two copies of yaboot.conf - one in each place - to
boot properly (or all three if we're making hybrid images). Whee!

The comments should now make this more clear for future reference.
2011-11-16 15:17:39 -05: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 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 f7010454a0 minor ppc.tmpl cleanups 2011-08-08 21:11:28 -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 913fffbfa9 Use graft-points in ppc.tmpl 2011-07-25 20:09:54 -04:00
Will Woods f1b5c77e50 Add <%page args="..."/> to templates 2011-07-25 19:39:48 -04:00
Will Woods 2fcb05883b scads of ppc.tmpl fixes 2011-07-05 19:37:26 -04:00
Will Woods a2b6b53cf3 ppc.tmpl fix: %endif, not %fi (what is this, bash?) 2011-07-05 14:06:13 -04:00
Will Woods c5bfdf0e71 ppc.tmpl: clean up zimage building
remove deprecated "mkzimage" stuff (gone since F10)
clean up the call to 'wrapper'
assume we'll always build zimages
2011-07-01 13:05:11 -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 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