summaryrefslogtreecommitdiffstats
path: root/dracut/anaconda-lib.sh
Commit message (Collapse)AuthorAgeFilesLines
* rprivate -> make-rprivate (#869246).Chris Lumens2012-10-231-2/+2
|
* Avoid using mount --move on shared paths (#853508)Jesse Keating2012-10-161-1/+2
| | | | | | | | | move doesn't work because /run/ is a shared filesystem. So do as systemd suggests, mark the filesystem as private. We don't know of any reason in anaconda for the filesystem to be shared anyway. This hack can go away if/when the kernel ever allows moving mounts within a shared filesystem.
* dracut: fix set_neednet so network comes up (#849672)Will Woods2012-08-201-4/+8
| | | | | | 'rd.neednet' is no longer used by dracut. Instead it checks for the presence of /tmp/net.ifaces or $netroot. So, if we need network (and $netroot isn't set), make sure /tmp/net.ifaces exists.
* dracut: drop save_netinfoWill Woods2012-08-201-18/+0
| | | | | | | | | save_netinfo moved into upstream dracut's net-lib.sh, so we don't need our own version here. The only place we currently use save_netinfo is in the initqueue/online hook, which will always have sourced net-lib.sh first, so we don't need to worry about changing anything else.
* dracut: add comment to run_kickstart()Will Woods2012-08-131-0/+2
| | | | ..I mean, let's not beat around the bush, here.
* 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-011-0/+4
| | | | | | | | | | | 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-011-1/+7
| | | | | | | | 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.
* 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-051-0/+9
| | | | | | | | | | | | | | 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 kickstart failure if ks is on the same disk as stage2Will Woods2012-04-031-0/+8
| | | | | 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-031-0/+1
| | | | | | | 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-031-1/+1
| | | | | | 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-031-2/+3
| | | | | | | 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 cleanup: use consistent filenames for cmdline.d filesWill Woods2012-03-271-2/+2
|
* Fix nfs/nfsiso (NM handover problems / empty net.ifaces)Will Woods2012-03-261-6/+12
| | | | | | | 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.
* fix nfsiso:...:/path/to/filename.iso (#804515)Will Woods2012-03-221-7/+15
| | | | | | | | 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.
* 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-161-0/+12
| | | | | 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.
* 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.
* 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.
* Quiet bash error message if (optional) treeinfo is missingWill Woods2012-03-161-1/+1
|
* Use "online" hook to handle anaconda network root devicesWill Woods2012-03-161-13/+11
| | | | | replace anaconda{nfs,url}root with anaconda-netroot.sh fix up the arg parsing accordingly
* Fetch network kickstarts from the "online" hookWill Woods2012-03-161-1/+1
| | | | Also, make the ks parsing stuff write needed info to /tmp/ks.info.
* fix find_runtime() and parse_kickstart()Will Woods2012-03-161-2/+3
|
* kickstart parsing fixups: keep running if parse failsWill Woods2012-03-161-4/+2
|
* anaconda-lib: make sure we only run when_*_online jobs onceWill Woods2012-03-161-2/+2
|
* move parse-kickstart.py back to parse-kickstartWill Woods2012-03-161-13/+55
| | | | | rpmbuild wants to build .pyc/.pyo files for it, and we don't need/want that.
* refactor network handling (support ibft and ksdevice)Will Woods2012-03-161-19/+7
|
* add wait_for_kickstart()Will Woods2012-03-161-0/+4
|
* parse-kickstart updatesWill Woods2012-03-161-1/+10
| | | | | | - rename to parse-kickstart.py - make it write /tmp/ks.info - add parse_kickstart function to anaconda-lib
* anaconda-lib: rename check_isodir, add anaconda_live_root_dirWill Woods2012-03-161-15/+14
| | | | also remove unused mount_isodir
* split genrules into repo-genrules.sh and kickstart-genrules.shWill Woods2012-03-161-0/+36
| | | | also move some functions into anaconda-lib
* move disk_to_dev_path to anaconda-libWill Woods2012-03-161-0/+9
|
* whoops, forgot anaconda-lib.shWill Woods2012-03-161-0/+61