summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2005-08-20 21:09:11 +0000
committerMystery Man <unknown@mandriva.org>2005-08-20 21:09:11 +0000
commit132ca0305e567b13a0bdf65455e7f04d3d8c33a8 (patch)
treeb6d9f55e281d5d8f037ca88ef643ed483587fb2e /rescue
parentb569006d83d0e3c836e9f5eacae81b485015b6c3 (diff)
downloaddrakx-backup-do-not-use-132ca0305e567b13a0bdf65455e7f04d3d8c33a8.tar
drakx-backup-do-not-use-132ca0305e567b13a0bdf65455e7f04d3d8c33a8.tar.gz
drakx-backup-do-not-use-132ca0305e567b13a0bdf65455e7f04d3d8c33a8.tar.bz2
drakx-backup-do-not-use-132ca0305e567b13a0bdf65455e7f04d3d8c33a8.tar.xz
drakx-backup-do-not-use-132ca0305e567b13a0bdf65455e7f04d3d8c33a8.zip
This commit was manufactured by cvs2svn to create tagV10_3_0_47mdk
'V10_3_0_47mdk'.
Diffstat (limited to 'rescue')
-rw-r--r--rescue/.cvsignore1
-rw-r--r--rescue/Makefile12
-rw-r--r--rescue/aliases6
-rw-r--r--rescue/devices.pl54
-rw-r--r--rescue/dirs6
-rwxr-xr-xrescue/drvinst47
-rwxr-xr-xrescue/guessmounts82
-rwxr-xr-xrescue/install_bootloader63
-rw-r--r--rescue/list.xml234
-rwxr-xr-xrescue/lsparts45
-rwxr-xr-xrescue/make_partimage_save_rest_all65
-rwxr-xr-xrescue/make_rescue_img115
-rwxr-xr-xrescue/partimage_whole_disk248
-rwxr-xr-xrescue/rescue-doc60
-rwxr-xr-xrescue/restore_ms_boot73
-rwxr-xr-xrescue/tree/bin/insmod2
-rwxr-xr-xrescue/tree/bin/login2
-rw-r--r--rescue/tree/etc/fstab4
-rw-r--r--rescue/tree/etc/group1
-rw-r--r--rescue/tree/etc/host.conf2
-rw-r--r--rescue/tree/etc/hosts1
-rw-r--r--rescue/tree/etc/inittab14
-rw-r--r--rescue/tree/etc/issue28
-rw-r--r--rescue/tree/etc/passwd3
-rw-r--r--rescue/tree/etc/profile24
-rwxr-xr-xrescue/tree/etc/rc.reboot8
-rwxr-xr-xrescue/tree/etc/rc.sysinit62
-rw-r--r--rescue/tree/etc/resolv.conf2
-rwxr-xr-xrescue/tree/sbin/fakeshutdown39
-rwxr-xr-xrescue/tree/sbin/modprobe56
-rw-r--r--rescue/tree/usr/lib/CVS.0
-rw-r--r--rescue/tree/usr/share/symlinks11
32 files changed, 0 insertions, 1370 deletions
diff --git a/rescue/.cvsignore b/rescue/.cvsignore
deleted file mode 100644
index c660273e8..000000000
--- a/rescue/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-rescue.clp
diff --git a/rescue/Makefile b/rescue/Makefile
deleted file mode 100644
index 9721a68dc..000000000
--- a/rescue/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-include ../Makefile.config
-
-all: rescue.clp
-
-install: rescue.clp
- cp -f $< $(STAGE2_DEST)
-
-rescue.clp: list.xml drvinst guessmounts lsparts rescue-doc make_rescue_img
- DISTRIB_DESCR=$(DISTRIB_DESCR) ./make_rescue_img
-
-clean:
- rm -f rescue.clp kernel_read_part
diff --git a/rescue/aliases b/rescue/aliases
deleted file mode 100644
index cec7b82ba..000000000
--- a/rescue/aliases
+++ /dev/null
@@ -1,6 +0,0 @@
-/bin/zcat gzip
-/bin/gunzip gzip
-/bin/vi vim-minimal
-/sbin/lsmod lsmod-25
-/sbin/rmmod rmmod-25
-/sbin/insmod insmod-25
diff --git a/rescue/devices.pl b/rescue/devices.pl
deleted file mode 100644
index 79308508a..000000000
--- a/rescue/devices.pl
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/perl
-
-@ARGV == 1 && chdir $ARGV[0] or die "usage: devices.pl <dir>\n";
-
-if ($>) { $sudo = "sudo"; $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; }
-
-foreach (<DATA>) {
- chomp;
- my ($typ, $maj, $min, @l) = split;
- foreach (@l) {
- my @l2 = do {
- if (my ($prefix, $ini, $end) = /(.*)(\d+)-(\d+)$/) {
- map { "$prefix$_" } $ini .. $end;
- } else {
- $_;
- }
- };
- system("$sudo mknod $_ $typ $maj " . $min++) foreach @l2;
- }
-}
-
-__DATA__
-c 5 1 console
-b 2 0 fd0-1
-c 1 2 kmem
-b 7 0 loop0-15
-c 1 1 mem
-c 1 3 null
-c 1 4 port
-b 1 1 ram
-b 1 0 ram0-19
-b 1 0 ramdisk
-c 1 8 random
-b 11 0 scd0-7
-c 0 0 stderr
-c 0 0 stdin
-c 0 0 stdout
-c 5 0 tty
-c 4 0 tty0-9
-c 4 64 ttyS0-3
-c 1 9 urandom
-c 1 5 zero
-b 3 0 hda hda1-16
-b 3 64 hdb hdb1-16
-b 22 0 hdc hdc1-16
-b 22 64 hdd hdd1-16
-b 33 0 hde hde1-16
-b 33 64 hdf hdf1-16
-b 34 0 hdg hdg1-16
-b 34 64 hdh hdh1-16
-b 8 0 sda sda1-15 sdb sdb1-15 sdc sdc1-15 sdd sdd1-15 sde sde1-15 sdf sdf1-15 sdg sdg1-15 sdh sdh1-15
-b 9 0 md0-15
-c 10 144 nvram
-c 9 0 st0-15
diff --git a/rescue/dirs b/rescue/dirs
deleted file mode 100644
index e6d5a5d47..000000000
--- a/rescue/dirs
+++ /dev/null
@@ -1,6 +0,0 @@
-/lib
-/tmp
-/modules
-/proc
-/dev
-/dev/pts
diff --git a/rescue/drvinst b/rescue/drvinst
deleted file mode 100755
index 78c6f5c74..000000000
--- a/rescue/drvinst
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/perl
-#
-# Guillaume Cottenceau
-#
-# Copyright 2000-2005 Mandriva
-#
-# This software may be freely redistributed under the terms of the GNU
-# public license.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-use lib qw(../perl-install /usr/lib/libDrakX);
-use common;
-use detect_devices;
-
-$ARGV[0] =~ /^--?h/ and die "usage: drivers_install [drivertype1 [drivertype2 ...]]\n";
-my @types = @ARGV;
-
-sub install_module_raw {
- my ($driver, $o_descr) = @_;
- print STDERR "Installing driver $driver", $o_descr ? " (for \"$o_descr\")" : '', "\n";
- system("/sbin/modprobe", $driver) and print "\tfailed\n";
-}
-
-my $already_usb;
-sub install_module {
- my ($driver, $descr) = @_;
- install_module_raw($driver, $descr);
- if (!$already_usb && $driver =~ /usb/) {
- $already_usb = 1;
- install_module_raw('usbkbd');
- install_module_raw('keybdev');
- }
-}
-
-#- start
-foreach my $card (detect_devices::pci_probe()) {
- $card->{driver} eq 'unknown' || $card->{driver} =~ /:/ and next;
- $card->{media_type} eq "DISPLAY_VGA" and next;
-
- if (!@ARGV || find { $card->{media_type} =~ /$_/i } @types) {
- install_module($card->{driver}, $card->{description});
- }
-}
diff --git a/rescue/guessmounts b/rescue/guessmounts
deleted file mode 100755
index 3f3a4e208..000000000
--- a/rescue/guessmounts
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/perl
-#
-# Guillaume Cottenceau
-#
-# Copyright 2001-2005 Mandriva
-#
-# This software may be freely redistributed under the terms of the GNU
-# public license.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-use lib qw(../perl-install /usr/lib/libDrakX);
-use common;
-use fs;
-use fs::proc_partitions;
-
-
-my @proc_mounts = fs::read_fstab('', '/proc/mounts');
-
-my $target = '/mnt';
-
-if (fs::get::mntpoint2part($target, \@proc_mounts)) {
- print STDERR "$target is already mounted (according to /proc/mounts)\n";
- exit 0;
-}
-
-system('drvinst', 'STORAGE');
-
-print STDERR "\nPlease wait, trying to find your root device...\n";
-
-mkdir_p($target);
-
-my @fstab;
-my $root;
-
-foreach (fs::proc_partitions::read_raw()) {
- my $dev = devices::make($_->{dev});
-
- my $fs = find {
- system("mount -t $_ $dev $target 2>/dev/null") == 0;
- } fs::type::true_local_fs_types() or next;
-
- if (my $release_file = common::release_file($target)) {
- print STDERR "=> found a Mandriva Linux root partition on $dev\n=> type $fs, version `",
- chomp_(cat_("$target$release_file")), "'\n";
- @fstab = fs::read_fstab($target, '/etc/fstab');
- $root = $dev;
- last;
- } else {
- system('umount', $target) == 0 or die "error unmounting $target\n";
- }
-}
-
-if ($root) {
- print STDERR "\nMounting other partitions from fstab on $target...\n";
- foreach (@fstab) {
- my ($valued_options, $options) = fs::mount_options::unpack($_);
-
- next if
- !$_->{fs_type} || $_->{device} eq 'none'
- || $valued_options->{noauto} || $valued_options->{supermount}
- || $_->{mntpoint} eq '/'
- || member($_->{fs_type}, 'swap', 'nfs', 'ntfs');
-
- delete $valued_options->{'iocharset='};
- delete $valued_options->{'codepage='};
- fs::mount_options::pack($_, $valued_options, $options); #- vfat opts, we don't have the modules in rescue
-
- my $where = "$target$_->{mntpoint}";
- mkdir_p($where);
- print STDERR "\t$_->{device} on $where type $_->{fs_type} options $_->{options}\n";
- system("mount -t $_->{fs_type} /dev/$_->{device} $where -o $_->{options}");
- system("cp -f /etc/mtab $target/etc/mtab"); #- to allow a nice chrooted "mount" or "df"
- }
- print STDERR "\nYour system is ready on $target.\n\n";
-} else {
- die "Could not find your root device :-(.\n";
-}
-
diff --git a/rescue/install_bootloader b/rescue/install_bootloader
deleted file mode 100755
index 59248a016..000000000
--- a/rescue/install_bootloader
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/perl
-#
-# Guillaume Cottenceau
-#
-# Copyright 2001-2005 Mandriva
-#
-# This software may be freely redistributed under the terms of the GNU
-# public license.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-use lib qw(../perl-install /usr/lib/libDrakX);
-use common;
-use bootloader;
-use fs;
-
-$::prefix = '/mnt';
-
-my $release = common::mandrake_release($::prefix) ||
- do {
- system('guessmounts') == 0 or die 'guessmounts failed';
- common::mandrake_release($::prefix);
- };
-
-if ($release) {
- $release =~ /Mandrake|Mandriva/ or die "release file doesn't contain 'Mandriva', exiting.\n";
-} elsif (fs::get::mntpoint2part($::prefix, [ fs::read_fstab('', '/proc/mounts') ])) {
- die "unknown distribution mounted in $::prefix\n";
-} else {
- die "Your root device isn't mounted on $::prefix\n";
-}
-
-my @main_methods = bootloader::configured_main_methods();
-
-my $main_method;
-if (@main_methods == 0) {
- die "Cannot find a configured boot loader\n";
-} elsif (@main_methods == 1) {
- ($main_method) = @main_methods;
-} else {
- while (1) {
- print "Configuration files for Boot Loaders ", join(' and ', @main_methods), " were found.\n";
- print "Which one one should be installed? ";
- chomp($main_method = <STDIN>);
- if (member($main_method, @main_methods)) {
- last;
- } else {
- print "bad choice\n";
- }
- }
-}
-
-my $install = $bootloader::{'install_raw_' . $main_method} or die "unknown bootloader method install_raw_$main_method\n";
-
-print "About to re-install Boot Loader $main_method of following Mandriva Linux distribution:\n\t",
- $release,
- "\n=> ok? <press Enter to continue, 'n' and Enter to cancel> ";
-<STDIN> =~ /^n/i and exit 0;
-
-$install->();
diff --git a/rescue/list.xml b/rescue/list.xml
deleted file mode 100644
index bf1df52c4..000000000
--- a/rescue/list.xml
+++ /dev/null
@@ -1,234 +0,0 @@
-<list no-arch-libraries="on">
-
-<from expand="binary">
- bash sh
-
- false true
- pwd reset
-
- ls
- cp ln mkdir mknod mv rm rmdir
- chmod chown
- dd touch
-
- cat less
- tail head tee
- sort split cut
- grep
-
- cmp diff
- find
- file md5sum
-
- gzip <!-- zcat and gunzip are hardlinks, they are handled in aliases to make it more apparent -->
- bzip2 bunzip2 bzcat
-
- df du
-
- packdrake parsehdlist
- cpio ftp tar
- rsync
- ssh scp
- telnet
-
- date
- dmesg
- chroot
- sleep
- sync update
-
- eject
- mount umount
-
- ldconfig
- mingetty init
- reboot halt shutdown
- kill killall5 ps strace
-
- loadkeys tset
-
- ping hostname ifconfig route
-
- fdformat badblocks
- e2fsck fsck.ext2 fsck.ext3 mke2fs mkfs.ext2 resize2fs
- debugfs dumpe2fs tune2fs
- fsck.xfs xfs_repair
- resize_reiserfs reiserfsck
- mkswap swapoff swapon
- <if ARCH="i.86">
- fsck.jfs
- </if>
- <if ARCH="i.86|x86_64|ia64">
- ntfsresize
- mkdosfs
- </if>
- <if ARCH="ppc">
- hformat
- </if>
-
- <if-not ARCH="ppc">
- fdisk gpart sfdisk
- rescuept
- </if-not>
- <if ARCH="ppc">
- pdisk
- </if>
- dump dump.ext2 restore restore.ext2 dump.ext3 restore.ext3 dump.xfs restore.xfs
- parted partimage
-
- mdadm lvm2
- <if ARCH="i.86|x86_64|ia64">
- dmraid
- </if>
-
- lsmod-25
- insmod-25
- rmmod-25
-
- setserial
- mt stinit
-
- lspci lspcidrake
-
- rpm
- rpm2cpio rpmdb
- rpme rpmi rpmu rpmquery rpmverify
-
- vim-minimal hexedit
-
- perl
-
- <if ARCH="i.86|x86_64|ia64">
- dmidecode
- </if>
-
- <if ARCH="i.86|x86_64">
- grub grub-install
- </if>
- <if ARCH="ia64">
- efibootmgr
- </if>
- <if ARCH="ppc">
- ybin
- mkofboot ofpath
- nvsetenv
- </if>
- <if ARCH="sparc">
- silo
- </if>
-</from>
-
-<from>
- /usr/lib/kbd/keymaps/include
- <if ARCH="i.86|x86_64">
- /usr/lib/kbd/keymaps/i386/include
- /usr/lib/kbd/keymaps/i386/azerty/be-latin1.kmap.gz <!-- this one is needed by be2-latin1 -->
- </if>
- /usr/share/misc/file/magic
- /usr/share/terminfo/l/linux
- /usr/share/pci.ids
- /var/run/utmp
-
- <if ARCH="i.86|x86_64">
- /boot/grub/stage1
- /boot/grub/stage2
- /usr/lib/extipl/aldebaran.bin
- </if>
-
- <if ARCH="ppc">
- /usr/lib/yaboot/ofboot
- /usr/lib/yaboot/yaboot
- </if>
-
- <from expand="command">
- perl -Mkeyboard -I../perl-install -le 'print foreach keyboard::loadkeys_files()'
- </from>
-</from>
-
-<from dir="/usr/lib/rpm" expand="glob">
- <mode copy="keep-links">
- rpmrc
- macros
- rpmpopt-*
- rpmd rpme rpmi rpmu rpmq rpmv
- </mode>
-</from>
-
-<filter subst="/^__END__/ and $_ = '', close ARGV">
-<from expand="main-perl">
- AutoLoader.pm
- strict.pm
- vars.pm
- warnings/register.pm
- warnings.pm
- Carp.pm
- Exporter.pm
- ARCH-linux/CORE/libperl.so
- ARCH-linux/auto/POSIX/autosplit.ix
- ARCH-linux/auto/POSIX/load_imports.al
- ARCH-linux/auto/POSIX/POSIX.so
- ARCH-linux/POSIX.pm
- ARCH-linux/XSLoader.pm
-</from>
-
-<from expand="perl">
- packdrake.pm
- Packdrakeng.pm
-</from>
-</filter>
-
-<from dir="/etc">
- inputrc
- termcap
- protocols
- services
- ssh/ssh_config
-</from>
-
-<filter command="strip">
-<from dir="/LIB">
- libnss_files.so.2
- libnss_dns.so.2
- libresolv.so.2
- ld-linux*.so.2
-</from>
-</filter>
-
-<from dir="/usr/share/ldetect-lst" expand="glob">
- <filter command="gzip">
- *table
- </filter>
-</from>
-
-<from dir="../kernel/all.kernels/$(MAIN_KERNEL)">
- <to dir="/modules">
- modules.cz
- modules.dep
- </to>
-</from>
-
-<filter command="../tools/simplify-drakx-modules">
- <from dir="." expand="collect-perl-files ../perl-install /usr/lib/libDrakX">
- <to dir="/usr/bin">
- rescue-doc drvinst lsparts
- guessmounts install_bootloader
- <if ARCH="i.86|x86_64">
- restore_ms_boot
- </if>
- </to>
- <to dir="/usr/sbin">
- partimage_whole_disk
- </to>
- </from>
-</filter>
-
-<from dir="../mdk-stage1">
- <to dir="/usr/bin">
- rescue-gui
- </to>
- <to dir="/usr/sbin">
- dhcp-client
- </to>
-</from>
-
-</list>
diff --git a/rescue/lsparts b/rescue/lsparts
deleted file mode 100755
index 9f0fac925..000000000
--- a/rescue/lsparts
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/perl
-#
-# Main author Pascal Rigaux (pixel@mandriva.com)
-# Put together by Guillaume Cottenceau
-#
-# Copyright 1999-2005 Mandriva
-#
-# This software may be freely redistributed under the terms of the GNU
-# public license.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-#
-# Detects partition types using signatures
-#
-
-use lib qw(../perl-install /usr/lib/libDrakX);
-use common;
-use fs::type;
-use fs::proc_partitions;
-
-my $params = join '', @ARGV;
-my $verbose = $params =~ /-v/;
-
-$params =~ /-h/ and die "usage: lsparts [-v]\n";
-
-
-foreach (fs::proc_partitions::read_raw()) {
- if (my $err = $_->{size} <= 1 ?
- "Skipping <$_->{dev}> because too little blocks ($_->{size})" :
- $_->{dev} !~ /\d$/ ?
- "Skipping <$_->{dev}> because doesn't end with a number (e.g. seems to not be a partition)" :
- $_->{dev} =~ /^loop\d+$/ ?
- "Skipping <$_->{dev}>" :
- '') {
- print STDERR "$err\n" if $verbose;
- } else {
- $_->{device} = $_->{dev};
- if (my $type = fs::type::type_subpart_from_magic($_)) {
- printf "$_->{dev}: %6s, fs %s (%s)\n", formatXiB($_->{size} * 512), $type->{fs_type}, fs::type::part2type_name($type);
- }
- }
-}
diff --git a/rescue/make_partimage_save_rest_all b/rescue/make_partimage_save_rest_all
deleted file mode 100755
index 68abcb0d1..000000000
--- a/rescue/make_partimage_save_rest_all
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-
-[ $# -lt 1 ] && {
- echo "usage: make_partimage_save_rest_all <partimage special rpm> [<partimage dir> <data dirs>]" ;
- exit 1
-}
-
-rpm=$1 ; shift
-partimage_dir=$1 ; shift
-
-if [ -n "$partimage_dir" ]; then
- first_data_dir="$partimage_dir$1"
-
- [ -d "$first_data_dir" ] || {
- echo "can't find $first_data_dir"
- exit 1
- }
- [ -r "$first_data_dir/lst" ] || {
- echo "can't read $first_data_dir/*"
- exit 1
- }
-fi
-
-rm -rf .tmp
-mkdir -p .tmp/isolinux
-cp -f /usr/lib/syslinux/isolinux.bin ../isolinux/alt0/* .tmp/isolinux
-
-PARTIMAGE_DIR="$@" PARTIMAGE_RPM=$rpm DISTRIB_DESCR="partimage save/restore all" ./make_rescue_img || exit 1
-mkdir -p .tmp/install/stage2
-mv -f rescue.clp .tmp/install/stage2
-
-common_para="rescue acpi=ht automatic=method:cdrom"
-# hda=4864,255,63
-
-for action in save_all rest_all; do
-
- cat <<EOF > .tmp/isolinux/isolinux.cfg
-default $action
-prompt 1
-timeout 150
-
-label save_all
- kernel vmlinuz
- append initrd=all.rdz $common_para save_all
-label rest_all
- kernel vmlinuz
- append initrd=all.rdz $common_para rest_all keepmounted
-label rescue
- kernel vmlinuz
- append initrd=all.rdz $common_para
-EOF
-
- if [ $action = rest_all -a -n "$partimage_dir" ]; then
- for i in $*; do
- dir=`dirname $i`
- mkdir -p .tmp$dir
- ln -s $partimage_dir$i .tmp$dir
- done
- fi
-
- mkisofs -f -o part_$action.iso -r -J -hide-rr-moved -nobak -cache-inodes -publisher Mandrakesoft -V 'mdk part save/rest' -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .tmp
- mkcd --addmd5 part_$action.iso
-done
-
-rm -rf .tmp
diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img
deleted file mode 100755
index 174dbb8bc..000000000
--- a/rescue/make_rescue_img
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/usr/bin/perl
-
-use MDK::Common;
-use lib "../perl-install";
-use keyboard;
-
-my $lib = (arch() =~ /x86_64/ ? "lib64" : "lib");
-my $tmp = "/tmp/rescue_tmp";
-my $rescue = "rescue.clp";
-
-my $sudo = '';
-if ($>) {
- $sudo = "sudo";
- $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
-}
-
-BEGIN { undef *_ }
-sub __ { print @_, "\n"; system(@_) }
-sub _ { __ @_; $? and die }
-
-sub installown($$) {
- my ($own, $dir) = @_;
- return if -e "$tmp$dir/" . basename($own);
- mkdir_p("$tmp$dir");
- _ "cp -rL $own $tmp$dir";
-}
-
-sub install_perl_script {
- my ($script, $dir) = @_;
- my @gi_modules;
- foreach (`../tools/get-needed-drakx-modules ../perl-install /usr/lib/libDrakX $script`) {
- chomp;
- my ($local, $dest) = split "\t";
- installown($local, dirname($dest || $local));
- push @gi_modules, "$tmp$dest" if $dest;
- }
- installown($script, $dir);
- system('../tools/simplify-drakx-modules', @gi_modules, "$tmp$dir/$script");
-}
-
-_ "$sudo rm -rf $tmp" if -e $tmp;
-_ "mkdir $tmp";
-_ 'find . -name "*~" | xargs rm -f';
-mkdir_p($tmp . chomp_($_)) foreach cat_("dirs");
-_ "cp -a tree/* $tmp";
-_ "find $tmp -name 'CVS*' | xargs rm -rf";
-_ "perl devices.pl $tmp/dev";
-substInFile { s/DISTRIB_DESCR/$ENV{DISTRIB_DESCR}/ } "$tmp/etc/issue";
-
-{
- _ "cd ../mdk-stage1 && make rescue-gui dhcp-client";
- -e "../kernel/all.kernels" or die "use ./update_kernel in gi/kernel first\n";
-
- $ENV{MAIN_KERNEL} = chomp_(`cat ../kernel/RPMS/.main`);
-
- _ "../tools/install-xml-file-list list.xml $tmp";
-}
-
-my %keytable_conflicts;
-my @less_important_keytables = qw(am_old am_phonetic no-dvorak fr_CH-latin1);
-foreach (keyboard::loadkeys_files()) {
- my ($dir, $fname) = (dirname($_), basename($_));
- my ($name) = $fname =~ /(.*)\.kmap\.gz/ or next;
- next if member($name, @less_important_keytables);
- if (my ($short) = $name =~ m|(.+?)[\W_]|) {
- $keytable_conflicts{$short} and warn("conflict between $keytable_conflicts{$short} and $name for short name $short (choosing the first)\n"), next;
- $keytable_conflicts{$short} = $name;
- # create the short name based on the long one
- symlinkf($fname, "$tmp$dir/$short.kmap.gz");
- }
-}
-
-foreach (cat_("aliases")) {
- chomp; my ($f, $dest) = split;
- symlink $dest, "$tmp$f";
-}
-
-if ($ENV{PARTIMAGE_RPM}) {
-
- _ "rpm2cpio $ENV{PARTIMAGE_RPM} | (cd $tmp ; cpio -idu ./usr/sbin/partimage)";
- my $server = 'partimaged';
- $server = 'leia';
-
- my $default_dir = '/data/box';
- my $partimage_dir = $ENV{PARTIMAGE_DIR} || $default_dir;
- my @local_dirs = map { "/tmp/image$_" } split(' ', $partimage_dir);
- my $local_dir = $local_dirs[0];
- my $local_dirs = join(' ', @local_dirs);
-
- substInFile {
- $_ = <<EOF if /^\s*rescue-gui/;
- if grep -q save_all /proc/cmdline; then
- drvinst NETWORK ; dhcp-client ; partimage_whole_disk -s $server save_all $default_dir
- echo "Press enter"
- read
- fi
- if grep -q rest_all /proc/cmdline; then
- if [ -d $local_dir ]; then
- partimage_whole_disk rest_all $local_dirs
- else
- drvinst NETWORK ; dhcp-client ; partimage_whole_disk -s $server rest_all $partimage_dir
- fi
- echo "Press enter"
- read
- fi
-EOF
- } "$tmp/etc/rc.sysinit";
-}
-
-_ "$sudo chown root.root -R $tmp/*";
-
-exit 0 if $ARGV[0];
-
-_ "mkisofs -quiet -D -R $tmp | create_compressed_fs - 65536 $rescue 200 2>/dev/null";
-#_ "$sudo rm -rf $tmp";
diff --git a/rescue/partimage_whole_disk b/rescue/partimage_whole_disk
deleted file mode 100755
index a35c374ca..000000000
--- a/rescue/partimage_whole_disk
+++ /dev/null
@@ -1,248 +0,0 @@
-#!/usr/bin/perl
-
-use lib qw(/usr/lib/libDrakX ../perl-install);
-use standalone;
-use fsedit;
-use fs::format;
-use fs::type;
-use resize_fat::main;
-use diskdrake::resize_ntfs;
-use diskdrake::resize_ext2;
-use common;
-use partition_table::empty;
-use Carp::Heavy;
-
-#- help getting the file in make_rescue_img
-BEGIN { partition_table::raw::default_type() }
-
-my ($server);
-if ($ARGV[0] eq '-s') {
- (undef, $server, @ARGV) = @ARGV;
-}
-my $action = shift @ARGV;
-
-sub usage() { die "partimage_whole_disk [-s <server>] (save_all <dir> | rest_all <dirs>)\n" }
-
-$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
-$ENV{HOME} = '/';
-log::openLog("/var/log/partimage_whole_disk.log");
-my @partimage_cmd = ('partimage', if_($server, '-s', $server));
-my $all_hds = fsedit::get_hds({});
-
-if ($action eq 'save_all') {
- @ARGV == 1 or usage();
- save_all($ARGV[0]);
-} elsif ($action eq 'rest_all') {
- @ARGV or usage();
- rest_all(@ARGV);
-} else {
- usage();
-}
-
-sub save_all {
- my ($dir) = @_;
-
- my $base_dir = $dir;
- for (my $i = 0; read_part_list($dir); $i++) {
- #- find a free dir
- $dir = sprintf("$base_dir.%03d", $i);
- }
-
- my $hd = $all_hds->{hds}[0] or die "no main hard drive\n";
- log::l("save_all on $hd->{device}");
- my $part_list = [ partition_table::get_normal_parts($hd) ];
-
- foreach (@$part_list) {
- $_->{saved} = !member($_->{fs_type}, 'ntfs', 'vfat', 'swap');
- }
-
- #- shrink and don't save the last ext3 partition (which is the /home partition)
- if (my $part = find { isTrueLocalFS($_) } reverse @$part_list) {
- $part->{size} = min($part->{size}, 1024 * 1024 * 2); # not greater than 1GB
- $part->{saved} = 0;
- }
-
- foreach (grep { $_->{saved} } @$part_list) {
- run_or_die(@partimage_cmd,
- '-V', 0, '--nombr', '--nodesc', '--nocheck', '-b', '-o',
- 'save', devices::make($_->{device}), "$dir/$_->{device}");
- }
- save_part_list($dir, $hd->{geom}, $part_list);
-}
-sub rest_all {
- my (@dirs) = @_;
-
- my %best;
- DIRS: foreach (@dirs) {
- my ($forced_geom, $part_list) = read_part_list($_) or log::l("read_part_list $_ failed"), next;
- my %h = (dir => $_, forced_geom => $forced_geom, part_list => $part_list);
- log::l("trying with $h{dir}");
-
- ($h{hd}) = my @used_hds = uniq(map {
- my $part = $_;
- find { $part->{device} =~ /^\Q$_->{device}\E./ } fs::get::hds($all_hds)
- or log::l("can't find hard drive for partition $part->{device}"), next DIRS;
- } @$part_list);
-
- @used_hds >= 1 or log::l("no matching hd"), next;
- @used_hds <= 1 or log::l("multiple hds: " . join(' ', map { $_->{device} } @used_hds)), next;
-
- fs::type::set_fs_type($_, $_->{fs_type}) foreach @$part_list;
- put_in_hash($_, partition_table::hd2minimal_part($h{hd})) foreach @$part_list;
-
- ($h{from_partimage}, my $other) = partition { $_->{saved} } @$part_list;
- ($h{from_resize}, $h{created}) = partition { member($_->{fs_type}, 'vfat', 'ntfs') } @$other;
-
- $h{valid_resize} = every {
- my $part = fs::get::device2part($_->{device}, [ fs::get::fstab($all_hds) ]) or log::l("partition to resize is missing ($_->{device})");
- my $ok = $part && $part->{fs_type} eq $_->{fs_type};
- $ok or log::l("partition $_->{device} doesn't have the right filesystem ($part->{fs_type} != $_->{fs_type})");
- $ok;
- } @{$h{from_resize}};
-
- $h{total} = sum(map { $_->{size} } @$part_list);
- if ($h{total} > $h{hd}{totalsectors}) {
- log::l("discarding $h{dir} since total $h{total} > $h{hd}{totalsectors}");
- } elsif ($h{valid_resize} < $best{valid_resize}) {
- log::l("discarding $h{dir} since it has invalid resize whereas $best{dir} has valid resize");
- } elsif ($h{total} > $best{total}) {
- log::l("$h{dir} is better than $best{dir} since total $h{total} > $best{total}");
- %best = %h;
- } else {
- log::l("$h{dir} is not better than $best{dir} since total $h{total} <= $best{total}");
- }
- }
-
- $best{dir} or die "no valid partimage data dirs\n";
- my %h = %best;
- log::l("chosen dir $h{dir}");
-
- foreach (@{$h{from_resize}}) {
- #- resize first
- my $part = fs::get::device2part($_->{device}, [ fs::get::fstab($all_hds) ]);
- if (!$part) {
- log::l("partition to resize is missing ($_->{device})");
- $_->{missing} = 1;
- next;
- }
- if ($part->{fs_type} ne $_->{fs_type}) {
- log::l("partition $_->{device} doesn't have the right filesystem ($part->{fs_type} != $_->{fs_type})");
- $_->{missing} = 1;
- next;
- }
-
- if (@{$h{from_resize}} == 1) {
- my $half_size = int($h{hd}{totalsectors} / 2) - 2 * $h{hd}->cylinder_size;
- my $suggested_total = $h{total} - $_->{size} + $half_size;
- log::l("resizing bigger? (size $_->{size}, half_size $half_size, total $h{total}, suggested_total $suggested_total)");
- if ($half_size > $_->{size} && $suggested_total < $h{hd}{totalsectors}) {
- log::l("prefering to resize $_->{device} to size $half_size instead of $_->{size}");
- $_->{size} = $half_size;
- }
- }
-
- $_->{start} = $part->{start};
- if ($_->{size} < $part->{size}) {
- log::l("resizing $_->{device} to $_->{size} (it is $part->{size})");
- my $resize_pkg = $_->{fs_type} eq 'vfat' ? 'resize_fat::main' : 'diskdrake::resize_ntfs';
- my $resize = $resize_pkg->new($_->{device}, devices::make($_->{device}));
- $resize->resize($_->{size});
- } else {
- log::l("no need to resize, instead setting $_->{device}'s size to $part->{size} instead of $_->{size}");
- $_->{size} = $part->{size};
- }
- }
-
- my $hd = $h{hd};
- put_in_hash($hd->{geom}, $h{forced_geom});
- log::l("totalsectors $hd->{totalsectors} heads $hd->{geom}{heads} sectors $hd->{geom}{sectors}");
- partition_table::raw::compute_nb_cylinders($hd->{geom}, $hd->{totalsectors});
-
- #- grow the last ext3 partition
- if (my $part = find { isTrueLocalFS($_) } reverse @{$h{part_list}}) {
- $part->{ratio} = 1;
- }
-
- #- write the partition table
- partition_table::raw::zero_MBR($hd);
- foreach my $part (grep { $_->{rootDevice} eq $hd->{device} } @{$h{part_list}}) {
- next if $part->{missing};
-
- my $hole = find { isEmpty($_) && $_->{size} >= $part->{size} } partition_table::get_normal_parts_and_holes($hd) or die "not enough room for $part->{device}";
- $part->{start} = $hole->{start};
-
- log::l("handling $part->{device}");
- my $extended = $part->{device} =~ /(\d+)$/ && $1 > 4 && $hd->hasExtended;
-
- my %wanted_part = %$part;
- if ($part->{ratio}) {
- $part->{size} = $hole->{size};
- } else {
- $part->{size} += $hd->{geom}{sectors} if $extended;
- $part->{size} += $hd->cylinder_size if $part->{start} == 1;
- }
- log::l("adding $part->{device} with size $part->{size}");
- partition_table::add($hd, $part, $extended && 'Extended');
- foreach ('device', if_(!$part->{ratio}, 'size')) {
- $part->{$_} eq $wanted_part{$_} or log::l("bad $_ for $part->{device}: $part->{$_} != $wanted_part{$_}");
- }
- }
- partition_table::write($hd);
-
- #- restore from partimage
- foreach (@{$h{from_partimage}}) {
- run_or_die(@partimage_cmd, 'restore', '-b', devices::make($_->{device}), "$h{dir}/$_->{device}");
-
- if ($_->{ratio}) {
- my $resize = diskdrake::resize_ext2->new($_->{device}, devices::make($_->{device}));
- $resize->resize($_->{size});
- }
- }
-
- foreach (@{$h{created}}) {
- fs::format::part_raw($_, undef);
- }
-
- run_program::run('guessmounts');
-
- if (my @missing = grep { $_->{missing} } @{$h{part_list}}) {
- my $missing = join('|', map { quotemeta($_->{device}) } @missing);
- log::l("drop missing devices from fstab and lilo.conf: $missing");
- $::prefix = '/mnt';
- substInFile { $_ = '' if m!^/dev/($missing)\s! } "$::prefix/etc/fstab";
-
- my $match;
- substInFile {
- /^\S/ and $match = m!^other=/dev/($missing)$!;
- $_ = '' if $match;
- } "$::prefix/etc/lilo.conf";
- }
-
- run_program::run('install_bootloader');
-}
-
-sub lst_fields() { qw(device size fs_type saved) }
-sub save_part_list {
- my ($dir, $geom, $part_list) = @_;
- my @l = map { join(' ', @$_{lst_fields()}) } @$part_list;
- log::l("save_part_list $dir: $_") foreach @l;
- my $partimage = join(' ', @partimage_cmd);
- open(my $F, "| $partimage -z0 -Bfoo=bar -o save_file $dir/lst");
- print $F join("/", $geom->{heads}, $geom->{sectors}), "\n";
- print $F "$_\n" foreach @l;
-}
-sub read_part_list {
- my ($dir) = @_;
- my $partimage = join(' ', @partimage_cmd);
- open(my $F, "$partimage -z0 -Bfoo=bar rest_file $dir/lst |");
- my $geom_string = <$F> or return;
- my %geom; @geom{'heads', 'sectors'} = split('/', chomp_($geom_string));
- my @l = chomp_(cat__($F));
- log::l("read_part_list $dir: $_") foreach @l;
- \%geom, [ map { my %l; @l{lst_fields()} = split; \%l } @l ];
-}
-
-sub run_or_die {
- my (@l) = @_;
- run_program::raw({ timeout => 4 * 60 * 60 }, @l) or die join(' ', @l) . " failed\n";
-}
diff --git a/rescue/rescue-doc b/rescue/rescue-doc
deleted file mode 100755
index fa03d1be3..000000000
--- a/rescue/rescue-doc
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/perl
-
-sub output { my $f = shift; local *F; open F, ">$f" or die "output in file $f failed: $!\n"; print F foreach @_; }
-
-output('/tmp/rescue-doc-contents', q(
- Information regarding problems not directly addressed
- by this rescue.
-
-
-Are you certain "rescue mode" is the best tool for your specific
-problem?
-
-The rescue system on this CD is a very basic text-based
-environment for rescuing systems that no longer boot. You will
-not find an easy-to-use graphical environment in this rescue
-system, nor the Mandriva detection/configuration libraries.
-
-
-The vast majority of problems that can affect a Linux system are
-much easier to repair on a running system than by booting into
-"rescue mode". In fact, there are very few problems which aren't
-easier to resolve in the comfortable environment of a fully
-installed Mandriva Linux system than in this spartan "rescue
-system" shell. Some of the most common problems include:
-
-- bad or missing X (video display) configuration
-- adding/removing/reconfiguring hardware
-- repairing problems caused by installing third-party software
- with the "--force" and "--nodeps" options
-
-The general rule of thumb is: "If you can boot into the Linux
-system without using rescue mode or this CD, there is no real
-reason to use the rescue CD".
-
-
-However, if you can no longer boot into the system, the rescue
-system is the right tool. Some common examples include:
-
-- If you previously changed some parameters in the /etc/fstab and
- the system will no longer boot, fix the offending line while in
- rescue mode, then try to boot normally into your system.
-
-- If the problem cannot be completely resolved in rescue mode
- (for example, if you need to reconfigure the video display),
- just modify what's necessary to boot into a running system,
- then complete the fix from there.
-
-In case you have found a new problem which should be handled by
-"rescue mode" but currently isn't, please report it to
-<pixel@mandriva.com>.
-
-For more information on troubleshooting a Mandriva Linux system,
-please consult the official manuals, the documentation on
-MandrivaLinux.com, MandrivaClub.org, or the MandrivaExpert.com support forum.
-
-<press 'q' (qwerty keyboard) to continue>
-));
-
-exec 'less /tmp/rescue-doc-contents';
-
diff --git a/rescue/restore_ms_boot b/rescue/restore_ms_boot
deleted file mode 100755
index b31fd112e..000000000
--- a/rescue/restore_ms_boot
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/perl
-#
-# Guillaume Cottenceau, Pixel
-#
-# Copyright 2002-2005 Mandriva
-#
-# This software may be freely redistributed under the terms of the GNU
-# public license.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-use lib qw(../perl-install /usr/lib/libDrakX);
-use common;
-use bootloader;
-use fs;
-use fs::proc_partitions;
-
-
-my @choices = map {
- my $type = typeFromMagic(devices::make($_->{dev}));
- if_($type && member($type, bootloader::main_method_choices()) , [ $_->{dev}, $type ]);
-} fs::proc_partitions::read_raw();
-
-my $choice;
-
-if (!@choices) {
- print "No known Linux bootloader has been found, nothing to do.\n";
-} elsif (@choices == 1) {
- print "I've found a Linux bootloader only on <$choices[0][0]>.\n\n";
- $choice = $choices[0];
-} else {
- print "I've found the following Linux bootloaders:\n",
- (map_index { "\t" . $::i . ": <$_->[1]> \ton <$_->[0]>\n" } @choices),
- "\n",
- "Which disk/partition do you want to overwrite with the Windows bootloader?\n",
- "\t<enter the number or press 'n' and Enter to cancel> ";
- if (<STDIN> =~ /^(\d+)$/i && $1 >= 1) {
- $choice = $choices[$1 - 1];
- }
-}
-
-if ($choice) {
- print "I'm going to overwrite bootloader on <$choice->[0]> with
-Windows bootloader.
-
-Ok? <press Enter to continue, 'n' and Enter to cancel> ";
- <STDIN> =~ /^n/i and exit 0;
-
- system('dd', 'if=/usr/lib/extipl/aldebaran.bin', "of=/dev/$choice->[0]") == 0
- or print "\tFailed!\n";
-}
-
-#-------------------------------------------------
-#- $Log$
-#- Revision 1.5 2005/06/13 04:33:50 prigaux
-#- move functions using /proc/partitions out of fsedit to fs::proc_partitions
-#-
-#- Revision 1.4 2005/05/19 08:59:54 prigaux
-#- rewrite using DrakX modules
-#-
-#- Revision 1.3 2005/04/19 12:49:39 prigaux
-#- update copyright
-#-
-#- Revision 1.2 2004/07/20 02:42:12 prigaux
-#- MandrakeSoft -> Mandrakesoft
-#-
-#- Revision 1.1 2002/02/27 13:31:30 gc
-#- add "restore Windows Boot Loader" to rescue
-#-
-#-
diff --git a/rescue/tree/bin/insmod b/rescue/tree/bin/insmod
deleted file mode 100755
index 49b298142..000000000
--- a/rescue/tree/bin/insmod
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-echo "Use modprobe instead"
diff --git a/rescue/tree/bin/login b/rescue/tree/bin/login
deleted file mode 100755
index 4b2816926..000000000
--- a/rescue/tree/bin/login
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /bin/bash --login
diff --git a/rescue/tree/etc/fstab b/rescue/tree/etc/fstab
deleted file mode 100644
index fbafb7801..000000000
--- a/rescue/tree/etc/fstab
+++ /dev/null
@@ -1,4 +0,0 @@
-/dev/ram3 / ext2 defaults 1 1
-/dev/fd0 /mnt/floppy auto defaults,noauto 0 0
-none /proc proc defaults,noauto,ro 0 0
-/dev/cdrom /mnt/cdrom auto defaults,noauto 0 0
diff --git a/rescue/tree/etc/group b/rescue/tree/etc/group
deleted file mode 100644
index 5ba713c83..000000000
--- a/rescue/tree/etc/group
+++ /dev/null
@@ -1 +0,0 @@
-root::0:root
diff --git a/rescue/tree/etc/host.conf b/rescue/tree/etc/host.conf
deleted file mode 100644
index 1a8c1e151..000000000
--- a/rescue/tree/etc/host.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-order hosts,bind
-multi on
diff --git a/rescue/tree/etc/hosts b/rescue/tree/etc/hosts
deleted file mode 100644
index a9bbdee7f..000000000
--- a/rescue/tree/etc/hosts
+++ /dev/null
@@ -1 +0,0 @@
-127.0.0.1 mandrake-rescue
diff --git a/rescue/tree/etc/inittab b/rescue/tree/etc/inittab
deleted file mode 100644
index 771d7c0d4..000000000
--- a/rescue/tree/etc/inittab
+++ /dev/null
@@ -1,14 +0,0 @@
-#Inittab for Mandrake Rescue Disk
-#Author: Daouda Lo <daouda@mandrakesoft.com>
-id:3:initdefault:
-
-si::sysinit:/etc/rc.sysinit
-re:6:wait:/etc/rc.reboot
-ca:12345:ctrlaltdel:/sbin/fakeshutdown
-
-1:12345:respawn:/sbin/mingetty --autologin root tty1
-2:23:respawn:/sbin/mingetty tty2
-3:23:respawn:/sbin/mingetty tty3
-4:23:respawn:/sbin/mingetty tty4
-5:23:respawn:/sbin/mingetty tty5
-6:23:respawn:/sbin/mingetty tty6
diff --git a/rescue/tree/etc/issue b/rescue/tree/etc/issue
deleted file mode 100644
index f4799bad2..000000000
--- a/rescue/tree/etc/issue
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-   
-           
-              
-              
-            
-  `----'         
-       
-     
-     [2[1;37;4
-     
-    
-    Mandrakelinux Rescue Disk
-     
-     
-    
-      
-
-
-DISTRIB_DESCR
-
-Use loadkeys to change your keyboard layout (eg: loadkeys fr)
-Use modprobe to load modules (eg: modprobe snd-card-fm801)
-Use drvinst to install drivers according to detected devices
-Use lsparts to list your partitions with types
-Use rescue-gui to go back to the rescue menu
-
diff --git a/rescue/tree/etc/passwd b/rescue/tree/etc/passwd
deleted file mode 100644
index 568451e4e..000000000
--- a/rescue/tree/etc/passwd
+++ /dev/null
@@ -1,3 +0,0 @@
-root::0:0::/:/bin/bash
-shutdown:*:6:0:shutdown:/sbin:/sbin/shutdown
-halt:*:7:0:halt:/sbin:/sbin/halt
diff --git a/rescue/tree/etc/profile b/rescue/tree/etc/profile
deleted file mode 100644
index 3b5ac21cc..000000000
--- a/rescue/tree/etc/profile
+++ /dev/null
@@ -1,24 +0,0 @@
-# /etc/profile
-# (c) Mandrakesoft, Chmouel Boudjnah <chmouel@mandrakesoft.com>
-
-# System wide environment and startup programs
-# Functions and aliases go in /etc/bashrc
-
-PROFILE_LOADED=1
-
-export PATH=/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11R6/bin
-
-PS1="[root@rescue \w]\\$ "
-ls () { /bin/ls --color=auto -F "$@";}
-ll () { /bin/ls --color=auto -Fl "$@";}
-d () { /bin/ls --color=auto -F "$@";}
-s () { cd .. ;}
-which () { type -p "$@" ;}
-HOSTNAME=rescue
-HISTSIZE=1000
-HISTFILESIZE=1000
-
-INPUTRC=/etc/inputrc
-export PATH PS1 USER HOSTNAME HISTSIZE HISTFILESIZE INPUTRC
-
-cat /etc/issue
diff --git a/rescue/tree/etc/rc.reboot b/rescue/tree/etc/rc.reboot
deleted file mode 100755
index 0b67416f1..000000000
--- a/rescue/tree/etc/rc.reboot
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-sleep 1
-/sbin/killall5 -9
-
-umount -a -f -t noproc
-
-reboot -i -d
diff --git a/rescue/tree/etc/rc.sysinit b/rescue/tree/etc/rc.sysinit
deleted file mode 100755
index e228c91ba..000000000
--- a/rescue/tree/etc/rc.sysinit
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-
-action() { echo $1; shift; $*; }
-
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin
-
-echo -e "\t\t\tWelcome to \\033[1;36mMandrake\\033[0;39m Linux"
-
-action "Remounting root filesystem in read-write mode" mount -n -o remount,rw /
-
-ln -s /tmp/stage2/etc/* /etc 2>/dev/null
-
-rm -f /dev ; cp -a /tmp/stage2/dev /dev
-
-mkdir /mnt /var/log
-
-mkdir /proc
-action "Mounting proc filesystem" mount -n -t proc /proc /proc
-
-if grep -q sysfs /proc/filesystems; then
- mkdir /sys
- action "Mounting sysfs on /sys" mount -t sysfs none /sys
-fi
-
->/etc/mtab
-mount -f /
-mount -f /proc
-
-#- free up stage1 memory
-umount /stage1/proc/bus/usb /stage1/proc /stage1
-
-# Set the hostname.
-action "Setting hostname rescue" hostname rescue
-echo rescue > /etc/HOSTNAME
-
-# Loads common modules ( no kerneld :( )
-echo "Loading additional modules..."
-load() { modprobe $* 2>/dev/null; }
-load ide-mod
-load ide-probe
-load ide-disk
-load ide-cd
-load floppy
-load af_packet
-load isofs
-load vfat
-load ext3
-load reiserfs
-load xfs
-load jfs
-load loop
-load sd_mod
-load sr_mod
-
-/sbin/ifconfig lo 127.0.0.1 netmask 255.0.0.0
-/sbin/route add 127.0.0.1 lo
-
-grep -q noauto /proc/cmdline || drvinst SERIAL_USB
-
-if ! grep -q expert /proc/cmdline; then
- rescue-gui
-fi
diff --git a/rescue/tree/etc/resolv.conf b/rescue/tree/etc/resolv.conf
deleted file mode 100644
index 3822939b1..000000000
--- a/rescue/tree/etc/resolv.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-search foo.com
-nameserver 192.168.1.1
diff --git a/rescue/tree/sbin/fakeshutdown b/rescue/tree/sbin/fakeshutdown
deleted file mode 100755
index 3511020ff..000000000
--- a/rescue/tree/sbin/fakeshutdown
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/perl
-
-#
-# Guillaume Cottenceau (gc@mandrakesoft.com)
-#
-# Copyright 2001 Mandrakesoft
-#
-# This software may be freely redistributed under the terms of the GNU
-# public license.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-sub cat_ { local *F; open F, $_[0] or $_[1] ? die "cat of file $_[0] failed: $!\n" : return; my @l = <F>; wantarray ? @l : join '', @l }
-
-print "\n";
-
-
-#- try to umount as much as possible; uses Pixel's ultra optimized algo (let you guess how it works..)
-print "Umounting:\n";
-my @mounts = cat_('/proc/mounts');
-my $something_moved;
-do {
- $something_moved = 0;
- foreach (@mounts) {
- my $where = (split)[1];
- next if $where eq '/'; #- ouch! umounting the ramdisk on / always succeeds, and makes it becoming ro :-(
- if (!system("umount $where 2>/dev/null")) {
- print "\t$where\n";
- $something_moved++;
- }
- }
-} while $something_moved;
-
-
-#- shutdown with init
-exec '/sbin/init', 6;
diff --git a/rescue/tree/sbin/modprobe b/rescue/tree/sbin/modprobe
deleted file mode 100755
index 774101d7c..000000000
--- a/rescue/tree/sbin/modprobe
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/perl
-
-sub cat_ { local *F; open F, $_[0] or $_[1] ? die "cat of file $_[0] failed: $!\n" : return; my @l = <F>; wantarray ? @l : join '', @l }
-
-sub read_already_loaded() {
- foreach (cat_("/proc/modules")) {
- my ($name) = split;
- $conf{$name}{loaded} = 1;
- }
-}
-
-sub load_deps($) {
- my ($file) = @_;
-
- local *F;
- open F, $file or log::l("error opening $file: $!"), return 0;
- foreach (<F>) {
- my ($f, $deps) = split ':';
- push @{$deps{$f}}, split ' ', $deps;
- }
-}
-
-my $module_extension = cat_('/proc/version') =~ /^Linux version 2.4/ ? '.o' : '.ko';
-
-my %mappings = ("usb-ohci" => "ohci-hcd",
- "usb-uhci" => "uhci-hcd",
- "uhci" => "uhci-hcd",
- "printer" => "usblp",
- "bcm4400" => "b44",
- "3c559" => "3c359",
- "3c90x" => "3c59x",
- "dc395x_trm" => "dc395x",
- "audigy" => "snd-emu10k1");
-
-sub load {
- my ($name, @options) = @_;
- $name =~ s/\.k?o$//;
-
- $name = $mappings{$name} || $name; #- 2.4 -> 2.6 compat mappings
-
- $conf{$name}{loaded} and return;
- eval { load($_, 'prereq') } foreach @{$deps{$name}};
-
- system("packdrake -x /modules/modules.cz* /tmp $name$module_extension");
- -r "/tmp/$name$module_extension" or die "can't find module $name\n";
- system("/sbin/insmod /tmp/$name$module_extension");
- my $retval = $?;
- system("rm /tmp/$name$module_extension");
- $retval and die("insmod $name failed");
-}
-
-!@ARGV || $ARGV[0] =~ /-h/ and die "usage: modprobe <module> [<options...>]\n";
-
-read_already_loaded();
-load_deps("/modules/modules.dep");
-load(@ARGV);
diff --git a/rescue/tree/usr/lib/CVS. b/rescue/tree/usr/lib/CVS.
deleted file mode 100644
index e69de29bb..000000000
--- a/rescue/tree/usr/lib/CVS.
+++ /dev/null
diff --git a/rescue/tree/usr/share/symlinks b/rescue/tree/usr/share/symlinks
deleted file mode 100644
index 1c34ff204..000000000
--- a/rescue/tree/usr/share/symlinks
+++ /dev/null
@@ -1,11 +0,0 @@
-/bin
-/boot
-/dev
-/etc/fstab
-/etc/inittab
-/etc/rc.sysinit
-/lib
-/lib64
-/modules
-/sbin
-/usr