summaryrefslogtreecommitdiffstats
path: root/dracut
Commit message (Collapse)AuthorAgeFilesLines
...
* check treeinfo retrieval for stage2 (#790348)Brian C. Lane2012-05-021-1/+1
| | | | | | 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
* dracut: add anaconda_auto_updates() (product.img/updates.img) (#800107)Will Woods2012-05-011-1/+31
| | | | | | | | | | | 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.
* dracut: support updates=hd:... (#807982)Will Woods2012-05-016-5/+76
| | | | | | | | | | | 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..
* dracut: add copytree, rename dev_is_mounted->find_mountWill Woods2012-05-012-2/+8
| | | | | | | | 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.
* dracut: fix typo (stray '\n' in anaconda.rules)Will Woods2012-05-011-1/+1
|
* Add 'cms' dracut module on s390Will Woods2012-04-231-0/+3
| | | | This does some magic s390 setup junk, whee.
* run fetch-kickstart-net.sh after setup_net (#804846, #811851)Will Woods2012-04-201-1/+1
| | | | | | | | | | 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.)
* Fix a variable reference (#813923)Jesse Keating2012-04-181-1/+1
|
* Complain about "serial" but don't assume ttyS0Will Woods2012-04-171-7/+13
| | | | | | | | 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.
* make dev_is_mounted more reliableWill Woods2012-04-091-2/+2
| | | | | | | | | | | | 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.
* fix failure to run multiple udev-triggered jobs (#811008)Will Woods2012-04-091-1/+1
| | | | | | | | | | 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.
* copy installer image to RAM during upgrades (#810391)Will Woods2012-04-052-1/+16
| | | | | | | | | | | | | | 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.
* fix repo={hd,cdrom}:DEV:PATH (#810136)Will Woods2012-04-051-1/+2
| | | | Work around buggy splitsep, like commit 844c0c1 / bug #810005.
* Fix repo={http,ftp,nfs} (#810005)Will Woods2012-04-041-1/+2
| | | | | | | | | | 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.
* Revert "Wait for device activation / "online" hook if rd.neednet is set"Brian C. Lane2012-04-031-7/+1
| | | | | | | This reverts commit 104c442a33098670065c2dd398db991f035babed. With this patch the network never comes up. Reverting it at least allows updates=http and ks=http to work.
* dracut/parse-kickstart: handle network --device=link (or none)Will Woods2012-04-031-22/+40
| | | | | | | | | | | | | | | | | | 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.)
* dracut: fix kssendmac/inst.ks.sendmacWill Woods2012-04-031-4/+8
| | | | | 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.
* Wait for device activation / "online" hook if rd.neednet is setWill Woods2012-04-031-1/+7
| | | | | | | | | | | 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..)
* Fix kickstart failure if ks is on the same disk as stage2Will Woods2012-04-032-5/+22
| | | | | Not too hard really - just check to see if the disk is already mounted, and don't bother mounting it again if it is.
* fix 'mount: Too many levels of symbolic links' error messageWill Woods2012-04-031-1/+1
|
* support {stage2,repo}=.../path/to/file.img (#808499)Will Woods2012-04-034-5/+10
| | | | | | | preupgrade uses stage2=hd:XXX:/path/upgrade.img, so we need to handle that. stage2=XXX overrides repo=XXX, if both are present.
* dracut when_diskdev_appears: only run cmd once per deviceWill Woods2012-04-033-5/+5
| | | | | | Use initqueue --unique to ensure the command can only be enqueued once. Also, make sure anaconda-diskroot gets the correct device name.
* dracut: don't do kickstart twice, don't use root.infoWill Woods2012-04-033-4/+5
| | | | | | | 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.
* dracut: add missing spaces for module loading (#804522)Brian C. Lane2012-03-281-6/+7
| | | | Missed some needed spaces in the lists of modules.
* make ks=file:... parse kickstart earlier (#806931)Will Woods2012-03-272-14/+18
| | | | | | | | 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.
* Let "root=..." override "repo=..."Will Woods2012-03-271-0/+3
| | | | | If both "root" and "repo" are given, we should probably use the explicit root device rather than the one implied by "repo".
* dracut cleanup: use consistent filenames for cmdline.d filesWill Woods2012-03-272-4/+4
|
* fix "strsep: command not found" error with repo:hd:.. (#806966)Will Woods2012-03-271-1/+1
| | | | | | The function is actually called "splitsep", not "strsep". Strong work, Will. Didn't you used to test things?
* load modules needed by Anaconda (#804522)Brian C. Lane2012-03-273-1/+30
| | | | | Anaconda expects a minimum set of modules to be loaded, things like raid1, etc.
* Fix nfs/nfsiso (NM handover problems / empty net.ifaces)Will Woods2012-03-262-7/+13
| | | | | | | 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.
* Revert "dracut: use /run/install/source for repodir"Brian C. Lane2012-03-221-1/+1
| | | | | | | | | /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.
* dracut startup: "Loading $product $version $arch installer..."Will Woods2012-03-221-0/+1
| | | | | | | 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.
* fix nfsiso:...:/path/to/filename.iso (#804515)Will Woods2012-03-222-9/+24
| | | | | | | | 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.
* disable warnings about boot options needing 'inst.XXX'Will Woods2012-03-211-3/+5
| | | | We're not quite ready for the switch yet, so suppress these messages.
* save ifcfg for every interface we bring upWill Woods2012-03-213-6/+3
| | | | | | 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.
* dracut: fix anaconda-netroot for inst.repo=nfsiso:..Will Woods2012-03-191-0/+1
| | | | | | | We handle "nfs" and "nfsiso" exactly the same, but "nfsiso" confuses mount_nfs(). Make sure we pass "nfs" along to mount_nfs().
* dracut: accept inst.updates or updates for live.updatesWill Woods2012-03-191-0/+7
| | | | | | | | 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).
* dracut: use /run/install/source for repodirWill Woods2012-03-191-1/+1
| | | | | | | | | 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.
* make sure we save the network setup for any network device we usedWill Woods2012-03-163-11/+17
| | | | | 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 parse-kickstart's ifcfg files get copied to the systemWill Woods2012-03-161-0/+3
| | | | | | | | | | | 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)
* fix logic for setting set rd.{luks,dm,md,lvm}=0Will Woods2012-03-161-1/+1
| | | | Had a '&&' where I needed '||'. Oops. Thanks to bcl for catching it.
* fix run_kickstart for the non-repo caseWill Woods2012-03-161-19/+20
| | | | | | | | | | | | | 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.
* run_kickstart: go back to targeted cmdline parsingWill Woods2012-03-161-1/+1
| | | | | | 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.
* parse-kickstart: write ifcfg files for all net devsWill Woods2012-03-161-8/+69
| | | | | | | | | | (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.)
* add the traditional anaconda dhcpclassWill Woods2012-03-161-0/+4
| | | | I guess some people might want this?
* cleanups and fixes for ksdevice/bootdev handlingWill Woods2012-03-165-30/+42
| | | | | | | | | | 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.
* drop unused when_netdev_online functionWill Woods2012-03-161-7/+0
|
* make run_kickstart re-parse the whole commandlineWill Woods2012-03-161-3/+3
| | | | | | 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.
* set rd.{luks,dm,md,lvm}=0 unless the user says otherwiseWill Woods2012-03-161-0/+12
| | | | | | | | | 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.
* set ANACONDA=1 udev property in the right placeWill Woods2012-03-164-4/+8
| | | | | udev properties need to be set when udev is running. As it turns out, that's basically what the pre-trigger hook exists for.