Changeset 2816 in MondoRescue for branches/2.2.10/mindi
- Timestamp:
- Apr 29, 2011, 3:42:55 PM (13 years ago)
- Location:
- branches/2.2.10/mindi
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mindi/README.bootparam
r2623 r2816 66 66 Execute a final script before rebooting the machine at the end of the restoration. Could be an NFS shared script e.g., or a script located on the restored disk or in the initrd. Eg: post=/tmp/isodir/my-post.sh. Note that the script should be executable. 67 67 68 quiet 69 Do not print information msgs in order to allow for easier tracking of error messages at boot time 70 68 71 serial=/dev/ttySx 69 72 When using a serial console, associate it to the tty device so it works correctly at restore time. By default set up /dev/ttyS0 as serial console. Pass the value of your serial console if different. -
branches/2.2.10/mindi/analyze-my-lvm
r2703 r2816 13 13 GetValueFromField() { 14 14 local res 15 sed s/' '/~/ "$1" | tr -s ' ' ' ' | sed s/'~ '/'~'/ | grep -i "$2~" | cut -d'~' -f2,3,4,5 | tr '~' ' ' | gawk '{ if ($2=="MB") {printf "%dm",$1;} else if ($2==" KB") {printf "%dk",$1;} else if ($2=="GB") {printf "%fg",$1;} else {print $0;};}'15 sed s/' '/~/ "$1" | tr -s ' ' ' ' | sed s/'~ '/'~'/ | grep -i "$2~" | cut -d'~' -f2,3,4,5 | tr '~' ' ' | gawk '{ if ($2=="MB") {printf "%dm",$1;} else if ($2=="MiB") {printf "%dm",$1;} else if ($2=="KB") {printf "%dk",$1;} else if ($2=="KiB") {printf "%dk",$1;} else if ($2=="GB") {printf "%fg",$1;} else if ($2=="GiB") {printf "%fg",$1;} else if ($2=="TB") {printf "%dt",$1;} else if ($2=="TiB") {printf "%dt",$1;} else {print $0;};}' 16 16 } 17 17 … … 342 342 if [ _"$MINDI_TMP" = _"" ]; then 343 343 # Launched stdalone, so create a temp dir 344 STDALONE="true" 344 345 MINDI_TMP=`mktemp -d $TMPDIR/mindi.XXXXXXXXXX` 345 346 if [ $? -ne 0 ]; then … … 425 426 rm -f $MINDI_TMP/excludedvgs 426 427 WriteShutdownScript 428 if [ _"$STDALONE" = _"true" ]; then 429 rm -rf $MINDI_TMP 430 fi 427 431 exit 0 428 432 -
branches/2.2.10/mindi/deplist.d/base.conf
r2635 r2816 7 7 /etc/fstab 8 8 /etc/modules.conf 9 # On ArchLinux 10 /etc/modprobe.d/ 11 9 12 /etc/hosts 10 13 /etc/host.conf … … 32 35 /usr/share/misc/file/magic 33 36 /usr/share/file/magic 37 # On ArchLinux 38 /usr/share/file/magic.mgc 39 /usr/share/misc/magic.mgc 34 40 35 41 # ACLs … … 42 48 # On RHEL 43 49 /usr/bin/bzip2 44 # On Debian 50 # On Debian and ArchLinux 45 51 /bin/bzip2 46 52 # is a link => No additional place 47 53 # On RHEL 48 54 /usr/bin/bunzip2 49 # On Debian 55 # On Debian and ArchLinux 50 56 /bin/bunzip2 51 57 /usr/bin/lzop … … 57 63 /usr/bin/cmp 58 64 /sbin/ctrlaltdel 65 /usr/bin/halt 59 66 /bin/dd 60 67 /usr/bin/eject … … 70 77 /usr/bin/head 71 78 /usr/bin/less 79 # On ArchLinux 80 /bin/less 72 81 /usr/bin/sort 73 82 /usr/bin/uniq 74 83 /usr/bin/reset 84 /sbin/ldconfig 75 85 /usr/bin/tee 76 77 86 78 87 # For swap uuid support, ia64 and probably then more in the future -
branches/2.2.10/mindi/deplist.d/hw.conf
r2409 r2816 7 7 /usr/sbin/lshw 8 8 /usr/bin/lspci 9 # On ArchLinux 10 /usr/sbin/lspci 9 11 /usr/bin/lsusb 10 12 -
branches/2.2.10/mindi/deplist.d/minimal-net.conf
r2703 r2816 18 18 /usr/bin/fusermount 19 19 /usr/bin/ssh 20 # On ArchLinux 21 /bin/fusermount 20 22 # Required by ssh as dlopened 21 23 /usr/lib/libnss_compat.so … … 24 26 /usr/lib64/libnss_files.so 25 27 /etc/ssh 28 #On ArchLinux 29 /bin/ulockmgr_server 26 30 /usr/bin/ulockmgr_server 27 31 /sbin/mount.cifs … … 38 42 /sbin/dhclient 39 43 /var/lib/dhcp/dhclient.leases 44 45 # On ArchLinnux 46 /sbin/dhcpcd 47 /var/lib/dhcpd -
branches/2.2.10/mindi/deplist.d/minimal.conf
r2594 r2816 20 20 /bin/df 21 21 /usr/bin/loadkeys 22 # On ArchLinux 23 /bin/loadkeys 24 /bin/pidof 22 25 /sbin/pidof 26 #On Archlinux 27 /usr/bin/reboot 23 28 /sbin/reboot 24 29 /sbin/openvt … … 71 76 /etc/nsswitch.conf 72 77 /lib/libnss_files.so.2 78 /sbin/shutdown 73 79 74 80 # Compression … … 78 84 /sbin/klogd 79 85 /sbin/syslogd 86 # On ArchLinux 87 /usr/sbin/syslog-ng 80 88 81 89 # HW related … … 93 101 /sbin/MAKEDEV 94 102 /etc/init.d/functions 103 # On ArchLinux 104 /etc/rc.d/functions 95 105 /etc/services 96 106 /sbin/devfsd … … 100 110 /sbin/udevsend 101 111 /sbin/udevd 112 # On ArchLinux 113 /sbin/udevadm 102 114 /sbin/udevstart.static 103 115 /sbin/udev_volume_id … … 112 124 /sbin/insmod 113 125 /sbin/lsmod 126 # On ArchLinux 127 /bin/lsmod 114 128 /sbin/modprobe 115 129 /etc/modprobe.d -
branches/2.2.10/mindi/mindi
r2715 r2816 35 35 TMPDIR=/tmp 36 36 37 EXTRA_SPACE= 50000# increase if you run out of ramdisk space38 BOOT_SIZE= 24576# size of the boot disk37 EXTRA_SPACE=80152 # increase if you run out of ramdisk space 38 BOOT_SIZE=32768 # size of the boot disk 39 39 40 40 PROMPT_MAKE_CD_IMAGE="yes" … … 60 60 61 61 # ide-probe-mod 62 IDE_MODS="ide ide-floppy floppy ide-generic ide-detect ide-mod ide-disk ide_disk ide-cd ide_cd ide_cd_mod ide-cd_mod ide-cs ide-core ide_core ide-gd_mod ide_gd_mod edd paride ata_generic ide_pci_generic ata_piix libata dock via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks pata_sis pata_sil680 pata_jmicron amd74xx sis5513 jmicron sata_promise sata_via serverworks sata_svw blkbk virtio"62 IDE_MODS="ide ide-floppy floppy ide-generic ide-detect ide-mod ide-disk ide_disk ide-cd ide_cd ide_cd_mod ide-cd_mod ide-cs ide-core ide_core ide-gd_mod ide_gd_mod edd paride ata_generic ide_pci_generic ata_piix libata dock via82cxxx generic nvidia ahci libahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks pata_sis pata_sil680 pata_jmicron amd74xx sis5513 jmicron sata_promise sata_via serverworks sata_svw blkbk virtio" 63 63 PCMCIA_MODS="pcmcia_core ds yenta_socket" 64 USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd xhci usbkbd usbhid keybdev mousedev libusual scsi_mod ff-memless ums_cypress ums-cypress cp210x "65 NET_MODS="auth_rpcgss sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 bnx2x e1000 e1000e igb dca eepro100 ne2k-pci tg3 libphy pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmxnet3 vmnet exportfs fuse libcrc32c crc32c netbk xenblktap r8169"64 USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd xhci usbkbd usbhid keybdev mousedev libusual scsi_mod ff-memless ums_cypress ums-cypress cp210x usbserial" 65 NET_MODS="auth_rpcgss sunrpc nfs nfs_acl lockd fscache loop mii 3c59x e100 bcm5700 bnx2 bnx2x mdio e1000 e1000e igb dca eepro100 ne2k-pci tg3 libphy pcnet32 8139cp 8139too 8390 forcedeth vmxnet vmxnet3 vmnet exportfs fuse libcrc32c crc32c netbk xenblktap r8169" 66 66 CDROM_MODS="$TAPE_MODS $IDE_MODS $USB_MODS $PCMCIA_MODS $SCSI_MODS $NET_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_base nls_cp437 nls_utf8 sg sr_mod zlib_inflate iso9660" 67 67 # Those modules will only go on the backup media, not the boot media. 68 EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid10 raid5 raid456 raid6_pq xor async_tx async_memcpy async_xor lvm-mod dm-mod dm_mod dm-snapshot dm_snapshot dm-zero dm_zero dm-mirror dm_mirror dm-multipath dm-round-robin dm-emc dm-hp-sw dm-rdacmultipath jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache ext4 jbd2 crc16 ocfs2 ocfs2_dlm ocfs2_nodemanager configfs"68 EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid10 raid5 raid456 raid6_pq async_pq xor async_tx async_memcpy async_xor lvm-mod dm-mod dm_mod dm-snapshot dm_snapshot dm-zero dm_zero dm-mirror dm_mirror dm-multipath dm-round-robin dm-emc dm-hp-sw dm-rdac dm-region-hash dm-snapshot dm-log multipath jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache ext4 jbd2 crc16 ocfs2 ocfs2_dlm ocfs2_nodemanager configfs" 69 69 # Replace with that line for HP OCMP e.g. 70 70 #DENY_MODS="MPS_Driver_Mapper mps octtldrv tscttl streams kqemu fdomain" … … 378 378 echo -e "$DONE" 379 379 return 0 380 elif [ -e "/etc/rc.conf" ] ; then 381 echo "ArchLinux config detected." >> $LOGFILE 382 keyfile=/etc/rc.conf 380 383 elif [ -e "/etc/conf.d/keymaps" ] ; then 381 384 LogFile "Gentoo-style config detected." … … 398 401 locale=`grep -F KEYTABLE "$keyfile" | tr -d '"' |cut -d'=' -f2` 399 402 [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'` # Slackware 400 [ ! "$locale" ] && locale=`grep -E '^KEYMAP=' "$keyfile" | tr -d '"' |cut -d'=' -f2` # Gentoo 403 [ ! "$locale" ] && locale=`grep -E '^KEYMAP=' "$keyfile" | tr -d '"' |cut -d'=' -f2` # Gentoo & ArchLinux 401 404 LogFile "locale=$locale" 402 405 # … … 1580 1583 if [ -x "/bin/lsb_release" ]; then 1581 1584 DESC=`/bin/lsb_release -d | cut -d: -f2 | sed "s/[ \t]*//"` 1585 elif [ -r /etc/arch-release ]; then # this code must be written before /etc/issue test to avoid errors 1586 DESC="Arch Linux" 1587 if [ -r /var/log/pacman.log ]; then 1588 # there are no releases but we can get the last system upgrade 1589 # Output example: Arch Linux [2011-03-03 01:39] 1590 DESC="$DESC $(tac /var/log/pacman.log | grep -m1 'full system upgrade' | cut -d']' -f1)]" 1591 fi 1592 elif [ -r /etc/issue.net ]; then 1593 DESC=`head -1 /etc/issue.net` 1594 elif [ -r /etc/issue ]; then 1595 DESC=`head -1 /etc/issue` 1582 1596 elif [ -x "/usr/bin/pbdistrocheck" ]; then 1583 1597 # For pb >= 0.9.8 1584 DESC=`/usr/bin/pbdistrocheck - d`1598 DESC=`/usr/bin/pbdistrocheck -s | cut -d, -f1-4` 1585 1599 else 1586 iss="/dev/null" 1587 [ -r /etc/issue.net ] && iss="/etc/issue.net" 1588 [ -r /etc/issue ] && iss="/etc/issue" 1589 DESC=`head -1 $iss` 1600 DESC="Unknown desc" 1590 1601 fi 1591 1602 sed "s/ZZZZZ/$MINDI_VERSION/" $MINDI_DATA/msg-txt | sed "s/KKKKK/Kernel $KERVER/" | sed "s/AAAAA/on a $ARCH architecture/" | sed "s/TTTTT/`LC_TIME=C date`/" | sed "s/MMMMM/`hostname`/" | sed "s/DDDDD/$DESC/" … … 1760 1771 LogAll "Please unload some of your modules and try again." 1761 1772 rm -f $MINDI_TMP/mtpt.$$ 1762 LogAll "Cannot incorporate initrd.img in bootdisk (kernel / modules too big?) "1773 LogAll "Cannot incorporate initrd.img in bootdisk (kernel / modules too big?). Try to increase EXTRA_SPACE and BOOT_SIZE in $MINDI_CONFIG" 1763 1774 retval=$(($retval+1)) 1764 1775 fi … … 2684 2695 export MONDO_SHARE="" 2685 2696 MindiExit $? 2697 elif [ "$1" = "--makemessage" ] ; then 2698 MakeMessageFile 2699 MindiExit 0 2686 2700 elif [ "$1" = "--makemountlist" ] ; then 2687 2701 [ ! "$2" ] && Die "Please specify the output file" -
branches/2.2.10/mindi/mindi.conf
r2460 r2816 5 5 # 6 6 # FORCE_MODS="crc_ccitt crc_ccitt" 7 # 8 # EXTRA_SPACE=80152 # increase if you run out of ramdisk space 9 # BOOT_SIZE=32768 # size of the boot disk -
branches/2.2.10/mindi/rootfs/sbin/LogIt
r1413 r2816 16 16 echo "Date: `date`" >> $LOGFILE 17 17 echo "----------------" >> $LOGFILE 18 if [ "`grep -i quiet /proc/cmdline`" ]; then 19 echo "QUIET mode activated. Only error msgs are printed" >> $LOGFILE 20 echo "----------------" >> $LOGFILE 21 fi 18 22 fi 19 23 … … 26 30 27 31 if [ "$#" = "1" ] ; then 28 32 echo -e "$currdate $1" >> $LOGFILE 29 33 elif [ "$#" = "2" ] ; then 30 if [ "$2" = "0" ] ; then 31 echo -e "$currdate $1" >> $LOGFILE 32 elif [ "$2" = "1" ] ; then 33 echo -e "$1" 34 echo -e "$currdate $1" >> $LOGFILE 35 elif [ "$2" = "2" ] ; then 36 echo -e -n " \r$1\r" 37 echo -e "$currdate $1" >> $LOGFILE 38 elif [ "$2" = "3" ] ; then 39 echo -e -n " \r$1\n" 40 echo -e "$currdate $1" >> $LOGFILE 41 elif [ "$2" = "9" ] ; then 42 if [ "$DEBUGGING" = "yes" ] ; then 43 echo -e "$currdate $1" >> $LOGFILE 34 if [ "$2" = "0" ] ; then 35 echo -e "$currdate $1" >> $LOGFILE 36 elif [ "$2" = "1" ] ; then 37 if [ ! "`grep -i quiet /proc/cmdline`" ]; then 38 echo -e "$1" 39 fi 40 echo -e "$currdate $1" >> $LOGFILE 41 elif [ "$2" = "2" ] ; then 42 if [ ! "`grep -i quiet /proc/cmdline`" ]; then 43 echo -e -n " \r$1\r" 44 fi 45 echo -e "$currdate $1" >> $LOGFILE 46 elif [ "$2" = "3" ] ; then 47 if [ ! "`grep -i quiet /proc/cmdline`" ]; then 48 echo -e -n " \r$1\n" 49 fi 50 echo -e "$currdate $1" >> $LOGFILE 51 elif [ "$2" = "9" ] ; then 52 if [ "$DEBUGGING" = "yes" ] ; then 53 echo -e "$currdate $1" >> $LOGFILE 54 fi 55 else 56 LogIt "LogIt '$1' '$2' .. unknown 2nd param" 57 exit 1 44 58 fi 45 else46 LogIt "LogIt '$1' '$2' .. unknown 2nd param"47 exit 148 fi49 59 else 50 51 60 LogIt "LogIt '$1' .. silly params" 61 exit 1 52 62 fi 53 63 -
branches/2.2.10/mindi/rootfs/sbin/find-and-mount-cdrom
r2591 r2816 75 75 fi 76 76 [ "$1" = "--second-try" ] && exit 1; 77 if [ -f $MINDI_CACHE/mondorestore.cfg ] && [ "`grep "using-cdstream yes" $MINDI_CACHE/mondorestore.cfg 2 77 if [ -f $MINDI_CACHE/mondorestore.cfg ] && [ "`grep "using-cdstream yes" $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ] ; then 78 78 LogIt "Because you are using cdstream, I won't try to mount CD." 79 79 exit 0 -
branches/2.2.10/mindi/rootfs/sbin/hack-cfg-if-necessary
r2603 r2816 19 19 grep -q "backup-media-type iso" $MINDI_CACHE/mondorestore.cfg 2> /dev/null 20 20 if [ $? -ne 0 ] ; then 21 21 LogIt "Config file is fine, BTW." 22 22 exit 0 23 23 fi -
branches/2.2.10/mindi/rootfs/sbin/init
r2696 r2816 75 75 76 76 LaunchTerminals() { 77 openvt - l/bin/sh78 openvt - l/bin/sh79 openvt - l/bin/sh80 openvt - l/bin/sh81 openvt - l/bin/sh82 openvt - l/bin/sh /sbin/wait-for-petris83 openvt - l/usr/bin/tail -f $LOGFILE77 openvt -c 2 /bin/sh 78 openvt -c 3 /bin/sh 79 openvt -c 4 /bin/sh 80 openvt -c 5 /bin/sh 81 openvt -c 6 /bin/sh 82 openvt -c 7 /bin/sh /sbin/wait-for-petris 83 openvt -c 8 /usr/bin/tail -f $LOGFILE 84 84 serial="/foo" 85 85 # By default first serial line is configured as tty … … 103 103 loadkeys $fname 104 104 else 105 LogIt "Using default keyboard map." 1105 LogIt "Using default US keyboard map." 1 106 106 fi 107 107 } … … 666 666 } 667 667 668 UdevadmTrigger() { 669 if [ -x /sbin/udevadm ]; then 670 if [ `/sbin/udevadm --version` -ge 146 ]; then 671 # After version 146 option --retry-failed doesn't exist anymore 672 /sbin/udevadm triger --type=failed 673 else 674 /sbin/udevadm trigger --retry-failed 675 fi 676 fi 677 } 678 668 679 ExtractDataDisksAndLoadModules() { 669 680 echo "Installing additional tools ..." … … 678 689 # (useful for rules creating network ifcfg files) 679 690 if [ "$USE_UDEV" = "yes" ]; then 680 if [ -x /sbin/udevadm ]; then 681 udaver=`/sbin/udevadm --version` 682 if [ $udaver -lt 146 ]; then 683 /sbin/udevadm trigger --retry-failed 684 else 685 # After version 146 option --retry-failed doesn't exist anymore 686 /sbin/udevadm trigger 687 fi 688 fi 691 UdevadmTrigger 689 692 fi 690 693 } … … 884 887 LogIt "-------------" 885 888 fdisk -l >> $LOGFILE 889 LogIt "-------------" 890 LogIt "/tmp/mondo-restore.cfg result:" >> $LOGFILE 891 LogIt "-------------" 892 cat /tmp/mondo-restore.cfg >> $LOGFILE 886 893 887 894 ide-opt … … 890 897 if [ "$USE_UDEV" = "yes" ]; then 891 898 if [ -x /sbin/udevadm ]; then 892 /sbin/udevadm trigger --retry-failed899 UdevadmTrigger 893 900 fi 894 901
Note:
See TracChangeset
for help on using the changeset viewer.