Changeset 2816 in MondoRescue


Ignore:
Timestamp:
Apr 29, 2011, 3:42:55 PM (13 years ago)
Author:
Bruno Cornec
Message:

svn merge (in svk) -r 2714:2773 2.2.9 in 2.2.10

r4207@localhost (orig r2716): bruno | 2011-02-03 01:29:51 +0100

  • Increase boot size again to support better fedora 13/14


r4208@localhost (orig r2717): bruno | 2011-02-12 15:43:36 +0100

  • Excluding vmhgfs FS for VMWare guests mounting areas of the host.


r4209@localhost (orig r2718): bruno | 2011-02-18 00:30:35 +0100
-Extend EXTRA-SIZE for Debian 6.0 (at least)


r4210@localhost (orig r2719): bruno | 2011-02-18 00:45:40 +0100

  • Fix #462 (removes temp dir if analyze-my-lvm launched in stand alonae mode)


r4213@localhost (orig r2722): bruno | 2011-02-25 18:44:47 +0100

  • Fixes for RHEL6 support at least around dm extensions, bnx2x and cp210x dependencies


r4214@localhost (orig r2723): bruno | 2011-02-25 19:00:17 +0100

  • Adds a restore quiet option


r4215@localhost (orig r2724): bruno | 2011-02-25 19:43:50 +0100

  • Adds support for dm-log used on RHEL6 as well.


r4216@localhost (orig r2725): bruno | 2011-02-25 21:26:54 +0100

  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3


r4217@localhost (orig r2726): bruno | 2011-02-26 11:38:29 +0100

  • Fix error introduced in previous patch in the if/then/else case without member in the then


r4218@localhost (orig r2727): bruno | 2011-02-26 12:05:33 +0100

  • With mindi-busybox 1.18.3 the syntax of openvt changed. This patch keeps a compatible init script for both previous and current version.


r4219@localhost (orig r2728): bruno | 2011-02-26 15:27:40 +0100

  • Latest lvdisplay print MiB instead of MB. Impact on analyze-my-lvm fixed.


r4220@localhost (orig r2729): bruno | 2011-02-26 16:39:32 +0100

  • Adds feature rpc to mindi-busybox in case of need



r4221@localhost (orig r2730): bruno | 2011-02-26 16:42:43 +0100

  • Adds the rebot command to the list of mandatory ones at restore time


r4222@localhost (orig r2731): bruno | 2011-02-26 17:37:13 +0100

  • Adds functions and /bin/loadkeys (new location) to minimal set of commands to have
  • provides a makemessage option to mindi and this function now works with pbdistrocheck
  • Do not create an error when a phys device has 0 size and is a /dev/dm-* device


r4223@localhost (orig r2732): bruno | 2011-02-26 19:07:43 +0100

  • Syntax fix


r4224@localhost (orig r2733): bruno | 2011-02-26 19:51:16 +0100

  • Fix test on dm which was made in wrong sense
  • Adds a driver to allow raid456 to work


r4225@localhost (orig r2734): bruno | 2011-02-26 20:55:00 +0100

  • Fix 2 redirections issues


r4317@localhost (orig r2737): bruno | 2011-03-13 13:12:57 +0100

  • Add support for libahci driver, mandatory for debian 6.


r4318@localhost (orig r2738): bruno | 2011-03-13 14:46:37 +0100

  • Update from Lester Wade (lester.wade_at_hp.com) incorporating latest ML feedbacks


r4319@localhost (orig r2739): bruno | 2011-03-13 17:49:15 +0100

  • Updated Lab for TES 2011


r4323@localhost (orig r2743): bruno | 2011-03-20 01:37:40 +0100

  • Fix a seg fault bug when using the GUI in case exclude_paths was NULL (mc_at_carreira.com.pt)


r4324@localhost (orig r2744): bruno | 2011-03-20 19:38:14 +0100

  • Adds Arch Linux Keyboard support (mc_at_carreira.com.pt)


r4325@localhost (orig r2745): bruno | 2011-03-20 19:48:01 +0100

  • Avoids coredump again when exclude_path is NULL with mr_make_devlist_from_pathlist (feedback from mc_at_carreira.com.pt)


r4326@localhost (orig r2746): bruno | 2011-03-20 19:39:47 +0100

  • Remove blkid from busybox to solve #435


r4327@localhost (orig r2747): bruno | 2011-03-20 19:43:22 +0100

  • Adds reboot to fix #435


r4328@localhost (orig r2748): bruno | 2011-03-22 00:58:07 +0100

  • Fix Arch Linux kbd printed in log file now instead of screen.


r4329@localhost (orig r2749): bruno | 2011-03-22 00:59:58 +0100

  • Again increase size for boot env to support better fedora 14 and other latest distros


r4356@localhost (orig r2750): bruno | 2011-03-25 19:30:01 +0100

  • Improve Arch Linux support for mindi tools (mc_at_carreira.com.pt)


r4357@localhost (orig r2751): bruno | 2011-03-25 19:48:33 +0100

  • Accept to work with either wodim or cdreord and genisoimage or mkisofs


r4358@localhost (orig r2752): bruno | 2011-03-25 20:20:49 +0100

  • Documents option -v of mondoarchive


r4359@localhost (orig r2753): bruno | 2011-03-29 01:34:30 +0200

  • Use modprobe instead of insmod to load loop, cd, ... modules (in order to force them at rstore time). Also drop very old aes support for mdk 9.2


r4360@localhost (orig r2754): bruno | 2011-03-29 01:38:49 +0200

  • Arch Linux support for boot message of mindi (mc_at_carreira.com.pt) using /etc/arch-release and pacman.log


r4383@localhost (orig r2755): bruno | 2011-04-07 09:49:38 +0200

  • Adds a UdevadmTrigger function at restore time to deal with the various syntax formats changes ddepending on version (mc_at_carreira.com.pt)


r4384@localhost (orig r2756): bruno | 2011-04-07 10:05:24 +0200

  • Increase again sizes for Debian 6 support (victor.gattegno_at_hp.com)


r4385@localhost (orig r2757): bruno | 2011-04-07 10:13:00 +0200
Conform to the report of size really !


r4386@localhost (orig r2758): bruno | 2011-04-07 11:31:12 +0200

  • Improved message for Arch Linux for rebuilding the initrd (mc_at_carreira.com.pt)


r4390@localhost (orig r2759): bruno | 2011-04-12 01:15:00 +0200

  • Typo in Web site


r4392@localhost (orig r2761): bruno | 2011-04-14 00:23:38 +0200

  • Adds download references for latest versions.


r4394@localhost (orig r2763): bruno | 2011-04-16 00:35:08 +0200

  • Adds support for MT back mandatory for OBDR.


r4395@localhost (orig r2764): bruno | 2011-04-20 12:18:46 +0200
Function resize_drive_proportionately_to_suit_new_drives

  • Integrate some mr_asprintf
  • Use systematically long long data types in all computation to match the struct mountlist_reference size member and have correct precision
  • Apply JB general_at_itpsg.com patch to make the partition resizing work properly according to the drive size (keeping all calculation in KB and converting only for display)


r4396@localhost (orig r2765): bruno | 2011-04-21 11:20:58 +0200

  • Remove very old code creating confusing symlinks pico to nano in init (patch from MC). Fix #477


r4397@localhost (orig r2766): bruno | 2011-04-21 11:57:44 +0200

  • text's are properly centered in open_and_list_dir (Patch from Chucky). Fix #404.


