diff options
author | Erwan Velu <erwan@mandriva.org> | 2002-11-07 15:10:52 +0000 |
---|---|---|
committer | Erwan Velu <erwan@mandriva.org> | 2002-11-07 15:10:52 +0000 |
commit | 5c5aa9de2d18603c5eb3f2bc89ed9235f2dcab73 (patch) | |
tree | 2ca26feb23e1199e3d7e6d1aafbaefb76d982895 /rescue | |
parent | 5dc084d3b0bdf14919d5ad0b9f51e0626c8185d0 (diff) | |
download | drakx-5c5aa9de2d18603c5eb3f2bc89ed9235f2dcab73.tar drakx-5c5aa9de2d18603c5eb3f2bc89ed9235f2dcab73.tar.gz drakx-5c5aa9de2d18603c5eb3f2bc89ed9235f2dcab73.tar.bz2 drakx-5c5aa9de2d18603c5eb3f2bc89ed9235f2dcab73.tar.xz drakx-5c5aa9de2d18603c5eb3f2bc89ed9235f2dcab73.zip |
SCSI support now activated
Diffstat (limited to 'rescue')
-rw-r--r-- | rescue/list | 7 | ||||
-rw-r--r-- | rescue/list.i386 | 4 | ||||
-rw-r--r-- | rescue/tree/ka/gen_modules_conf.pl | 8 | ||||
-rwxr-xr-x | rescue/tree/ka/install.sh | 23 | ||||
-rwxr-xr-x | rescue/tree/ka/make_initrd | 64 | ||||
-rwxr-xr-x | rescue/tree/ka/setup_network.sh | 5 |
6 files changed, 81 insertions, 30 deletions
diff --git a/rescue/list b/rescue/list index cac8181df..90d966f2a 100644 --- a/rescue/list +++ b/rescue/list @@ -3,6 +3,7 @@ /bin/chmod /bin/chown /bin/cp +/bin/cut /bin/date /bin/dd /bin/df @@ -33,6 +34,7 @@ /bin/rm /bin/rmdir /bin/setserial +/bin/sed /sbin/lsmod /bin/cpio /usr/bin/diff @@ -79,15 +81,20 @@ /usr/bin/ftp /usr/bin/head /usr/bin/hexedit +/usr/bin/host /usr/bin/less /usr/bin/less.bin /usr/bin/loadkeys /usr/bin/reset /usr/bin/split +/usr/bin/strings /usr/bin/tail /usr/bin/tee +/usr/bin/test /usr/bin/telnet +/usr/bin/tr /usr/bin/tset +/usr/bin/wc /usr/sbin/chroot /usr/sbin/parted /usr/share/magic diff --git a/rescue/list.i386 b/rescue/list.i386 index 25ce3f542..52fbf3bf7 100644 --- a/rescue/list.i386 +++ b/rescue/list.i386 @@ -11,3 +11,7 @@ /boot/grub/stage[12] /usr/lib/perl5/PERL_VERSION/i386-linux-thread-multi/CORE/libperl.so /usr/lib/extipl/aldebaran.bin +/lib/libuuid.so.1 +/sbin/mkfs.jfs +/sbin/mkfs.xfs +/sbin/mkfs.reiserfs diff --git a/rescue/tree/ka/gen_modules_conf.pl b/rescue/tree/ka/gen_modules_conf.pl index e45b6e65b..6d368c8f3 100644 --- a/rescue/tree/ka/gen_modules_conf.pl +++ b/rescue/tree/ka/gen_modules_conf.pl @@ -1,4 +1,9 @@ $kinds2all_modules = { + 'usb' => [ + 'usb-uhci', + 'usb-ohci', + 'ehci-hcd' + ], 'network' => [ '3c501', '3c503', @@ -141,6 +146,9 @@ my %kinds2modules = map { if (my @scsi = @{$kinds2modules{scsi}}) { print "probeall scsi_hostadapter ", join(" ", @scsi), "\n"; } +if (my @usb = @{$kinds2modules{usb}}) { + print "probeall usb-interface ", join(" ", @usb), "\n"; +} my $eth = 0; foreach (@{$kinds2modules{network}}) { print "alias eth$eth $_\n"; diff --git a/rescue/tree/ka/install.sh b/rescue/tree/ka/install.sh index 1e9c17c6d..941e1ed07 100755 --- a/rescue/tree/ka/install.sh +++ b/rescue/tree/ka/install.sh @@ -9,6 +9,9 @@ # $Header$ # $Id$ # $Log$ +# Revision 1.1.2.3 2002/11/07 15:10:52 erwan +# SCSI support now activated +# # Revision 1.1.2.2 2002/11/05 15:49:13 erwan # added some files # @@ -364,6 +367,7 @@ make_partitions() for file in fdisk_commands*; do drive=`echo $file | sed 's/fdisk_commands//'` + runcom "Cleaning hard drive" dd if=/dev/zero of=/dev/$drive bs=1M count=5 || fail "Can t clean drive$drive" cat $file | runcom "Writing partition table for $drive using fdisk" fdisk /dev/$drive || fail "error with fdisk" done @@ -561,7 +565,7 @@ if [ $DONTWRITE != yes ]; then countdown $delay echo inc_ka_session - /ka/ka-d-client -w $cur_ka_session -e "(cd /mnt/disk; tar --extract --read-full-records --same-permissions --numeric-owner --sparse --file - )" || fail + /ka/ka-d-client -w $cur_ka_session -e "(cd /mnt/disk; tar --extract --read-full-records --same-permissions --numeric-owner --sparse --file - ) 2>/dev/null" || fail echo Linux copy done. echo Creating excluded directories cat /tmp/partfiles/excluded | recreate_dirs @@ -578,6 +582,14 @@ if [ $DONTWRITE != yes ]; then fi done + echo "Writing modules.conf" + /usr/bin/perl /ka/gen_modules_conf.pl >/mnt/disk/etc/modules.conf + + runcom "Syncing disks" sync + + echo "Running mkinitrd" + /ka/make_initrd + cd /tmp/partfiles write_MBRs @@ -593,13 +605,6 @@ else sleep 1 fi -echo "Writing modules.conf" -/usr/bin/perl /ka/gen_modules_conf.pl >/mnt/disk/etc/modules.conf -runcom "Syncing disks" sync -echo "Running mkinitrd" -/ka/make_initrd -umount_partitions - # maybe there is a last dummy ka-deploy for synchronization if test -f /tmp/partfiles/delay; then sleep 1 @@ -607,6 +612,8 @@ if test -f /tmp/partfiles/delay; then runcom "Waiting source node signal to end installation" /ka/ka-d-client -w $cur_ka_session -e "cat" || fail fi +umount_partitions + # Update the step file on the tftp server #runcom 'Sending back new $step' set_step $nextstep || fail diff --git a/rescue/tree/ka/make_initrd b/rescue/tree/ka/make_initrd index 84425d77c..d6f15a951 100755 --- a/rescue/tree/ka/make_initrd +++ b/rescue/tree/ka/make_initrd @@ -1,29 +1,49 @@ #!/bin/bash echo Looking for default kernel -IMG=`cat /etc/lilo.conf | grep default | cut -d "=" -f 2` +CHROOT=/mnt/disk +IMG=`cat $CHROOT/etc/lilo.conf | grep default | cut -d "=" -f 2` KERN="x" INITRD="" LABEL="x" -for i in `cat /etc/lilo.conf`; do -if echo $i | grep image >/dev/null; then - KERN=`echo $i | cut -d "=" -f 2` -fi -if echo $i | grep label >/dev/null; then - LABEL=`echo $i | cut -d "=" -f 2` -fi -if echo $i | grep initrd >/dev/null; then - INITRD=`echo $i | cut -d "=" -f 2` -fi - -if [ ${LABEL} == ${IMG} ] && [ ! -z ${INITRD} ]; then - echo "Kernel name is $KERN" - echo "Initrd name is $INITRD" - KERN_VERSION=`strings $KERN | grep "^2\.[2.4]"| cut -d " " -f 1` - if [ -z $KERN_VERSION ]; then - echo "No kernel version found !" - read + +modprobe loop + +for i in `cat $CHROOT/etc/lilo.conf`; do + + if echo $i | grep image >/dev/null; then + KERN=$CHROOT`echo $i | cut -d "=" -f 2` + INITRD="" + LABEL="x" + + fi + + if echo $i | grep label >/dev/null; then + LABEL=`echo $i | cut -d "=" -f 2` + fi + + if echo $i | grep initrd >/dev/null; then + INITRD=`echo $i | cut -d "=" -f 2` + fi + + if [ ${LABEL} == ${IMG} ] && [ ! -z ${INITRD} ]; then + echo "Kernel name is $KERN" + echo "Initrd name is $INITRD" + KERN_VERSION=`strings $KERN | grep "^2\.[2.4]"| cut -d " " -f 1` + if [ -z $KERN_VERSION ]; then + echo "No kernel version found !" + read + fi + + chroot $CHROOT mount /proc + chroot $CHROOT MAKEDEV loop + chroot $CHROOT MAKEDEV fd + chroot $CHROOT MAKEDEV hd + chroot $CHROOT MAKEDEV sd + chroot $CHROOT MAKEDEV md + chroot $CHROOT MAKEDEV zero + chroot $CHROOT mkinitrd -f $INITRD $KERN_VERSION + chroot $CHROOT umount /proc + + exit fi - echo Running mkinitrd -f $INITRD $KERN_VERSION - exit -fi done diff --git a/rescue/tree/ka/setup_network.sh b/rescue/tree/ka/setup_network.sh index 347f89f45..d570f1f62 100755 --- a/rescue/tree/ka/setup_network.sh +++ b/rescue/tree/ka/setup_network.sh @@ -8,6 +8,11 @@ curdir=`pwd` +ip=`/sbin/ifconfig | grep -v 127.0.0.1 | grep "inet addr" | sed 's/^.*inet addr:\([^ ]*\) .*$/\1/g'` +ip=`echo $ip | tr . _` +echo -n "Setting hostname: " +hostname $ip + # current hostname has been set up in rc.sysinit ip=`hostname | tr _ .` |