| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
If there is no treeinfo the stage2 variable may still be set,
check if treeinfo or stage2 are empty and fall back to
LiveOS/squashfs.img
|
|
|
|
|
|
|
|
|
|
|
| |
So, loader used to look for updates.img/product.img/RHUpdates under
whatever path it was given for the stage2 image. We need product.img for
variant installers (like the RHEL installer) so we need to look for
these things.
Add the anaconda_auto_updates() function to look for these things and
put them in the appropriate places. Also add unpack_updates_img() as a
helper for cleanly unpacking updates images.
|
|
|
|
|
|
|
|
|
|
|
| |
Since we've removed all UI from initramfs, plain 'updates' no longer
works if you want to load an updates image from disk.
This adds support for fetching updates images, much the same way as we
do with kickstarts.
Note that I'd really like to merge all the *-genrules.sh / fetch-*-disk
junk, but time is short..
|
|
|
|
|
|
|
|
| |
copytree() is a function for copying/merging directory trees - useful
for stuff like updates images.
dev_is_mounted is confusingly similar to dracut-lib's 'ismounted', so
it's been renamed for clarity.
|
| |
|
|
|
|
| |
This does some magic s390 setup junk, whee.
|
|
|
|
|
|
|
|
|
|
| |
Commit 1e4a880 in dracut adds 'online/05-setup_net.sh' to ensure that
setup_net gets run before (most) online hook scripts, but we were
running fetch-kickstart-net.sh at a priority of 00.
Move it to priority 10 so setup_net happens first.
(Credit to Harald Hoyer <harald@redhat.com> for catching this.)
|
| |
|
|
|
|
|
|
|
|
| |
People use "serial" all over the place as some kind of magic voodoo
incantation for "I want text mode and stuff", so rewriting it to
"console=ttyS0" isn't really appropriate.
Let the user know that it's deprecated, and ignore it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
If /dev/sda1 was mounted at /mnt, and it had the label FUNK, you might
reasonably expect this to return "/mnt":
dev_is_mounted /dev/disk/by-label/FUNK
Since /proc/mounts uses the kernel name for the devices, and the
symlinks in /dev are (basically) always linked to the kernel
device name, all we have to do is follow the symlinks to find the name
that should be in /proc/mounts.
|
|
|
|
|
|
|
|
|
|
| |
initqueue truncates job names down to the basename if they contain
slashes. So if you had two jobs for /dev/by-label/FLASH, they'd both end
up named "FLASH", and with --unique they'd collide and you'd end up with
just one job.
Drop --unique to avoid these sorts of collisions. Also drop the $dev
from the job name - it didn't really need to be there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When installing from a hard drive, loader used to copy install.img to
tmpfs and unmount the partition afterward. We're avoiding that (to save
RAM) and it works fine in most cases.
However: for preupgrade, stage2 is stored in /boot. When anaconda tries
to mount /boot for upgrading, it finds that it's already mounted, pops
up a "Fatal error" dialog, and exits.
So, a hack: if "preupgrade" or "upgrade" or "inst.upgrade" is in the
boot args, and we're getting the installer image from a disk, copy the
install image into tmpfs and unmount the disk before proceeding.
|
|
|
|
| |
Work around buggy splitsep, like commit 844c0c1 / bug #810005.
|
|
|
|
|
|
|
|
|
|
| |
It turns out that dracut-lib's "splitsep" doesn't work as documented.
This line:
splitsep ":" "anaconda-net:http://nyan.cat/" prefix repo
yields "repo=http", with the rest of the URL discarded. Boo!
Split up the string ourselves for now. We'll change this back once
splitsep is fixed.
|
|
|
|
|
|
|
| |
This reverts commit 104c442a33098670065c2dd398db991f035babed.
With this patch the network never comes up. Reverting it at least
allows updates=http and ks=http to work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you have a kickstart where your first network line has no device (or
--device=link), we won't have a valid net.device ("" or "link",
respectively.) Still a valid kickstart though, so we need to generate
correct dracut args for that case.
Also we need to set rd.neednet so the device always goes online in
dracut (matching loader's behavior).
This means we don't need to write ifcfg if net.device is empty:
1) empty 'net.device' is only valid for the first device,
2) first device always comes online,
3) online devices get ifcfg written by dracut.
(It also means we don't need to touch /tmp/net.ifaces, since that happens
in step 3.)
|
|
|
|
|
| |
Can't get MAC addresses until after the network modules have loaded, so
schedule set_ks_sendmac to happen at the start of the mainloop.
|
|
|
|
|
|
|
|
|
|
|
| |
If we're expecting network devices to come up, we need to tell dracut
to wait for devices to activate before proceeding to stage 2, otherwise
we won't have ifcfg files, and the NM handover will fail, and anaconda
considers it a fatal error if a network device isn't active when the
kickstart says it should be.
(It would be nice if anaconda could set up the network itself so we
didn't have to handle this all in initramfs..)
|
|
|
|
|
| |
Not too hard really - just check to see if the disk is already mounted,
and don't bother mounting it again if it is.
|
| |
|
|
|
|
|
|
|
| |
preupgrade uses stage2=hd:XXX:/path/upgrade.img, so we need to handle
that.
stage2=XXX overrides repo=XXX, if both are present.
|
|
|
|
|
|
| |
Use initqueue --unique to ensure the command can only be enqueued once.
Also, make sure anaconda-diskroot gets the correct device name.
|
|
|
|
|
|
|
| |
Empty "$kickstart" in run_kickstart, so we don't end up looking for the
kickstart again - and don't run fetch-kickstart-disk if it already ran.
Also, newer dracut doesn't bother with root.info so neither should we.
|
|
|
|
| |
Missed some needed spaces in the lists of modules.
|
|
|
|
|
|
|
|
| |
ks=file:... was parsing the kickstart *after* the 'cmdline' hook
finished, so the new arguments weren't being used.
Move the parsing into the 'cmdline' hook so the new arguments can get
used by the rest of dracut.
|
|
|
|
|
| |
If both "root" and "repo" are given, we should probably use the explicit
root device rather than the one implied by "repo".
|
| |
|
|
|
|
|
|
| |
The function is actually called "splitsep", not "strsep".
Strong work, Will. Didn't you used to test things?
|
|
|
|
|
| |
Anaconda expects a minimum set of modules to be loaded, things
like raid1, etc.
|
|
|
|
|
|
|
| |
Commit 0544eff was supposed to make anaconda try to write net.ifaces
whenever an interface came up, but because of a quoting error it
*emptied* /tmp/net.ifaces instead. It also didn't handle adding things
to net.ifaces correctly. This patch fixes both problems.
|
|
|
|
|
|
|
|
|
| |
/mnt/install/source is used by anaconda to mount install media,
if it finds the boot iso mounted there it will try to unmount it,
which will fail since we are running from it. Leave it at install/repo
so that this doesn't happen.
This reverts commit 37144b9e86e801074fa4ae4656da458fe83f6e07.
|
|
|
|
|
|
|
| |
If you boot with 'quiet', things are quiet. Almost.. *too* quiet.
Add a startup message. If "$product" or "$version" can't be found the
message will just be "Loading $arch installer..." which is pretty OK.
|
|
|
|
|
|
|
|
| |
If we're given the path to an iso, we need to split it up so we mount
the directory the iso is *in*, and then mount the iso.
Also, fix a harmless typo bug in find_runtime and clean up/clarify
anaconda_live_root_dir a bit.
|
|
|
|
| |
We're not quite ready for the switch yet, so suppress these messages.
|
|
|
|
|
|
| |
It doesn't matter why we brought up the interface - we want to hand the
info over to NM regardless. So save the netinfo for all onlined
interfaces.
|
|
|
|
|
|
|
| |
We handle "nfs" and "nfsiso" exactly the same, but "nfsiso" confuses
mount_nfs().
Make sure we pass "nfs" along to mount_nfs().
|
|
|
|
|
|
|
|
| |
If the user passes 'updates=XXX' or 'inst.updates=XXX' we should accept
that like we do 'live.updates=XXX'. At least for now.
Also remove a comment about updates=XXX - it turns out that setting
updateSrc is necessary (the storage module puts it into disallowDrives).
|
|
|
|
|
|
|
|
|
| |
loader used to put the install source at /mnt/install/source; we're
moving to /run but it simplifies things to keep the directory name the
same.
This lets us just symlink /mnt/install to /run/install and things should
work like they used to.
|
|
|
|
|
| |
anaconda expects any device brought up in stage1 to still be active, so
let's make sure we pass along the required info for NetworkManager.
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure that /tmp/net.ifaces exists; this file triggers the dracut
'ifcfg' module and makes it copy all the files in /tmp/ifcfg to
/run/initramfs/state/etc/sysconfig/network-scripts.
Then fedora-import-state.service picks those files up and off we go!
(We could write them to state/etc/... ourselves, but we want dracut to
be able to overwrite the files in /tmp/ifcfg if it needs to)
|
|
|
|
| |
Had a '&&' where I needed '||'. Oops. Thanks to bcl for catching it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you're booting from a CD but using a kickstart for other stuff, we
still need to set up / retrigger block stuff *even though you don't have
a repo defined by the kickstart*.
The problem was two things: first, we were leaving $root set to
"anaconda-kickstart", so parse-anaconda-repo.sh didn't change anything.
Second, when root was set to "anaconda-auto-cd" because there wasn't a
inst.repo arg, we never triggered the disk magic. So we never found the
CD.
|
|
|
|
|
|
| |
So yeah, re-parsing the whole commandline just makes us emit error
messages and doesn't write out the ifcfg lines we wanted, so let's not
do that.
|
|
|
|
|
|
|
|
|
|
| |
(note that the one for the ksdevice will get overwritten by dracut,
but that's OK)
update comments to reflect current limitations etc.
oh, and AFAICT loader just uses DHCP for BOOTP, so handle BOOTP like
DHCP if we see that. (which we won't.)
|
|
|
|
| |
I guess some people might want this?
|
|
|
|
|
|
|
|
|
|
| |
First, cleanup: don't bother with /tmp/ks.info, export "$ksdevice".
Next: we need to specify which net interface is the bootdev if we've got
more than one. So:
- if we get a specific ksdevice from the cmdline, set "bootdev=$ksdevice"
- otherwise (ksdevice=link etc.) set $ksdevice when a device comes up..
- ..and set "bootdev=$ksdevice" from parse-kickstart if needed.
|
| |
|
|
|
|
|
|
| |
Re-running the cmdline hook will cause the 'network' module to write out
the network config files, which should make the 'ifcfg' module write
ifcfg-eth* files, which should fix the kickstart 'network' command.
|
|
|
|
|
|
|
|
|
| |
Currently anaconda will crash if we don't set rd.luks=0. The others
anaconda can *mostly* handle but historically they would have been set
to 0, so it's more reliable if we do it that way.
Someday soon we'll make sure anaconda can handle already-active devices
and we'll remove this block of code. Really.
|
|
|
|
|
| |
udev properties need to be set when udev is running. As it turns out,
that's basically what the pre-trigger hook exists for.
|