r4398@localhost (orig r2767): bruno | 2011-04-21 12:49:40 +0200

  • Attempt to fix #432 with a better message at a start.


r4399@localhost (orig r2768): bruno | 2011-04-21 13:00:37 +0200

Log content of mondo-restore.cfg


r4400@localhost (orig r2769): bruno | 2011-04-21 13:48:52 +0200

  • Introduce a new bkpinfo member (subdir) to support storing the subdir under which ISO images are stored on an external HDD. Should fix mostly #433.


r4401@localhost (orig r2770): bruno | 2011-04-21 14:14:52 +0200

  • Fix compilation issues due to level of visibility of functions


r4402@localhost (orig r2771): bruno | 2011-04-22 01:49:03 +0200

  • Adds GUI support for compresion type. Fix half of #468.


r4403@localhost (orig r2772): bruno | 2011-04-22 02:00:07 +0200

  • Adds support of ext attr through the GUI. Fix second part of #468


r4404@localhost (orig r2773): bruno | 2011-04-22 02:22:24 +0200

  • Propose more variables in the mindi.conf example
  • More explicit messages when size unsufficient in mindi for kernel + initrd as per #471
  • Better loging of labeling in mondo when in nuke mode


Location:
branches/2.2.10
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/README.bootparam

    r2623 r2816  
    6666    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.
    6767
     68quiet
     69    Do not print information msgs in order to allow for easier tracking of error messages at boot time
     70
    6871serial=/dev/ttySx
    6972    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  
    1313GetValueFromField() {
    1414    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;};}'
    1616}
    1717
     
    342342if [ _"$MINDI_TMP" = _"" ]; then
    343343    # Launched stdalone, so create a temp dir
     344    STDALONE="true"
    344345    MINDI_TMP=`mktemp -d $TMPDIR/mindi.XXXXXXXXXX`
    345346    if [ $? -ne 0 ]; then
     
    425426rm -f $MINDI_TMP/excludedvgs
    426427WriteShutdownScript
     428if [ _"$STDALONE" = _"true" ]; then
     429    rm -rf $MINDI_TMP
     430fi
    427431exit 0
    428432
  • branches/2.2.10/mindi/deplist.d/base.conf

    r2635 r2816  
    77/etc/fstab
    88/etc/modules.conf
     9# On ArchLinux
     10/etc/modprobe.d/
     11
    912/etc/hosts
    1013/etc/host.conf
     
    3235/usr/share/misc/file/magic
    3336/usr/share/file/magic
     37# On ArchLinux
     38/usr/share/file/magic.mgc
     39/usr/share/misc/magic.mgc
    3440
    3541# ACLs
     
    4248# On RHEL
    4349/usr/bin/bzip2
    44 # On Debian
     50# On Debian and ArchLinux
    4551/bin/bzip2
    4652# is a link => No additional place
    4753# On RHEL
    4854/usr/bin/bunzip2
    49 # On Debian
     55# On Debian and ArchLinux
    5056/bin/bunzip2
    5157/usr/bin/lzop
     
    5763/usr/bin/cmp
    5864/sbin/ctrlaltdel
     65/usr/bin/halt
    5966/bin/dd
    6067/usr/bin/eject
     
    7077/usr/bin/head
    7178/usr/bin/less
     79# On ArchLinux
     80/bin/less
    7281/usr/bin/sort
    7382/usr/bin/uniq
    7483/usr/bin/reset
     84/sbin/ldconfig
    7585/usr/bin/tee
    76 
    7786
    7887# For swap uuid support, ia64 and probably then more in the future
  • branches/2.2.10/mindi/deplist.d/hw.conf

    r2409 r2816  
    77/usr/sbin/lshw
    88/usr/bin/lspci
     9# On ArchLinux
     10/usr/sbin/lspci
    911/usr/bin/lsusb
    1012
  • branches/2.2.10/mindi/deplist.d/minimal-net.conf

    r2703 r2816  
    1818/usr/bin/fusermount
    1919/usr/bin/ssh
     20# On ArchLinux
     21/bin/fusermount
    2022# Required by ssh as dlopened
    2123/usr/lib/libnss_compat.so
     
    2426/usr/lib64/libnss_files.so
    2527/etc/ssh
     28#On ArchLinux
     29/bin/ulockmgr_server
    2630/usr/bin/ulockmgr_server
    2731/sbin/mount.cifs
     
    3842/sbin/dhclient
    3943/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  
    2020/bin/df
    2121/usr/bin/loadkeys
     22# On ArchLinux
     23/bin/loadkeys
     24/bin/pidof
    2225/sbin/pidof
     26#On Archlinux
     27/usr/bin/reboot
    2328/sbin/reboot
    2429/sbin/openvt
     
    7176/etc/nsswitch.conf
    7277/lib/libnss_files.so.2
     78/sbin/shutdown
    7379
    7480# Compression
     
    7884/sbin/klogd
    7985/sbin/syslogd
     86# On ArchLinux
     87/usr/sbin/syslog-ng
    8088
    8189# HW related
     
    93101/sbin/MAKEDEV
    94102/etc/init.d/functions
     103# On ArchLinux
     104/etc/rc.d/functions
    95105/etc/services
    96106/sbin/devfsd
     
    100110/sbin/udevsend
    101111/sbin/udevd
     112# On ArchLinux
     113/sbin/udevadm
    102114/sbin/udevstart.static
    103115/sbin/udev_volume_id
     
    112124/sbin/insmod
    113125/sbin/lsmod
     126# On ArchLinux
     127/bin/lsmod
    114128/sbin/modprobe
    115129/etc/modprobe.d
  • branches/2.2.10/mindi/mindi

    r2715 r2816  
    3535TMPDIR=/tmp
    3636
    37 EXTRA_SPACE=50000       # increase if you run out of ramdisk space
    38 BOOT_SIZE=24576         # size of the boot disk
     37EXTRA_SPACE=80152       # increase if you run out of ramdisk space
     38BOOT_SIZE=32768         # size of the boot disk
    3939
    4040PROMPT_MAKE_CD_IMAGE="yes"
     
    6060
    6161# 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"
     62IDE_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"
    6363PCMCIA_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"
     64USB_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"
     65NET_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"
    6666CDROM_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"
    6767# 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-rdac 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"
     68EXTRA_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"
    6969# Replace with that line for HP OCMP e.g.
    7070#DENY_MODS="MPS_Driver_Mapper mps octtldrv tscttl streams kqemu fdomain"
     
    378378        echo -e "$DONE"
    379379        return 0
     380    elif [ -e "/etc/rc.conf" ] ; then
     381        echo "ArchLinux config detected." >> $LOGFILE
     382        keyfile=/etc/rc.conf
    380383    elif [ -e "/etc/conf.d/keymaps" ] ; then
    381384        LogFile "Gentoo-style config detected."
     
    398401    locale=`grep -F KEYTABLE "$keyfile" | tr -d '"' |cut -d'=' -f2`
    399402    [ ! "$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
    401404    LogFile "locale=$locale"
    402405    #
     
    15801583    if [ -x "/bin/lsb_release" ]; then
    15811584        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`
    15821596    elif [ -x "/usr/bin/pbdistrocheck" ]; then
    15831597        # For pb >= 0.9.8
    1584         DESC=`/usr/bin/pbdistrocheck -d`
     1598        DESC=`/usr/bin/pbdistrocheck -s | cut -d, -f1-4`
    15851599    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"
    15901601    fi
    15911602    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/"
     
    17601771        LogAll "Please unload some of your modules and try again."
    17611772        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"
    17631774        retval=$(($retval+1))
    17641775    fi
     
    26842695        export MONDO_SHARE=""
    26852696        MindiExit $?
     2697    elif [ "$1" = "--makemessage" ] ; then
     2698        MakeMessageFile
     2699        MindiExit 0
    26862700    elif [ "$1" = "--makemountlist" ] ; then
    26872701        [ ! "$2" ] && Die "Please specify the output file"
  • branches/2.2.10/mindi/mindi.conf

    r2460 r2816  
    55#
    66# 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  
    1616    echo "Date: `date`" >> $LOGFILE
    1717    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
    1822fi
    1923
     
    2630
    2731if [ "$#" = "1" ] ; then
    28     echo -e "$currdate $1" >> $LOGFILE
     32    echo -e "$currdate $1" >> $LOGFILE
    2933elif [ "$#" = "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
    4458    fi
    45     else
    46     LogIt "LogIt '$1' '$2' .. unknown 2nd param"
    47         exit 1
    48     fi
    4959else
    50     LogIt "LogIt '$1' .. silly params"
    51     exit 1
     60    LogIt "LogIt '$1' .. silly params"
     61    exit 1
    5262fi
    5363
  • branches/2.2.10/mindi/rootfs/sbin/find-and-mount-cdrom

    r2591 r2816  
    7575fi
    7676[ "$1" = "--second-try" ] && exit 1;
    77 if [ -f $MINDI_CACHE/mondorestore.cfg ] && [ "`grep "using-cdstream yes" $MINDI_CACHE/mondorestore.cfg 2 > /dev/null`" ] ; then
     77if [ -f $MINDI_CACHE/mondorestore.cfg ] && [ "`grep "using-cdstream yes" $MINDI_CACHE/mondorestore.cfg 2> /dev/null`" ] ; then
    7878    LogIt "Because you are using cdstream, I won't try to mount CD."
    7979    exit 0
  • branches/2.2.10/mindi/rootfs/sbin/hack-cfg-if-necessary

    r2603 r2816  
    1919    grep -q "backup-media-type iso" $MINDI_CACHE/mondorestore.cfg 2> /dev/null
    2020    if [ $? -ne 0 ] ; then
    21         LogIt "Config file is fine, BTW."
     21        LogIt "Config file is fine, BTW."
    2222        exit 0
    2323    fi
  • branches/2.2.10/mindi/rootfs/sbin/init

    r2696 r2816  
    7575
    7676LaunchTerminals() {
    77     openvt -l /bin/sh
    78     openvt -l /bin/sh
    79     openvt -l /bin/sh
    80     openvt -l /bin/sh
    81     openvt -l /bin/sh
    82     openvt -l /bin/sh /sbin/wait-for-petris
    83     openvt -l /usr/bin/tail -f $LOGFILE
     77    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
    8484    serial="/foo"
    8585    # By default first serial line is configured as tty
     
    103103        loadkeys $fname
    104104    else
    105         LogIt "Using default keyboard map." 1
     105        LogIt "Using default US keyboard map." 1
    106106    fi
    107107}
     
    666666}
    667667
     668UdevadmTrigger() {
     669if [ -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
     676fi
     677}
     678
    668679ExtractDataDisksAndLoadModules() {
    669680    echo "Installing additional tools ..."
     
    678689    # (useful for rules creating network ifcfg files)
    679690    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
    689692    fi
    690693}
     
    884887LogIt "-------------"
    885888fdisk -l  >> $LOGFILE
     889LogIt "-------------"
     890LogIt "/tmp/mondo-restore.cfg result:" >> $LOGFILE
     891LogIt "-------------"
     892cat /tmp/mondo-restore.cfg  >> $LOGFILE
    886893
    887894ide-opt
     
    890897if [ "$USE_UDEV" = "yes" ]; then
    891898    if [ -x /sbin/udevadm ]; then
    892         /sbin/udevadm trigger --retry-failed
     899        UdevadmTrigger
    893900    fi
    894901
  • branches/2.2.10/mondo-doc/mondoarchive.8

    r2715 r2816  
    355355
    356356.TP
     357.BI "-v "
     358Gives mondoarchive version.
     359
     360.TP
    357361.BI "-z "
    358362Use extended attributes and acl for each file and store them in the
  • branches/2.2.10/mondo/src/common/libmondo-cli.c

    r2715 r2816  
    4545
    4646/* Do we use extended attributes and acl ?
    47  * By default no, use --acl & --attr options to force their usage */
     47 * By default no, use -z option to force their usage */
    4848extern char *g_getfacl;
    4949extern char *g_getfattr;
  • branches/2.2.10/mondo/src/common/libmondo-devices.c

    r2715 r2816  
    3737/*@unused@*/
    3838//static char cvsid[] = "$Id$";
     39//
     40
     41extern char *which_compression_type();
     42/* Do we use extended attributes and acl ?  */
     43extern char *g_getfacl;
     44extern char *g_getfattr;
    3945
    4046extern int g_current_media_number;
     
    12831289{
    12841290char *mount_cmd = NULL;
     1291char *mountdir = NULL;
    12851292int i, res;
    12861293#ifdef __FreeBSD__
     
    13261333
    13271334    } else if (bkpinfo->backup_media_type == iso) {
     1335        if (bkpinfo->subdir) {
     1336            mr_asprintf(mountdir, "%s/%s", bkpinfo->isodir, bkpinfo->subdir);
     1337        } else {
     1338            mr_asprintf(mountdir, "%s", bkpinfo->isodir);
     1339        }
    13281340#ifdef __FreeBSD__
    1329         mr_sprintf(mount_cmd, "%s/%s-%d.iso", bkpinfo->isodir,
    1330             bkpinfo->prefix, g_current_media_number);
     1341        mr_asprintf(mount_cmd, "%s/%s-%d.iso", mountdir, bkpinfo->prefix, g_current_media_number);
    13311342        mddev = make_vn(mount_cmd);
    13321343        mr_free(mount_cmd);
     
    13341345        mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", mddev, MNT_CDROM);
    13351346#else
    1336         mr_asprintf(mount_cmd, "mount %s/%s-%d.iso -t iso9660 -o loop,ro %s", bkpinfo->isodir, bkpinfo->prefix, g_current_media_number, MNT_CDROM);
    1337 #endif
     1347        mr_asprintf(mount_cmd, "mount %s/%s-%d.iso -t iso9660 -o loop,ro %s", mountdir, bkpinfo->prefix, g_current_media_number, MNT_CDROM);
     1348#endif
     1349        mr_free(mountdir);
    13381350    } else if (bkpinfo->backup_media_type == usb) {
    13391351        mr_asprintf(mount_cmd, "mount -t vfat %s %s", bkpinfo->media_device, MNT_CDROM);
     
    19841996char *tmp1 = NULL;
    19851997
     1998if (pathlist == NULL) {
     1999    return;
     2000}
    19862001while ((token = mr_strtok(pathlist, token_chars, &lastpos)) != NULL) {
    19872002    switch (get_dsf_mount_list(token, &mounted_on_dsf, &not_mounted_on_dsf)) {
     
    26142629    char *command = NULL;
    26152630    char *comment = NULL;
     2631    char *compression_type = NULL;
    26162632    int i;
    26172633    FILE *fin;
     
    26572673                }
    26582674            }
     2675            if ((compression_type = which_compression_type()) == NULL) {
     2676                log_to_screen("User has chosen not to backup the PC");
     2677                finish(1);
     2678            }
     2679
    26592680            if ((bkpinfo->compression_level = which_compression_level()) == -1) {
    26602681                log_to_screen("User has chosen not to backup the PC");
     
    28402861        }
    28412862        if (archiving_to_media) {
    2842             if ((bkpinfo->compression_level =
    2843                  which_compression_level()) == -1) {
     2863            if ((compression_type = which_compression_type()) == NULL) {
     2864                log_to_screen("User has chosen not to backup the PC");
     2865                finish(1);
     2866            }
     2867            if ((bkpinfo->compression_level = which_compression_level()) == -1) {
    28442868                log_to_screen("User has chosen not to backup the PC");
    28452869                finish(1);
     
    28762900            bkpinfo->netfs_mount = p;
    28772901            if (!bkpinfo->restore_data) {
    2878                 if ((bkpinfo->compression_level =
    2879                      which_compression_level()) == -1) {
     2902                if ((compression_type = which_compression_type()) == NULL) {
     2903                    log_to_screen("User has chosen not to backup the PC");
     2904                    finish(1);
     2905                }
     2906
     2907                if ((bkpinfo->compression_level = which_compression_level()) == -1) {
    28802908                    log_to_screen("User has chosen not to backup the PC");
    28812909                    finish(1);
     
    30043032
    30053033            if (archiving_to_media) {
    3006                 if ((bkpinfo->compression_level =
    3007                      which_compression_level()) == -1) {
     3034                if ((compression_type = which_compression_type()) == NULL) {
     3035                    log_to_screen("User has chosen not to backup the PC");
     3036                    finish(1);
     3037                }
     3038                if ((bkpinfo->compression_level = which_compression_level()) == -1) {
    30083039                    log_to_screen("User has chosen not to backup the PC");
    30093040                    finish(1);
     
    31193150
    31203151
    3121         p = popup_and_get_string("Exclude paths", "Please enter paths which you do NOT want to backup. Separate them with pipes. NB: /tmp and /proc are always excluded. :-) Just hit 'Enter' if you want to do a full system backup.", bkpinfo->exclude_paths);
     3152        p = popup_and_get_string("Exclude paths", "Please enter paths which you do NOT want to backup. Separate them with '|'. NB: /tmp and /proc are always excluded. :-) Just hit 'Enter' if you want to do a full system backup.", bkpinfo->exclude_paths);
    31223153        if (p == NULL) {
    31233154            log_to_screen("User has chosen not to backup the PC");
     
    31453176        bkpinfo->scratchdir = p;
    31463177
     3178        if (ask_me_yes_or_no("Do you want to backup extended attributes?")) {
     3179            if (find_home_of_exe("getfattr")) {
     3180                mr_free(g_getfattr);
     3181                mr_asprintf(g_getfattr,"getfattr");
     3182            }
     3183            if (find_home_of_exe("getfacl")) {
     3184                mr_free(g_getfacl);
     3185                mr_asprintf(g_getfacl,"getfacl");
     3186            }
     3187        }
    31473188// Interactive mode:
    31483189#ifdef __IA64__
     
    31523193#endif
    31533194        bkpinfo->backup_data = TRUE;
     3195
     3196        mr_free(bkpinfo->zip_exe);
     3197        mr_free(bkpinfo->zip_suffix);
     3198        if (strcmp(compression_type,"lzo") == 0) {
     3199            mr_asprintf(bkpinfo->zip_exe, "lzop");
     3200            mr_asprintf(bkpinfo->zip_suffix, "lzo");
     3201        } else if (strcmp(compression_type,"gzip") == 0) {
     3202            mr_asprintf(bkpinfo->zip_exe, "gzip");
     3203            mr_asprintf(bkpinfo->zip_suffix, "gz");
     3204        } else if (strcmp(compression_type,"lzma") == 0) {
     3205            mr_asprintf(bkpinfo->zip_exe, "xy");
     3206            mr_asprintf(bkpinfo->zip_suffix, "xy");
     3207        } else if (strcmp(compression_type,"bzip2") == 0) {
     3208            mr_asprintf(bkpinfo->zip_exe, "bzip2");
     3209            mr_asprintf(bkpinfo->zip_suffix, "bz2");
     3210        } else {
     3211            bkpinfo->zip_exe = NULL;
     3212            bkpinfo->zip_suffix = NULL;
     3213        }
    31543214        bkpinfo->verify_data =
    31553215            ask_me_yes_or_no
     
    31643224        bkpinfo->restore_data = TRUE;   // probably...
    31653225    }
     3226    mr_free(compression_type);
    31663227
    31673228    if (bkpinfo->backup_media_type == iso
     
    32293290
    32303291
    3231 
    3232 
    32333292/* @} - end of deviceGroup */
  • branches/2.2.10/mondo/src/common/libmondo-filelist.c

    r2715 r2816  
    14051405                last_time = this_time;
    14061406                if (!g_text_mode) {
    1407                     mr_asprintf(tmp, "Reading %-68s", dir1);
     1407                    int cols, rows;
     1408                    newtGetScreenSize(&cols, &rows);
     1409                    mr_asprintf(tmp, "Reading %-*s", cols, dir1);
    14081410                    newtDrawRootText(0, g_noof_rows - 3, tmp);
    14091411                    mr_free(tmp);
  • branches/2.2.10/mondo/src/common/libmondo-mountlist.c

    r2696 r2816  
    410410
    411411    if (physical_drive_size < 0) {
    412         mr_asprintf(tmp, " %s does not exist.", drive);
    413         log_it(tmp);
    414         mr_strcat(flaws_str, "%s", tmp);
    415         res++;
    416         mr_free(tmp);
    417         return(flaws_str);
     412        if (strstr(drive,"/dev/dm-") == NULL) {
     413            mr_asprintf(tmp, " %s does not exist.", drive);
     414            log_it(tmp);
     415            mr_strcat(flaws_str, "%s", tmp);
     416            res++;
     417            mr_free(tmp);
     418            return(flaws_str);
     419        } else {
     420            log_it(" %s (dm) will be setup later on", drive);
     421        }
    418422    } else {
    419423        log_it("%s is %ld MB", drive, physical_drive_size);
    420         mr_free(tmp);
    421424    }
    422425
  • branches/2.2.10/mondo/src/common/libmondo-tools.c

    r2704 r2816  
    757757    mr_free(bkpinfo->netfs_proto);
    758758    mr_free(bkpinfo->postnuke_tarball);
     759    mr_free(bkpinfo->subdir);
    759760
    760761    /* Then free the structure */
     
    821822    bkpinfo->netfs_proto = NULL;
    822823    bkpinfo->postnuke_tarball = NULL;
     824    bkpinfo->subdir = NULL;
    823825    bkpinfo->wipe_media_first = FALSE;
    824826    bkpinfo->differential = 0;
     
    938940#endif
    939941    retval += whine_if_not_found(MKE2FS_OR_NEWFS);
    940     retval += whine_if_not_found("mkisofs");
    941     if (system("which dvdrecord > /dev/null 2> /dev/null")) {
     942    if (system("which genisoimage > /dev/null 2> /dev/null")) {
     943        retval += whine_if_not_found("mkisofs");
     944    }
     945    if (system("which wodim > /dev/null 2> /dev/null")) {
    942946        retval += whine_if_not_found("cdrecord");
    943947    }
  • branches/2.2.10/mondo/src/common/mondostructures.h

    r2508 r2816  
    579579   */
    580580    char *netfs_user;
     581
     582  /**
     583   * The potential subdirectory under which are located ISO images on HDD (restore mode only)
     584   */
     585    char *subdir;
    581586
    582587  /**
  • branches/2.2.10/mondo/src/common/newt-specific.c

    r2703 r2816  
    399399        /* Free all allocated strings in bkpinfo */
    400400        mr_free_bkpinfo();
     401
    401402        free_libmondo_global_strings();
    402403        free_newt_stuff();
     
    12091210
    12101211/**
     1212 * Ask the user which compression type they would like to use.
     1213 * The choices are "bzip2", "gzip", "lzo". NULL for exit
     1214 */
     1215    char *which_compression_type() {
     1216
     1217        /*@ char ************************************************************ */
     1218        char *output = NULL;
     1219
     1220
     1221        /*@ newt ************************************************************ */
     1222
     1223        newtComponent b1;
     1224        newtComponent b2;
     1225        newtComponent b3;
     1226        //newtComponent b4;
     1227        newtComponent b5;
     1228        newtComponent b_res;
     1229        newtComponent myForm;
     1230
     1231        newtDrawRootText(18, 0, WELCOME_STRING);
     1232        newtPushHelpLine
     1233            ("   Please specify the type of compression that you want.");
     1234        newtCenteredWindow(34, 13, "Type of compression?");
     1235        b1 = newtButton(4, 1, "bzip2");
     1236        b2 = newtButton(18, 1, "gzip");
     1237        b3 = newtButton(4, 5, "lzo");
     1238        //b4 = newtButton(18, 5, "lzma");
     1239        b5 = newtButton(4, 9, "         Exit        ");
     1240        myForm = newtForm(NULL, NULL, 0);
     1241        newtFormAddComponents(myForm, b1, b3, b2, b5, NULL);
     1242        b_res = newtRunForm(myForm);
     1243        newtFormDestroy(myForm);
     1244        newtPopWindow();
     1245        if (b_res == b1) {
     1246            mr_asprintf(output, "%s", "bzip2");
     1247        } else if (b_res == b2) {
     1248            mr_asprintf(output, "%s", "gzip");
     1249        } else if (b_res == b3) {
     1250            mr_asprintf(output, "%s", "lzo");
     1251        } else if (b_res == b4) {
     1252            mr_asprintf(output, "%s", "lzma");
     1253        }
     1254        newtPopHelpLine();
     1255        return(output);
     1256    }
     1257
     1258
     1259/**
    12111260 * Ask the user how much compression they would like to use.
    12121261 * The choices are "None" (0), "Minimum" (1), "Average" (4), and "Maximum" (9).
  • branches/2.2.10/mondo/src/include/mr_conf.h

    r2208 r2816  
    5959    /* Default compression level */
    6060    int compression_level;
     61    /* Subdir for ISO images on HDD */
     62    char *subdir;
    6163    /* Paths to exclude from backup */
    6264    char *exclude_paths;
  • branches/2.2.10/mondo/src/mondorestore/Makefile.am

    r2209 r2816  
    1414sbin_PROGRAMS         = mondorestore
    1515mondorestore_SOURCES  = mondo-prep.c mondorestore.c mondo-rstr-newt.c \
    16                         mondo-rstr-compare.c mondo-rstr-tools.c
     16                        mondo-rstr-compare.c mondo-rstr-tools.c ../common/newt-specific.c
    1717mondorestore_LDADD    = ${top_builddir}/src/common/libmondo.a ${top_builddir}/src/lib/libmr.a @MONDORESTORE_STATIC@
  • branches/2.2.10/mondo/src/mondorestore/mondo-prep.c

    r2704 r2816  
    466466        {
    467467            if (!does_file_exist("/etc/raidtab")) {
    468                 log_to_screen
    469                     ("Cannot find /etc/raidtab - cannot extrapolate the fdisk entries");
     468                log_to_screen("Cannot find /etc/raidtab - cannot extrapolate the fdisk entries");
    470469                finish(1);
    471470            }
     
    690689        if (!vinum_started_yet) {
    691690            if (!does_file_exist("/tmp/raidconf.txt")) {
    692                 log_to_screen
    693                     ("/tmp/raidconf.txt does not exist. I therefore cannot start Vinum.");
     691                log_to_screen("/tmp/raidconf.txt does not exist. I therefore cannot start Vinum.");
    694692            } else {
    695693                int res;
     
    698696                    ("vinum create /tmp/raidconf.txt", TRUE);
    699697                if (res) {
    700                     log_to_screen
    701                         ("`vinum create /tmp/raidconf.txt' returned errors. Please fix them and re-run mondorestore.");
     698                    log_to_screen("`vinum create /tmp/raidconf.txt' returned errors. Please fix them and re-run mondorestore.");
    702699                    finish(1);
    703700                }
     
    757754        }
    758755#else
    759         log_to_screen(tmp, "Initializing RAID device %s", device);
    760         log_to_screen(tmp);
    761         mr_free(tmp);
     756        log_to_screen("Initializing RAID device %s", device);
    762757
    763758// Shouldn't be necessary.
     
    808803    mr_asprintf(tmp, "Formatting %s as %s", device, format);
    809804    update_progress_form(tmp);
    810     mr_free(tmp);
    811805
    812806    res = run_program_and_log_output(program, FALSE);
     
    1005999    if (retval) {
    10061000        mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
    1007         log_to_screen
    1008             ("Errors occurred during the formatting of your hard drives.");
     1001        log_to_screen("Errors occurred during the formatting of your hard drives.");
    10091002    } else {
    10101003        mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     
    10161009        if (retval > 0 && !interactively) {
    10171010//123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
    1018             log_to_screen
    1019                 ("Partition table locked up %d times. At least one 'mkfs' (format) command",
    1020                  g_partition_table_locked_up);
    1021             log_to_screen
    1022                 ("failed. I think these two events are related. Sometimes, fdisk's ioctl() call");
    1023             log_to_screen
    1024                 ("to refresh its copy of the partition table causes the kernel to lock the ");
    1025             log_to_screen
    1026                 ("partition table. I believe this has just happened.");
    1027             if (ask_me_yes_or_no
    1028                 ("Please choose 'yes' to reboot and try again; or 'no' to ignore this warning and continue."))
    1029             {
     1011            log_to_screen("Partition table locked up %d times. At least one 'mkfs' (format) command", g_partition_table_locked_up);
     1012            log_to_screen("failed. I think these two events are related. Sometimes, fdisk's ioctl() call");
     1013            log_to_screen("to refresh its copy of the partition table causes the kernel to lock the ");
     1014            log_to_screen("partition table. I believe this has just happened.");
     1015            if (ask_me_yes_or_no("Please choose 'yes' to reboot and try again; or 'no' to ignore this warning and continue.")) {
    10301016                sync();
    10311017                sync();
     
    10341020            }
    10351021        } else {
    1036             log_to_screen
    1037                 ("Partition table locked up %d time%c. However, disk formatting succeeded.",
    1038                  g_partition_table_locked_up,
    1039                  (g_partition_table_locked_up == 1) ? '.' : 's');
     1022            log_to_screen("Partition table locked up %d time%c. However, disk formatting succeeded.", g_partition_table_locked_up, (g_partition_table_locked_up == 1) ? '.' : 's');
    10401023        }
    10411024    }
     
    14621445                    mr_asprintf(command, "disklabel -B %s", basename(drivename));
    14631446                    if (system(command)) {
    1464                         log_to_screen
    1465                             ("Warning! Unable to make the drive bootable.");
     1447                        log_to_screen("Warning! Unable to make the drive bootable.");
    14661448                    }
    14671449                    mr_free(command);
     
    15501532#ifndef __IA64__
    15511533        if (current_devno == 5 && previous_devno == 4) {
    1552             log_to_screen
    1553                 ("You must leave at least one partition spare as the Extended partition.");
     1534            log_to_screen("You must leave at least one partition spare as the Extended partition.");
    15541535            mr_free(device_str);
    15551536            mr_free(format);
     
    15661547            retval += label_drive_or_slice(mountlist, device_str, 0);
    15671548            if (system(tmp)) {
    1568                 log_to_screen
    1569                     ("Warning! Unable to make the slice bootable.");
     1549                log_to_screen("Warning! Unable to make the slice bootable.");
    15701550            }
    15711551            mr_free(tmp);
     
    16111591
    16121592        if (g_partition_table_locked_up > 0) {
    1613             log_to_screen
    1614                 ("A flaw in the Linux kernel has locked the partition table. Even calling partprobe did not suceed :-(");
     1593            log_to_screen("A flaw in the Linux kernel has locked the partition table. Even calling partprobe did not suceed :-(");
    16151594        }
    16161595    }
     
    18751854    if (retval) {
    18761855        mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
    1877         log_to_screen
    1878             ("Errors occurred during the partitioning of your hard drives.");
     1856        log_to_screen("Errors occurred during the partitioning of your hard drives.");
    18791857    } else {
    18801858        mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     
    23112289
    23122290    /** float ***********************************************************/
    2313     float factor;
    2314     float new_size;
    2315 //  float newcylinderno;
     2291    long long factor;
     2292    long long new_size;
    23162293
    23172294    /** long *************************************************************/
    2318     long newsizL = 0L;
    2319     long current_size_of_drive = 0L;
    2320     long original_size_of_drive = 0L;
    2321     long final_size = 0L;           /* all in Megabytes */
     2295    long long newsizL = 0LL;
     2296    long long totalsizL = 0LL;
     2297    long long current_size_of_drive = 0LL;  /* use KB interally for precision */
     2298    long long original_size_of_drive = 0LL; /* use KB interally for precision */
    23222299    struct mountlist_reference *drivemntlist;
    23232300
     
    23362313    }
    23372314
    2338     current_size_of_drive = get_phys_size_of_drive(drive_name);
    2339 
    2340     if (current_size_of_drive <= 0) {
     2315    current_size_of_drive = (long long) get_phys_size_of_drive(drive_name) * 1024LL;
     2316
     2317    if (current_size_of_drive <= 0LL) {
    23412318        log_it("Not resizing to match %s - can't find drive", drive_name);
    23422319        return;
    23432320    }
    2344     log_to_screen("Expanding entries to suit drive %s (%ld MB)", drive_name, current_size_of_drive);
     2321    log_to_screen("Expanding entries to suit drive %s (%lld MB)", drive_name, current_size_of_drive / 1024);
    23452322
    23462323    drivemntlist = malloc(sizeof(struct mountlist_reference));
     
    23542331
    23552332    for (partno = 0; partno < drivemntlist->entries; partno++) {
    2356         if (drivemntlist->el[partno]->size > 0) {
    2357             original_size_of_drive += (drivemntlist->el[partno]->size / 1024L);
     2333        if (drivemntlist->el[partno]->size > 0LL) {
     2334            /* Keep KB here */
     2335            original_size_of_drive += drivemntlist->el[partno]->size;
    23582336        }
    23592337    }
     
    23632341        return;
    23642342    }
    2365     factor = (float) (current_size_of_drive) / (float) (original_size_of_drive);
    2366     log_to_screen("Disk %s was %ld MB; is now %ld MB; factor = %f", drive_name, original_size_of_drive, current_size_of_drive, factor);
     2343    factor = (current_size_of_drive) / (original_size_of_drive);
     2344    log_to_screen("Disk %s was %lld MB; is now %lld MB; Proportionally resizing partitions (factor ~= %lld)", drive_name, original_size_of_drive/1024, current_size_of_drive/1024, factor);
    23672345
    23682346    lastpart = drivemntlist->entries - 1;
     
    23702348        /* the 'atoi' thing is to make sure we don't try to resize _images_, whose formats will be numeric */
    23712349        if (!atoi(drivemntlist->el[partno]->format)) {
    2372             new_size = (float) (drivemntlist->el[partno]->size) * factor;
     2350            new_size = (drivemntlist->el[partno]->size) * factor;
    23732351        } else {
    23742352            new_size = drivemntlist->el[partno]->size;
     
    23792357                    drivemntlist->el[partno]->device,
    23802358                    drivemntlist->el[partno]->mountpoint);
    2381             newsizL = (long) new_size;  // It looks wrong but it's not
    2382         } else {
    2383             newsizL = (long) new_size;
    2384         }
     2359        }
     2360        newsizL = new_size;
    23852361
    23862362        /* Do not apply the factor if partition was of negative size */
    2387         if (newsizL < 0) {
     2363        if (newsizL < 0LL) {
    23882364            newsizL = drivemntlist->el[partno]->size;
    23892365        }
    2390 
    2391         log_to_screen("Changing %s from %lld KB to %ld KB", drivemntlist->el[partno]->device, drivemntlist->el[partno]->size, newsizL);
     2366        totalsizL += newsizL;
     2367
     2368        log_to_screen("Changing %s from %lld KB to %lld KB", drivemntlist->el[partno]->device, drivemntlist->el[partno]->size, newsizL);
    23922369        drivemntlist->el[partno]->size = newsizL;
    23932370    }
    2394     final_size = get_phys_size_of_drive(drive_name);
    2395     log_to_screen("final_size = %ld MB", final_size);
     2371    // Ensures over-allocation alert and prompt for interactive mode does not happen
     2372    if (totalsizL > current_size_of_drive) {
     2373        log_to_screen("Last partition size calculated would be over-allocated, reducing %s from %lld KB to %lld KB.", drivemntlist->el[lastpart]->device, drivemntlist->el[lastpart]->size, drivemntlist->el[lastpart]->size - (totalsizL - current_size_of_drive));
     2374        drivemntlist->el[drivemntlist->entries-1]->size -= (totalsizL - current_size_of_drive);
     2375    } else if (totalsizL < current_size_of_drive) {
     2376        log_to_screen("Last partition size calculated would be under-allocated, increasing %s from %lld KB to %lld KB.",drivemntlist->el[lastpart]->device, drivemntlist->el[lastpart]->size, drivemntlist->el[lastpart]->size + (current_size_of_drive - totalsizL));
     2377        drivemntlist->el[drivemntlist->entries-1]->size += (current_size_of_drive - totalsizL);
     2378    }
     2379    log_to_screen("final_size = %lld MB", current_size_of_drive / 1024);
    23962380}
    23972381
  • branches/2.2.10/mondo/src/mondorestore/mondo-rstr-newt.c

    r2512 r2816  
    1616//static char cvsid[] = "$Id$";
    1717
     18extern bool popup_with_buttons(char *p, char *button1, char *button2);
    1819extern char err_log_lines[NOOF_ERR_LINES][MAX_STR_LEN];
    1920
     
    22682269 * @return TRUE if OK was pressed, FALSE otherwise.
    22692270 */
    2270 bool get_isodir_info(char *isodir_device, char *isodir_format, char *isodir_path, bool nuke_me_please) {
     2271bool get_isodir_info(char *isodir_device, char *isodir_format, char *isodir_path, char *subdir_path, bool nuke_me_please) {
    22712272
    22722273    char *p = NULL;
    22732274    char *q = NULL;
    22742275    char *r = NULL;
     2276    char *s = NULL;
    22752277    char *idev = NULL;
    22762278    bool ret = FALSE;       /* Should be false by default, and modfiy if conditions respected */
    2277 
     2279    bool HDD = FALSE;
    22782280    /** initialize ********************************************************/
    22792281
     
    23032305        p = popup_and_get_string("ISO Mode - device", "On what device do the ISO files live?", idev);
    23042306        if (p != NULL) {
     2307            if (popup_with_buttons("Are you restoring from an external hard drive ?", "Yes", "No")) {
     2308                HDD = TRUE;
     2309            }
    23052310            q = popup_and_get_string("ISO Mode - format", "What is the disk format of the device? (Hit ENTER if you don't know.)", isodir_format);
    23062311            mr_free(isodir_format);
     
    23232328   
    23242329                    ret = TRUE;
     2330                }
     2331                if (HDD) {
     2332                    /*  We need an additional param */
     2333                    subdir_path = isodir_path;
     2334                    mr_asprintf(isodir_path, "/tmp/isodir");
    23252335                }
    23262336            }
  • branches/2.2.10/mondo/src/mondorestore/mondo-rstr-newt.h

    r2508 r2816  
    141141int find_next_free_index_in_disklist(struct list_of_disks *);
    142142int find_raid_device_in_raidlist(struct raidlist_itself *, char *);
    143 bool get_isodir_info(char *, char *, char *, bool);
     143bool get_isodir_info(char *, char *, char *, char *, bool);
    144144void initiate_new_raidlist_entry(struct raidlist_itself *,
    145145                                 struct mountlist_itself *, int, char *);
  • branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c

    r2704 r2816  
    201201
    202202/* g_isodir_device is passed and modified in this function - memory is managed correctly in it */
    203 if (!get_isodir_info(g_isodir_device, isodir_format, bkpinfo->isodir, nuke_me_please)) {
     203if (!get_isodir_info(g_isodir_device, isodir_format, bkpinfo->isodir, bkpinfo->subdir, nuke_me_please)) {
    204204    mr_free(isodir_format);
    205205    return (1);
     
    12131213        ("You will now be able to re-generate your initrd.\nThis is especially useful if you changed of hardware configuration, cloned, made P2V, used multipath...\nDo you need to do it ?")) {
    12141214        log_msg(1,"Launching shell for manual initrd recreation");
    1215         popup_and_OK("You'll now be chrooted under your future / partition.\nGo under /boot and rebuild your initrd with\nmkinitrd -f -v initrd-2.x.y.img 2.x.y e.g.\nThen type exit to finish.");
     1215        if (does_file_exist(MNT_RESTORING"/etc/arch-release")) {
     1216            popup_and_OK("You'll now be chrooted under your future / partition.\nEdit /etc/mkinitcpio.conf if needed and rebuild your initrd with the kernel preset name e.g.\nmkinitcpio -p kernel26\nThen type exit to finish.\n");
     1217        } else {
     1218            popup_and_OK("You'll now be chrooted under your future / partition.\nGo under /boot and rebuild your initrd with\nmkinitrd -f -v initrd-2.x.y.img 2.x.y e.g.\nThen type exit to finish.");
     1219        }
    12161220        mvaddstr_and_log_it(g_currentY, 0, "Modifying initrd...");
    12171221        if (!g_text_mode) {
  • branches/2.2.10/mondo/src/mondorestore/mondorestore.c

    r2704 r2816  
    838838                        "Using tune2fs to identify your ext2,3 partitions");
    839839
    840     mr_asprintf(tmp, "label-partitions-as-necessary %s < /tmp/fstab", MINDI_CACHE"/mountlist.txt");
     840    mr_asprintf(tmp, "label-partitions-as-necessary %s < /tmp/fstab >> %s 2>> %s", g_mountlist_fname, fstab_fname, MONDO_LOGFILE, MONDO_LOGFILE);
    841841    res = run_program_and_log_output(tmp, TRUE);
    842842    mr_free(tmp);
  • branches/2.2.10/mondo/src/mondorestore/mr-externs.h

    r2704 r2816  
    3232extern void free_filelist(struct s_node *);
    3333extern long get_time(void);
    34 extern bool get_isodir_info(char *, char *, char *, bool);
     34extern bool get_isodir_info(char *, char *, char *, char *, bool);
    3535extern void fatal_error(char *);
    3636extern void initialize_raid_record(struct raid_device_record *);
  • branches/2.2.10/website/docs.shtml

    r2696 r2816  
    6262          <li>A Mondo Rescue <a href="/docs/mondo-intro.pdf" target="_blank">introduction</a> (in French) made by Gallig Renaud.
    6363          <li>A Mondo Rescue <a href="http://trac.mondorescue.org/browser/devel/mondo-doc/mondo-presentation.odp" target="_blank">presentation</a> made by Bruno Cornec. (Older versions also available: <a href="/docs/mondo-presentation-v1.pdf" target="_blank">v1</a>,<a href="/docs/mondo-presentation-v2.pdf" target="_blank">v2</a>)
    64           <li>A mondoarchive <a href="/docs/mondo-ref-card.pdf" target="_blank">reference card</a> made by Lester Wade..
     64          <li>A mondoarchive <a href="/docs/mondo-ref-card.pdf" target="_blank">reference card</a> made by Lester Wade.
    6565          <li><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a> <span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/Text" property="dc:title" rel="dc:type"><a href="http://www.mondorescue.org/docs/p2v.pdf">Linux P2V migrations using MondoRescue</a></span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://opensource.hp.com" property="cc:attributionName" rel="cc:attributionURL">Lester Wade</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dc="http://purl.org/dc/elements/1.1/" href="/docs/p2v.odt" rel="dc:source">trac.mondorescue.org</a>.
    6666          <li>A now obsoleted by the previous Mondo Rescue hardware migration (including P2V with VMWare) <a href="/docs/hwmigration.pdf" target="_blank">guide</a> made by Gallig Renaud, Eric Montaut and François-Xavier Horel. (<a href="/docs/HOWTO-_Deploy_Linux_from_SCSI_to_SATA.pdf" target="_blank">previous version</a>)
  • branches/2.2.10/website/downloads.shtml

    r2635 r2816  
    121121<ul>
    122122        <li>RedHat <a href="ftp://ftp.mondorescue.org/redhat/7.3">7.3</a>, <a href="ftp://ftp.mondorescue.org/redhat/9">9</a>.</li>
    123         <li>Fedora <a href="ftp://ftp.mondorescue.org/fedora/4">Core 4</a>, <a href="ftp://ftp.mondorescue.org/fedora/5">Core 5</a>, <a href="ftp://ftp.mondorescue.org/fedora/6">Core 6</a>, <a href="ftp://ftp.mondorescue.org/fedora/7">7</a>, <a href="ftp://ftp.mondorescue.org/fedora/8">8</a>, <a href="ftp://ftp.mondorescue.org/fedora/9">9</a>, <a href="ftp://ftp.mondorescue.org/fedora/10">10</a>, <a href="ftp://ftp.mondorescue.org/fedora/11">11</a>, <a href="ftp://ftp.mondorescue.org/fedora/12">12</a>.</li>
    124         <li>RedHat Enterprise Linux <a href="ftp://ftp.mondorescue.org/rhel/2.1">2.1</a>, <a href="ftp://ftp.mondorescue.org/rhel/3">3</a>, <a href="ftp://ftp.mondorescue.org/rhel/4">4</a>, <a href="ftp://ftp.mondorescue.org/rhel/5">5</a>.</li>
    125         <li>Mandriva <a href="ftp://ftp.mondorescue.org/mandrake/10.1">10.1</a>, <a href="ftp://ftp.mondorescue.org/mandrake/10.2">10.2</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2006.0">2006.0</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2007.0">2007.0</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2007.1">2007.1</a>., <a href="ftp://ftp.mondorescue.org/mandriva/2008.0">2008.0</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2008.1">2008.1</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2009.0">2009.0</a>,  <a href="ftp://ftp.mondorescue.org/mandriva/2009.1">2009.1</a>,  <a href="ftp://ftp.mondorescue.org/mandriva/2010.0">2010.0</a></li>
    126         <li>OpenSuSE <a href="ftp://ftp.mondorescue.org/suse/10.0">10.0</a>, <a href="ftp://ftp.mondorescue.org/suse/10.1">10.1</a>, <a href="ftp://ftp.mondorescue.org/suse/10.2">10.2</a>, <a href="ftp://ftp.mondorescue.org/suse/10.3">10.3</a>, <a href="ftp://ftp.mondorescue.org/opensuse/11.0">11.0</a>, <a href="ftp://ftp.mondorescue.org/opensuse/11.1">11.1</a>, <a href="ftp://ftp.mondorescue.org/opensuse/11.2">11.2</a>. Look also at <a href="http://www.mikenjane.net/~mike/">this</a> web page for SuSE details. <a href="http://packman.links2linux.org/">Packman</a> may have some useful additional packages.
    127         <li>SuSE Linux Enterprise Server <a href="ftp://ftp.mondorescue.org/sles/9">9</a>, <a href="ftp://ftp.mondorescue.org/sles/10">10</a>.</li>
     123        <li>Fedora <a href="ftp://ftp.mondorescue.org/fedora/4">Core 4</a>, <a href="ftp://ftp.mondorescue.org/fedora/5">Core 5</a>, <a href="ftp://ftp.mondorescue.org/fedora/6">Core 6</a>, <a href="ftp://ftp.mondorescue.org/fedora/7">7</a>, <a href="ftp://ftp.mondorescue.org/fedora/8">8</a>, <a href="ftp://ftp.mondorescue.org/fedora/9">9</a>, <a href="ftp://ftp.mondorescue.org/fedora/10">10</a>, <a href="ftp://ftp.mondorescue.org/fedora/11">11</a>, <a href="ftp://ftp.mondorescue.org/fedora/12">12</a>, <a href="ftp://ftp.mondorescue.org/fedora/13">13</a>, <a href="ftp://ftp.mondorescue.org/fedora/14">14</a>.</li>
     124        <li>RedHat Enterprise Linux <a href="ftp://ftp.mondorescue.org/rhel/2.1">2.1</a>, <a href="ftp://ftp.mondorescue.org/rhel/3">3</a>, <a href="ftp://ftp.mondorescue.org/rhel/4">4</a>, <a href="ftp://ftp.mondorescue.org/rhel/5">5</a>, <a href="ftp://ftp.mondorescue.org/rhel/6">6</a>.</li>
     125        <li>Mandriva <a href="ftp://ftp.mondorescue.org/mandrake/10.1">10.1</a>, <a href="ftp://ftp.mondorescue.org/mandrake/10.2">10.2</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2006.0">2006.0</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2007.0">2007.0</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2007.1">2007.1</a>., <a href="ftp://ftp.mondorescue.org/mandriva/2008.0">2008.0</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2008.1">2008.1</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2009.0">2009.0</a>,  <a href="ftp://ftp.mondorescue.org/mandriva/2009.1">2009.1</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2010.0">2010.0</a>, <a href="ftp://ftp.mondorescue.org/mandriva/2010.1">2010.1</a>.</li>
     126        <li>OpenSuSE <a href="ftp://ftp.mondorescue.org/suse/10.0">10.0</a>, <a href="ftp://ftp.mondorescue.org/suse/10.1">10.1</a>, <a href="ftp://ftp.mondorescue.org/suse/10.2">10.2</a>, <a href="ftp://ftp.mondorescue.org/suse/10.3">10.3</a>, <a href="ftp://ftp.mondorescue.org/opensuse/11.0">11.0</a>, <a href="ftp://ftp.mondorescue.org/opensuse/11.1">11.1</a>, <a href="ftp://ftp.mondorescue.org/opensuse/11.2">11.2</a>, <a href="ftp://ftp.mondorescue.org/opensuse/11.4">11.4</a>, <a href="ftp://ftp.mondorescue.org/opensuse/11.4">11.4</a>. Look also at <a href="http://www.mikenjane.net/~mike/">this</a> web page for SuSE details. <a href="http://packman.links2linux.org/">Packman</a> may have some useful additional packages.
     127        <li>SuSE Linux Enterprise Server <a href="ftp://ftp.mondorescue.org/sles/9">9</a>, <a href="ftp://ftp.mondorescue.org/sles/10">10</a>, <a href="ftp://ftp.mondorescue.org/sles/11">11</a>.</li>
    128128        <li>Asianux <a href="ftp://ftp.mondorescue.org/asianux/2">2</a>, <a href="ftp://ftp.mondorescue.org/asianux/3">3</a>.</li>
    129         <li>Debian <a href="ftp://ftp.mondorescue.org/debian/3.1">3.1</a>, <a href="ftp://ftp.mondorescue.org/debian/4.0">4.0</a>, <a href="ftp://ftp.mondorescue.org/debian/5.0">5.0</a>. Look also at <a href="http://www.desknow.com/desknow/directfiles/aleidenfrost/mr-debs-unofficial/index.html">this</a> web page for Debian details.</li>
    130         <li>Ubuntu <a href="ftp://ftp.mondorescue.org/ubuntu/6.04">6.04</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/7.04">7.04</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/7.10">7.10</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/8.04">8.04</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/8.10">8.10</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/9.04">9.04</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/9.10">9.10</a>.</li>
     129        <li>Debian <a href="ftp://ftp.mondorescue.org/debian/3.1">3.1</a>, <a href="ftp://ftp.mondorescue.org/debian/4.0">4.0</a>, <a href="ftp://ftp.mondorescue.org/debian/5.0">5.0</a>, <a href="ftp://ftp.mondorescue.org/debian/6.0">6.0</a>. Look also at <a href="http://www.desknow.com/desknow/directfiles/aleidenfrost/mr-debs-unofficial/index.html">this</a> web page for Debian details.</li>
     130        <li>Ubuntu <a href="ftp://ftp.mondorescue.org/ubuntu/6.04">6.04</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/7.04">7.04</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/7.10">7.10</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/8.04">8.04</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/8.10">8.10</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/9.04">9.04</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/9.10">9.10</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/10.04">10.04</a>, <a href="ftp://ftp.mondorescue.org/ubuntu/10.10">10.10</a>.</li>
    131131        <li>Gentoo <a href="ftp://ftp.mondorescue.org/gentoo/nover">nover</a>.
    132132        <li>Slackware <a href="ftp://ftp.mondorescue.org/slackware/10.2">10.2</a>, <a href="ftp://ftp.mondorescue.org/slackware/11.0">11.0</a>.
Note: See TracChangeset for help on using the changeset viewer.