Changeset 3111 in MondoRescue
- Timestamp:
- May 5, 2013, 4:55:42 AM (12 years ago)
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mindi/README.pxe
r3107 r3111 11 11 label mondo 12 12 kernel vmlinuz-mondo 13 append initrd=initrd-mondo load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=131072 selinux=0 rw root=/dev/ram iso acpi=off apm=off devfs=nomount exec-shield=0 pxe [proto=nfs|sshfs ] [prefix=machine] [ipconf=(ipdev:ipadr:netmask:broadcast:gateway|ipdev:dhcp)] [hwaddr=M:A:C:A:D:R] [netfsmount=server:mountpoint] [netfsopt=-o option][netfspath=local_path] [ping=#] ...13 append initrd=initrd-mondo load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=131072 selinux=0 rw root=/dev/ram iso acpi=off apm=off devfs=nomount exec-shield=0 pxe [proto=nfs|sshfs|smbfs] [prefix=machine] [ipconf=(ipdev:ipadr:netmask:broadcast:gateway|ipdev:dhcp)] [hwaddr=M:A:C:A:D:R] [netfsmount=server:mountpoint] [netfsopt=-o option][netfspath=local_path] [ping=#] ... 14 14 15 15 ipdev is the device name (e.g. eth2) … … 20 20 dhcp is a keyword. Using it will provide all the previous 4 values to activate the LAN interface. 21 21 hwaddr is the MAC address of the device you want to use to restore through 22 proto is the protocol to use for mounting the remote share (default is NFS, sshfs isalso available)22 proto is the protocol to use for mounting the remote share (default is NFS, sshfs and smbfs are also available) 23 23 server is the ip addr of the Remote Network server 24 24 mountpoint is the mount point on the Remote Network server to use (if NFS, should be in /etc/exports of the NFS server) -
branches/3.0/mindi/mindi
r3107 r3111 756 756 757 757 # say where we are. 758 LogFile "INFO: 758 LogFile "INFO: GetInitrdFilesystemToUse(): called with parameter: $lvKernelImage" 759 759 760 760 # verify that file exists 761 761 [ ! -f $lvKernelImage ] && Die "File $lvKernelImage not found. Terminating." 762 762 763 # Kernel may be gzip compressed 763 # Kernel may be gzip compressed - Case of RHEL5 - SLES11SP1 764 764 file $lvKernelImage 2>&1 | grep -q gzip 765 765 if [ $? -eq 0 ]; then 766 lvScanRes=`gzip -cd $lvKernelImage | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicExt3fs|$lcMagicInitfs"` 767 768 # determine which filesystem to use for initrd image: ext2|3fs, gzip'ed cpio (initramfs) or cramfs 769 if [ `echo $lvScanRes | grep -Ec "$lcMagicExt2fs"` -eq 1 ]; then 770 lvUseFilesystem="ext2fs" 771 elif [ `echo $lvScanRes | grep -Ec "$lcMagicExt3fs"` -eq 1 ]; then 772 lvUseFilesystem="ext3fs" 773 elif [ `echo $lvScanRes | grep -Ec "$lcMagicInitfs"` -eq 1 ]; then 774 lvUseFilesystem="initramfs" 775 elif [ `echo $lvScanRes | grep -Ec "$lcMagicCramfs"` -eq 1 ]; then 776 lvUseFilesystem="cramfs" 766 LogFile "INFO: Found a gzip compressed kernel $lvKernelImage" 767 lvScanRes=`gzip -cd $lvKernelImage | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicExt3fs|$lcMagicInitfs" 2> /dev/null` 768 else 769 LogFile "INFO: Found a non gzip compressed kernel $lvKernelImage" 770 # kernel is x86 boot sector in RHEL3/4 with embedded gzip content 771 # get offet of gzip magic "1f8b0800" in file (for these older kernels) 772 lvOffset=`od -vA n -t x1 $lvKernelImage | tr -d '[:space:]' | awk '{ print match($0, "1f8b0800")}' 2> /dev/null` 773 if [ $lvOffset -eq 0 ]; then 774 LogFile "INFO: gzip magic not found in file $lvKernelImage. Supposing initramfs." 775 lvScanRes=$lcMagicInitfs 777 776 else 778 lvUseFilesystem="UNSUPPORTED" 779 fi 780 781 else 782 # In that case, we are after 2.6.30 and use the supported initramfs 777 lvOffset=`expr $lvOffset / 2` 778 LogFile "INFO: GetInitrdFilesystemToUse(): gzip magic found at lvOffset $lvOffset." 779 # scan again kernel image 780 lvScanRes=`dd ibs=1 skip=$lvOffset if=$lvKernelImage obs=1M 2>/dev/null | gunzip -c 2> /dev/null | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicExt3fs|$lcMagicInitfs" 2> /dev/null` 781 fi 782 fi 783 784 # determine which filesystem to use for initrd image: ext2|3fs, gzip'ed cpio (initramfs) or cramfs 785 if [ `echo $lvScanRes | grep -Ec "$lcMagicExt2fs"` -eq 1 ]; then 786 lvUseFilesystem="ext2fs" 787 elif [ `echo $lvScanRes | grep -Ec "$lcMagicExt3fs"` -eq 1 ]; then 788 lvUseFilesystem="ext3fs" 789 elif [ `echo $lvScanRes | grep -Ec "$lcMagicInitfs"` -eq 1 ]; then 783 790 lvUseFilesystem="initramfs" 784 fi 791 elif [ `echo $lvScanRes | grep -Ec "$lcMagicCramfs"` -eq 1 ]; then 792 lvUseFilesystem="cramfs" 793 else 794 # In that case, we are most probably after 2.6.30 and use the supported initramfs 795 LogFile "No automatic detection found previously. Supposing initramfs." 796 LogFile "Report on the MondoRescue mailing-list withyour log files" 797 lvUseFilesystem="initramfs" 798 fi 799 785 800 # say what we are using 786 LogFile "INFO: 801 LogFile "INFO: GetInitrdFilesystemToUse(): Filesytem to use for initial ram disk is $lvUseFilesystem." 787 802 788 803 # return file system to use … … 922 937 file="$1" 923 938 924 echo $file | grep -q '\.\./' 925 if [ $? -eq 0 ]; then 939 while [ `echo $file | grep -Ec '\.\./'` -ne 0 ]; do 926 940 # We need to normalise the path with .. in it 927 file=`echo $file | perl -pi -e 's|([^/] +)/([^/]+)/\.\./([^/]+)|$1/$3|'`928 fi941 file=`echo $file | perl -pi -e 's|([^/]*)/([^/]+)/\.\./([^/]+)|$1/$3|g'` 942 done 929 943 echo "$file" 930 944 if [ ! -h $file ]; then … … 1804 1818 for i in $options ; do 1805 1819 ooo=$i 1806 [ "$ooo" = "RESTORE" ] && ooo=" nuke"1820 [ "$ooo" = "RESTORE" ] && ooo="RESTORE nuke" 1807 1821 if [ "$type" = "elilo" ]; then 1808 1822 outstr="image=/vmlinuz\n\tlabel=$i\n\tinitrd=/initrd.img\n\troot=/dev/ram0 append=\" rw ramdisk_size=$ramdisk_size $ooo $MINDI_ADDITIONAL_BOOT_PARAMS \"\n" … … 2588 2602 fi 2589 2603 done 2590 tar cf - $finallist 2>> $MINDI_TMP/$$.log | tar xUf - || LogIt " ERROR: Problem in minimal analysis" $MINDI_TMP/$$.log2604 tar cf - $finallist 2>> $MINDI_TMP/$$.log | tar xUf - || LogIt "WARNING: Problem in minimal analysis" $MINDI_TMP/$$.log 2591 2605 2592 2606 # To improve support for distribution scripts, we now prefer to use bash as the std shell. Also fixes #600 … … 3231 3245 3232 3246 for i in loop cdrom ide-cd isofs linear raid0 raid1 raid5 ; do 3233 modinfo 2> /dev/null 1> /dev/null3247 modinfo $i 2> /dev/null 1> /dev/null 3234 3248 if [ $? -eq 0 ]; then 3235 3249 modprobe $i 2>&1 > /dev/null -
branches/3.0/mindi/rootfs/sbin/start-netfs
r3107 r3111 104 104 ln -sf /dev/console /dev/tty 105 105 sshfs -o ro,StrictHostKeyChecking=no $netfsopt $netfsmount /tmp/isodir 106 elif [ "$proto" = "smbfs" ]; then 107 LogIt "Mounting SMBFS share ($netfsmount) on /tmp/isodir..." 108 mount -t cifs $netfsopt $netfsmount /tmp/isodir -o ro 106 109 elif [ "$proto" != "" ]; then 107 110 if [ -x /sbin/rpcbind ]; then -
branches/3.0/mondo-doc/mondoarchive.8
r3107 r3111 127 127 and mondoarchive will try to do its best to support it. 128 128 Other protocols are available such as sshfs for fuse SSH based filesystem 129 mount, with the same syntax e.g. 'sshfs://user@192.168.1.3:/home/nfs' 129 mount, with the same syntax e.g. 'sshfs://user@192.168.1.3:/home/nfs' and 130 smbfs (aka cifs) for SaMBa or Windows based filesystem mount. 130 131 131 132 .TP -
branches/3.0/mondo-doc/mondorescue-howto.sgml
r3107 r3111 324 324 If you want to backup the whole computer (excluding /sys, /run and /proc, 325 325 naturally as well as /tmp) then leave this as / which is the default. Otherwise, 326 specify subsets, (e.g. /usr/local /home ) being sure to put a space326 specify subsets, (e.g. /usr/local|/home ) being sure to put a pipe 327 327 in between each path. 328 328 </entry> … … 338 338 If you are backing up your whole computer then you might want to 339 339 exclude certain directories, e.g. /shared/MP3. Please specify them 340 in the 'exclude directories' dialog box. Please put a space in341 between each path, e.g. /shared/private /scratch /nfs/windows340 in the 'exclude directories' dialog box. Please put a pipe in 341 between each path, e.g. /shared/private|/scratch|/nfs|/windows 342 342 </entry> 343 343 </row> -
branches/3.0/mondo/src/common/libmondo-cli.c
r3107 r3111 536 536 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 537 537 sprintf(tmp, "sshfs %s@%s", bkpinfo->netfs_user, bkpinfo->netfs_mount); 538 } else if (strstr(bkpinfo->netfs_proto, "smbfs")) { 539 sprintf(tmp, "mount -t cifs %s -o user=%s", bkpinfo->netfs_mount, bkpinfo->netfs_user); 538 540 } else if (strstr(bkpinfo->netfs_proto, "nfs")) { 539 541 sprintf(tmp, "mount %s@%s", bkpinfo->netfs_user, bkpinfo->netfs_mount); … … 545 547 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 546 548 sprintf(tmp, "sshfs %s", bkpinfo->netfs_mount); 549 } else if (strstr(bkpinfo->netfs_proto, "smbfs")) { 550 sprintf(tmp, "mount -t cifs %s", bkpinfo->netfs_mount); 547 551 } else if (strstr(bkpinfo->netfs_proto, "nfs")) { 548 552 sprintf(tmp, "mount %s", bkpinfo->netfs_mount); -
branches/3.0/mondo/src/common/libmondo-devices.c
r3107 r3111 2174 2174 { 2175 2175 char *tmp = NULL; 2176 char *tmpro = NULL; 2176 2177 char *tmp1 = NULL; 2177 2178 char *mds = NULL; … … 2528 2529 strcpy(tmp1, bkpinfo->netfs_proto); 2529 2530 if (!popup_and_get_string 2530 ("Network protocol", "Which protocol should I use (nfs/sshfs ) ?",2531 ("Network protocol", "Which protocol should I use (nfs/sshfs/smbfs) ?", 2531 2532 tmp1, MAX_STR_LEN)) { 2532 2533 log_to_screen("User has chosen not to backup the PC"); … … 2567 2568 sprintf(command, "mkdir -p %s", bkpinfo->isodir); 2568 2569 run_program_and_log_output(command, 5); 2570 2569 2571 if (bkpinfo->restore_data) { 2572 /* mount th FS read-only in restore mode to avoid any erase of whatever */ 2573 mr_asprintf(&tmpro, "-o ro"); 2574 } else { 2575 mr_asprintf(&tmpro, ""); 2576 } 2577 2578 /* Build the mount string */ 2579 if (strstr(bkpinfo->netfs_proto, "smbfs")) { 2580 mr_asprintf(&tmp, "mount -t cifs %s %s %s",bkpinfo->netfs_mount, bkpinfo->isodir,tmpro); 2581 if (bkpinfo->netfs_user) { 2582 mr_strcat(tmp, " -o user=%s", bkpinfo->netfs_user); 2583 } 2584 else { 2570 2585 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 2571 mr_asprintf(&tmp, "sshfs -o ro");2586 mr_asprintf(&tmp, "sshfs %s ",tmpro); 2572 2587 } else { 2573 mr_asprintf(&tmp, "mount -t %s -o nolock ,ro", bkpinfo->netfs_proto);2588 mr_asprintf(&tmp, "mount -t %s -o nolock %s ", bkpinfo->netfs_proto,tmpro); 2574 2589 } 2575 } else { 2576 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 2577 mr_asprintf(&tmp, "sshfs"); 2578 } else { 2579 mr_asprintf(&tmp, "mount -t %s -o nolock", bkpinfo->netfs_proto); 2590 if (bkpinfo->netfs_user) { 2591 mr_strcat(tmp, "%s@", bkpinfo->netfs_user); 2580 2592 } 2581 } 2582 mr_strcat(tmp, " "); 2583 if (bkpinfo->netfs_user) { 2584 mr_strcat(tmp, "%s@", bkpinfo->netfs_user); 2585 } 2586 mr_strcat(tmp, "%s %s", bkpinfo->netfs_mount, bkpinfo->isodir); 2593 mr_strcat(tmp, "%s %s", bkpinfo->netfs_mount, bkpinfo->isodir); 2594 } 2587 2595 run_program_and_log_output(tmp, 3); 2588 2596 mr_free(tmp); … … 2590 2598 malloc_string(g_selfmounted_isodir); 2591 2599 strcpy(g_selfmounted_isodir, bkpinfo->isodir); 2600 } 2592 2601 } 2593 2602 if (!is_this_device_mounted(bkpinfo->netfs_mount)) { -
branches/3.0/mondo/src/mondorestore/mondorestore.c
r3107 r3111 3134 3134 bkpinfo->netfs_mount); 3135 3135 } 3136 } else { 3137 if (bkpinfo->netfs_user) { 3138 sprintf(tmp, "mount %s@%s -o nolock,ro /tmp/isodir", 3139 bkpinfo->netfs_user,bkpinfo->netfs_mount); 3136 } else { 3137 if (strstr(bkpinfo->netfs_proto, "smbfs")) { 3138 if (bkpinfo->netfs_user) { 3139 sprintf(tmp, "mount -t cifs %s /tmp/isodir -o user=%s,nolock,ro ", 3140 bkpinfo->netfs_mount,bkpinfo->netfs_user); 3141 } else { 3142 sprintf(tmp, "mount -t cifs %s /tmp/isodir -o nolock,ro ", 3143 bkpinfo->netfs_mount); 3144 } 3140 3145 } else { 3141 sprintf(tmp, "mount %s -o nolock,ro /tmp/isodir", 3142 bkpinfo->netfs_mount); 3146 if (bkpinfo->netfs_user) { 3147 sprintf(tmp, "mount %s@%s -o nolock,ro /tmp/isodir", 3148 bkpinfo->netfs_user,bkpinfo->netfs_mount); 3149 } else { 3150 sprintf(tmp, "mount %s -o nolock,ro /tmp/isodir", 3151 bkpinfo->netfs_mount); 3152 } 3143 3153 } 3144 3154 } -
branches/3.0/mondo/test/Makefile.am
r3107 r3111 2 2 3 3 ## The program 4 sbin_PROGRAMS = mrtest_mountlist mrtest_truncname 4 sbin_PROGRAMS = mrtest_mountlist mrtest_truncname mrtest_stresc 5 5 mrtest_mountlist_SOURCES = test-mountlist.c ${top_builddir}/src/mondorestore/mondo-prep.c ${top_builddir}/src/mondorestore/mondo-rstr-newt.c ${top_builddir}/src/mondorestore/mondo-rstr-tools.c 6 6 mrtest_mountlist_LDADD = ${top_builddir}/src/common/libmondo.a ${top_builddir}/src/lib/libmr.a @MONDORESTORE_STATIC@ 7 7 mrtest_truncname_SOURCES = test-truncname.c ${top_builddir}/src/common/libmondo-string.c 8 8 mrtest_truncname_LDADD = ${top_builddir}/src/common/libmondo.a ${top_builddir}/src/lib/libmr.a @MONDORESTORE_STATIC@ 9 mrtest_stresc_SOURCES = test-mr_stresc.c 10 mrtest_stresc_LDADD = ${top_builddir}/src/lib/libmr.a @MONDORESTORE_STATIC@ -
branches/3.0/website/mondorescue.org.conf
r3107 r3111 34 34 </Directory> 35 35 36 </VirtualHost> 37 38 <VirtualHost 10.3.252.23> 39 ServerName ftp.mondorescue.org 40 ServerAdmin webmaster@mondorescue.org 41 DocumentRoot /prj/www/html/mondorescue 42 CustomLog /var/log/httpd/www.mondorescue.org/access_log combined 43 Errorlog /var/log/httpd/www.mondorescue.org/error_log 44 RewriteEngine On 45 RewriteRule ^/index\.html$ /index.shtml 46 RewriteRule ^/$ /index.shtml 47 48 <Directory "/prj/www/html/mondorescue"> 49 DirectoryIndex index.shtml 50 Options -Indexes MultiViews FollowSymLinks +Includes 51 AllowOverride None 52 Order allow,deny 53 Allow from all 54 </Directory> 55 56 <Directory "/prj/www/html/mondorescue/ftp"> 57 Options Indexes MultiViews FollowSymLinks 58 AllowOverride None 59 Order allow,deny 60 Allow from all 61 </Directory> 36 62 </VirtualHost> 37 63 … … 113 139 CustomLog /var/log/httpd/www.mondorescue.com/access_log combined 114 140 Errorlog /var/log/httpd/www.mondorescue.com/error_log 141 RewriteEngine On 142 RewriteRule ^/index\.html$ /index.shtml 143 RewriteRule ^/$ /index.shtml 115 144 <Directory "/prj/www/html/mondorescue"> 116 145 DirectoryIndex index.shtml … … 128 157 129 158 </VirtualHost> 159 160 <VirtualHost 10.3.252.23> 161 ServerName ftp.mondorescue.com 162 ServerAdmin webmaster@mondorescue.com 163 DocumentRoot /prj/www/html/mondorescue 164 CustomLog /var/log/httpd/www.mondorescue.com/access_log combined 165 Errorlog /var/log/httpd/www.mondorescue.com/error_log 166 RewriteEngine On 167 RewriteRule ^/index\.html$ /index.shtml 168 RewriteRule ^/$ /index.shtml 169 <Directory "/prj/www/html/mondorescue"> 170 DirectoryIndex index.shtml 171 Options -Indexes MultiViews FollowSymLinks +Includes 172 AllowOverride None 173 Order allow,deny 174 Allow from all 175 </Directory> 176 <Directory "/prj/www/html/mondorescue/ftp"> 177 Options Indexes MultiViews FollowSymLinks 178 AllowOverride None 179 Order allow,deny 180 Allow from all 181 </Directory> 182 183 </VirtualHost> -
devel/mr/Makefile.PL
r3107 r3111 115 115 $text .= "\t".'cp etc/PBPROJ.conf $(DESTDIR)'."$confdir/PBPROJ/PBPROJ.conf.dist ; install -m 755 -d ".' $(DESTDIR)'."$mandir/man5 ; pod2man etc/PBPROJ.conf > ".'$(DESTDIR)'."$mandir/man5/PBPROJ.conf.5\n"; 116 116 $text .= "\t".'md5sum $(DESTDIR)'."$confdir/PBPROJ/PBPROJ.conf.dist > ".'$(DESTDIR)'."$confdir/PBPROJ/PBPROJ.conf.dist.md5\n"; 117 $text .= "\t".'if [ ! -f "'.'$(DESTDIR)'."$confdir/PBPROJ/PBPROJ.conf".'" ]; then echo "# Local configuration file for Mondorescue" > $(DESTDIR)'."$confdir/PBPROJ/PBPROJ.conf".'; echo "# Adapt content taken from the distribution conf file PBPROJ.conf.dist which should remain untouched" >> $(DESTDIR)'."$confdir/PBPROJ/PBPROJ.conf ; fi\n"; 117 118 $text .= "\t".'cp lib/MondoRescue/DynConf.pm $(DESTDIR)/$(VENDORLIBEXP)/MondoRescue/'."\n"; 118 119 -
devel/mr/etc/mondorescue.conf
r3107 r3111 32 32 mr_proc_devices linux = /proc/devices 33 33 mr_proc_meminfo linux = /proc/meminfo 34 mr_proc_version linux = /proc/version35 34 mr_proc_mounts linux = /proc/mounts 36 35 mr_proc_misc linux = /proc/misc
Note:
See TracChangeset
for help on using the changeset viewer.