From a1b06a0aeaa34954e0cff6563779d1805d4e252a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 7 Aug 2007 13:47:32 +0000 Subject: make drakx-in-chroot work with new libldetect: - /sys must be mounted - /lib/modules//modules.{dep,alias} are needed nb: still need to modify drakx-installer-images --- tools/drakx-in-chroot | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/drakx-in-chroot b/tools/drakx-in-chroot index da1a45eca..ede763196 100644 --- a/tools/drakx-in-chroot +++ b/tools/drakx-in-chroot @@ -35,7 +35,7 @@ if (-d $SLASH_LOCATION) { rm_rf($SLASH_LOCATION); } -mkdir_p("$SLASH_LOCATION$_") foreach '/dev', '/dev/usb', '/etc', '/var', '/proc', $STAGE2_LOCATION_ROOTED, $MEDIA_LOCATION_ROOTED, $prefix_ROOTED; +mkdir_p("$SLASH_LOCATION$_") foreach '/dev', '/dev/usb', '/etc', '/var', '/proc', '/sys', $STAGE2_LOCATION_ROOTED, $MEDIA_LOCATION_ROOTED, $prefix_ROOTED; sys("$sudo rm -rf $dir") if $ENV{CLEAN}; -e $dir or sys("$sudo mkdir -p $dir"); @@ -56,6 +56,7 @@ if ($remote_repository) { sys("$sudo mount -o bind $dir $SLASH_LOCATION$prefix_ROOTED"); sys("$sudo mount -o bind $repository $SLASH_LOCATION$MEDIA_LOCATION_ROOTED") if !$remote_repository; sys("$sudo mount -t proc none $SLASH_LOCATION/proc"); +sys("$sudo mount -t sysfs none $SLASH_LOCATION/sys"); symlinkf('media', "$SLASH_LOCATION$IMAGE_LOCATION_ROOTED"); create_initial_symlinks(); create_initial_devices(); @@ -72,6 +73,13 @@ eval { cp_af($_, "$dir$_") } foreach qw(/dev/root); #- if the DISPLAY is remote, we may need to resolve the name: eval { cp_af($_, "$SLASH_LOCATION$_") } foreach qw(/etc/resolv.conf); +{ + chomp(my $kernel_version = `uname -r`); + my $dir = "/modules/$kernel_version"; + mkdir_p("$SLASH_LOCATION$dir"); + cp_af("/lib/$dir/modules.dep", "/lib/$dir/modules.alias", "$SLASH_LOCATION$dir"); +} + my $Xnest_pid; my $Xnest_bin = find { whereis_binary($_) } 'Xnest', 'Xephyr'; if (!-f ($SLASH_LOCATION . $AUTO_INSTALL_ROOTED) && $Xnest_bin) { -- cgit v1.2.1