Changeset 3107 in MondoRescue
- Timestamp:
- May 5, 2013, 4:23:30 AM (12 years ago)
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mindi/README.pxe
r3098 r3107 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 |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=#] ...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=#] ... 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 and smbfs arealso available)22 proto is the protocol to use for mounting the remote share (default is NFS, sshfs is 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
r3103 r3107 756 756 757 757 # say where we are. 758 LogFile "INFO: GetInitrdFilesystemToUse(): called with parameter: $lvKernelImage"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 - Case of RHEL5 - SLES11SP1763 # Kernel may be gzip compressed 764 764 file $lvKernelImage 2>&1 | grep -q gzip 765 765 if [ $? -eq 0 ]; then 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 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" 776 777 else 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 778 lvUseFilesystem="UNSUPPORTED" 779 fi 780 781 else 782 # In that case, we are after 2.6.30 and use the supported initramfs 790 783 lvUseFilesystem="initramfs" 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 784 fi 800 785 # say what we are using 801 LogFile "INFO: GetInitrdFilesystemToUse(): Filesytem to use for initial ram disk is $lvUseFilesystem."786 LogFile "INFO: GetInitrdFilesystemToUse(): Filesytem to use for initial ram disk is $lvUseFilesystem." 802 787 803 788 # return file system to use … … 937 922 file="$1" 938 923 939 while [ `echo $file | grep -Ec '\.\./'` -ne 0 ]; do 924 echo $file | grep -q '\.\./' 925 if [ $? -eq 0 ]; then 940 926 # We need to normalise the path with .. in it 941 file=`echo $file | perl -pi -e 's|([^/] *)/([^/]+)/\.\./([^/]+)|$1/$3|g'`942 done927 file=`echo $file | perl -pi -e 's|([^/]+)/([^/]+)/\.\./([^/]+)|$1/$3|'` 928 fi 943 929 echo "$file" 944 930 if [ ! -h $file ]; then … … 1818 1804 for i in $options ; do 1819 1805 ooo=$i 1820 [ "$ooo" = "RESTORE" ] && ooo=" RESTOREnuke"1806 [ "$ooo" = "RESTORE" ] && ooo="nuke" 1821 1807 if [ "$type" = "elilo" ]; then 1822 1808 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" … … 2602 2588 fi 2603 2589 done 2604 tar cf - $finallist 2>> $MINDI_TMP/$$.log | tar xUf - || LogIt " WARNING: Problem in minimal analysis" $MINDI_TMP/$$.log2590 tar cf - $finallist 2>> $MINDI_TMP/$$.log | tar xUf - || LogIt "ERROR: Problem in minimal analysis" $MINDI_TMP/$$.log 2605 2591 2606 2592 # To improve support for distribution scripts, we now prefer to use bash as the std shell. Also fixes #600 … … 3245 3231 3246 3232 for i in loop cdrom ide-cd isofs linear raid0 raid1 raid5 ; do 3247 modinfo $i2> /dev/null 1> /dev/null3233 modinfo 2> /dev/null 1> /dev/null 3248 3234 if [ $? -eq 0 ]; then 3249 3235 modprobe $i 2>&1 > /dev/null -
branches/3.0/mindi/rootfs/sbin/start-netfs
r3098 r3107 104 104 ln -sf /dev/console /dev/tty 105 105 sshfs -o ro,StrictHostKeyChecking=no $netfsopt $netfsmount /tmp/isodir 106 elif [ "$proto" = "smbfs" ]; then107 LogIt "Mounting SMBFS share ($netfsmount) on /tmp/isodir..."108 mount -t cifs $netfsopt $netfsmount /tmp/isodir -o ro109 106 elif [ "$proto" != "" ]; then 110 107 if [ -x /sbin/rpcbind ]; then -
branches/3.0/mondo-doc/mondoarchive.8
r3098 r3107 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' and 130 smbfs (aka cifs) for SaMBa or Windows based filesystem mount. 129 mount, with the same syntax e.g. 'sshfs://user@192.168.1.3:/home/nfs' 131 130 132 131 .TP -
branches/3.0/mondo-doc/mondorescue-howto.sgml
r3096 r3107 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 pipe326 specify subsets, (e.g. /usr/local /home ) being sure to put a space 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 pipe in341 between each path, e.g. /shared/private |/scratch|/nfs|/windows340 in the 'exclude directories' dialog box. Please put a space 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
r3098 r3107 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);540 538 } else if (strstr(bkpinfo->netfs_proto, "nfs")) { 541 539 sprintf(tmp, "mount %s@%s", bkpinfo->netfs_user, bkpinfo->netfs_mount); … … 547 545 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 548 546 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);551 547 } else if (strstr(bkpinfo->netfs_proto, "nfs")) { 552 548 sprintf(tmp, "mount %s", bkpinfo->netfs_mount); -
branches/3.0/mondo/src/common/libmondo-devices.c
r3099 r3107 2174 2174 { 2175 2175 char *tmp = NULL; 2176 char *tmpro = NULL;2177 2176 char *tmp1 = NULL; 2178 2177 char *mds = NULL; … … 2529 2528 strcpy(tmp1, bkpinfo->netfs_proto); 2530 2529 if (!popup_and_get_string 2531 ("Network protocol", "Which protocol should I use (nfs/sshfs /smbfs) ?",2530 ("Network protocol", "Which protocol should I use (nfs/sshfs) ?", 2532 2531 tmp1, MAX_STR_LEN)) { 2533 2532 log_to_screen("User has chosen not to backup the PC"); … … 2568 2567 sprintf(command, "mkdir -p %s", bkpinfo->isodir); 2569 2568 run_program_and_log_output(command, 5); 2570 2571 2569 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"); 2570 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 2571 mr_asprintf(&tmp, "sshfs -o ro"); 2572 } else { 2573 mr_asprintf(&tmp, "mount -t %s -o nolock,ro", bkpinfo->netfs_proto); 2574 } 2574 2575 } 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); 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); 2583 2580 } 2584 else { 2585 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 2586 mr_asprintf(&tmp, "sshfs %s ",tmpro); 2587 } else { 2588 mr_asprintf(&tmp, "mount -t %s -o nolock %s ", bkpinfo->netfs_proto,tmpro); 2589 } 2590 if (bkpinfo->netfs_user) { 2591 mr_strcat(tmp, "%s@", bkpinfo->netfs_user); 2592 } 2593 mr_strcat(tmp, "%s %s", bkpinfo->netfs_mount, bkpinfo->isodir); 2594 } 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); 2595 2587 run_program_and_log_output(tmp, 3); 2596 2588 mr_free(tmp); … … 2598 2590 malloc_string(g_selfmounted_isodir); 2599 2591 strcpy(g_selfmounted_isodir, bkpinfo->isodir); 2600 }2601 2592 } 2602 2593 if (!is_this_device_mounted(bkpinfo->netfs_mount)) { -
branches/3.0/mondo/src/mondorestore/mondorestore.c
r3098 r3107 3134 3134 bkpinfo->netfs_mount); 3135 3135 } 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 } 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); 3145 3140 } else { 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 } 3141 sprintf(tmp, "mount %s -o nolock,ro /tmp/isodir", 3142 bkpinfo->netfs_mount); 3153 3143 } 3154 3144 } -
branches/3.0/mondo/test/Makefile.am
r3100 r3107 2 2 3 3 ## The program 4 sbin_PROGRAMS = mrtest_mountlist mrtest_truncname mrtest_stresc4 sbin_PROGRAMS = mrtest_mountlist mrtest_truncname 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.c10 mrtest_stresc_LDADD = ${top_builddir}/src/lib/libmr.a @MONDORESTORE_STATIC@ -
branches/3.0/website/mondorescue.org.conf
r3104 r3107 34 34 </Directory> 35 35 36 </VirtualHost>37 38 <VirtualHost 10.3.252.23>39 ServerName ftp.mondorescue.org40 ServerAdmin webmaster@mondorescue.org41 DocumentRoot /prj/www/html/mondorescue42 CustomLog /var/log/httpd/www.mondorescue.org/access_log combined43 Errorlog /var/log/httpd/www.mondorescue.org/error_log44 RewriteEngine On45 RewriteRule ^/index\.html$ /index.shtml46 RewriteRule ^/$ /index.shtml47 48 <Directory "/prj/www/html/mondorescue">49 DirectoryIndex index.shtml50 Options -Indexes MultiViews FollowSymLinks +Includes51 AllowOverride None52 Order allow,deny53 Allow from all54 </Directory>55 56 <Directory "/prj/www/html/mondorescue/ftp">57 Options Indexes MultiViews FollowSymLinks58 AllowOverride None59 Order allow,deny60 Allow from all61 </Directory>62 36 </VirtualHost> 63 37 … … 139 113 CustomLog /var/log/httpd/www.mondorescue.com/access_log combined 140 114 Errorlog /var/log/httpd/www.mondorescue.com/error_log 141 RewriteEngine On142 RewriteRule ^/index\.html$ /index.shtml143 RewriteRule ^/$ /index.shtml144 115 <Directory "/prj/www/html/mondorescue"> 145 116 DirectoryIndex index.shtml … … 157 128 158 129 </VirtualHost> 159 160 <VirtualHost 10.3.252.23>161 ServerName ftp.mondorescue.com162 ServerAdmin webmaster@mondorescue.com163 DocumentRoot /prj/www/html/mondorescue164 CustomLog /var/log/httpd/www.mondorescue.com/access_log combined165 Errorlog /var/log/httpd/www.mondorescue.com/error_log166 RewriteEngine On167 RewriteRule ^/index\.html$ /index.shtml168 RewriteRule ^/$ /index.shtml169 <Directory "/prj/www/html/mondorescue">170 DirectoryIndex index.shtml171 Options -Indexes MultiViews FollowSymLinks +Includes172 AllowOverride None173 Order allow,deny174 Allow from all175 </Directory>176 <Directory "/prj/www/html/mondorescue/ftp">177 Options Indexes MultiViews FollowSymLinks178 AllowOverride None179 Order allow,deny180 Allow from all181 </Directory>182 183 </VirtualHost> -
devel/mr/Makefile.PL
r3102 r3107 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";118 117 $text .= "\t".'cp lib/MondoRescue/DynConf.pm $(DESTDIR)/$(VENDORLIBEXP)/MondoRescue/'."\n"; 119 118 -
devel/mr/etc/mondorescue.conf
r3101 r3107 32 32 mr_proc_devices linux = /proc/devices 33 33 mr_proc_meminfo linux = /proc/meminfo 34 mr_proc_version linux = /proc/version 34 35 mr_proc_mounts linux = /proc/mounts 35 36 mr_proc_misc linux = /proc/misc
Note:
See TracChangeset
for help on using the changeset viewer.