summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2011-12-19 22:47:15 +0000
committerColin Guthrie <colin@mageia.org>2011-12-19 22:47:15 +0000
commit61c4b7926bef9d3198e89dbd07cc4b5dbb7ef263 (patch)
treeb6f5681a607d5c11bd3aadd52713bff13c591a9a /perl-install/install
parentd146755eb594b2364699f1dac8fee9400b4e4349 (diff)
downloaddrakx-61c4b7926bef9d3198e89dbd07cc4b5dbb7ef263.tar
drakx-61c4b7926bef9d3198e89dbd07cc4b5dbb7ef263.tar.gz
drakx-61c4b7926bef9d3198e89dbd07cc4b5dbb7ef263.tar.bz2
drakx-61c4b7926bef9d3198e89dbd07cc4b5dbb7ef263.tar.xz
drakx-61c4b7926bef9d3198e89dbd07cc4b5dbb7ef263.zip
Port stage2 to use udev.
In order to run dracut in the installer, it is necessary to have a working udev setup (specifically /dev/block/* nodes, but there may be other requirements). As dracut is needed by systemd when /usr is on a separate partition, we need udev in the installer in order to support systemd generally.
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/Makefile1
-rw-r--r--perl-install/install/install2.pm18
-rw-r--r--perl-install/install/share/list.xml5
3 files changed, 21 insertions, 3 deletions
diff --git a/perl-install/install/Makefile b/perl-install/install/Makefile
index 1cbdee2fe..c57505d1a 100644
--- a/perl-install/install/Makefile
+++ b/perl-install/install/Makefile
@@ -47,6 +47,7 @@ install_pms:
get_needed_files: xs
REP4PMS=$(REP4PMS) ../../tools/install-xml-file-list share/list.xml $(DEST)
+ mkdir -p $(DEST)/run
chmod u-s -R $(DEST) # for mount/umount
share/generate-xlocales $(DEST)
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm
index 9b600a482..32a60279e 100644
--- a/perl-install/install/install2.pm
+++ b/perl-install/install/install2.pm
@@ -395,6 +395,24 @@ sub main {
eval { fs::mount::mount('none', '/sys', 'sysfs', 1) };
eval { touch('/root/non-chrooted-marker.DrakX') }; #- helps distinguishing /root and /mnt/root when we don't know if we are chrooted
+ # Ensure /run is mounted
+ mkdir "/run", 0755;
+ run_program::run("mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run");
+ mkdir "/run/udev", 0755;
+ mkdir "/run/udev/rules.d", 0755;
+ $ENV{UDEVRULESD} = "/run/udev/rules.d";
+
+ # Start up udev and trigger cold plugs
+ run_program::run("mount", "-t", "devtmpfs", "-o", "mode=0755,nosuid", "devtmpfs", "/dev");
+ mkdir "/dev/pts", 0755;
+ run_program::run("mount", "-t", "devpts", "-o", "gid=5,mode=620,noexec,nosuid", "devpts", "/dev/pts");
+ mkdir "/dev/shm", 0755;
+ run_program::run("mount", "-t", "tmpfs", "-o", "mode=1777,nosuid,nodev", "tmpfs", "/dev/shm");
+
+ run_program::run("/lib/udev/udevd", "--daemon", "--resolve-names=never");
+ run_program::run("udevadm", "trigger", "--type=subsystems", "--action=add");
+ run_program::run("udevadm", "trigger", "--type=devices", "--action=add");
+
if ($::local_install) {
push @::auto_steps,
# 'selectLanguage', 'selectKeyboard', 'miscellaneous', 'selectInstallClass',
diff --git a/perl-install/install/share/list.xml b/perl-install/install/share/list.xml
index dffdae857..3fa6e32a0 100644
--- a/perl-install/install/share/list.xml
+++ b/perl-install/install/share/list.xml
@@ -15,9 +15,7 @@
lvm2 mdadm
mount mount.nfs umount
- <mode copy="dereference">
- usb_id <!-- needed by mouse::detect -->
- </mode>
+ udevadm <!-- needed by mouse::detect -->
badblocks
mkswap
@@ -191,6 +189,7 @@
/etc/pki/tls/certs/ca-bundle.crt
+ /lib/udev/udevd
/lib/udev/pcmcia-socket-startup
/etc/pcmcia/config.opts