From 9e3367d2f80d6d140ed921adb4d6cfcdd0778148 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 10 Apr 2012 20:30:53 +0000 Subject: installer: allow generation of host-only initrd during install During install dracut will generate a generic (i.e. large) initrd. As we now start udev early, we can use udev metadata when generating our initrd and thus we can generate our default, hostonly initrd. Thus ensure relevant directories (/run) are bind mounted and fake a /run/initramfs folder which is used in dracut to detect a boot which will have sufficient metadata in the udev DB. Tested with an install on a new disk and creating LVMs and also on an install where the pre-existing LVMs were reused. Suitable fixes to drakx-in-chroot have also been added, but remain untested --- perl-install/install/steps.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'perl-install/install/steps.pm') diff --git a/perl-install/install/steps.pm b/perl-install/install/steps.pm index 53e87f0c3..85de324cb 100644 --- a/perl-install/install/steps.pm +++ b/perl-install/install/steps.pm @@ -377,6 +377,12 @@ sub beforeInstallPackages { run_program::run('mount', '--bind', '/tmp/.X11-unix', "$::prefix/tmp/.X11-unix"); } + if (-e '/run') { + mkdir "$::prefix/run"; + run_program::run('mount', '--bind', '/run', "$::prefix/run"); + } + + log::l("setting excludedocs to $o->{excludedocs}"); substInFile { s/%_excludedocs.*//; $_ .= "%_excludedocs yes\n" if eof && $o->{excludedocs} } "$::prefix/etc/rpm/macros"; -- cgit v1.2.1