Changeset 1581 in MondoRescue


Ignore:
Timestamp:
Jul 27, 2007, 2:11:55 AM (17 years ago)
Author:
Bruno Cornec
Message:

Continue to remove floppy support

Location:
branches/stable
Files:
1 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/INSTALL

    r30 r1581  
    1919- locate your kernel and modules
    2020- put together a package of all the tools you are likely to need
    21 - generate some floppy disk images
     21- generate some boot images
    2222- offer to write the images to disks for you
    2323
  • branches/stable/mindi/distributions/conf/mindi.conf.dist

    r1573 r1581  
    1717# Size of the boot image
    1818#
    19 mindi_boot_size=8192
     19mindi_boot_size=16384
    2020
    2121#
     
    6565#
    6666mindi_tmp_dir="/tmp"
    67 
    68 #
    69 # Floppy Disk Device
    70 #
    71 mindi_fd_device="/dev/fd0"
    7267
    7368#
  • branches/stable/mindi/mindi

    r1578 r1581  
    8686USE_OWN_KERNEL="$mindi_use_own_kernel"
    8787MINDI_CACHE="$mindi_cache_dir"
    88 FORCE_DUAL_FLOPPIES="$mindi_dual_floppies"
    8988TMPDIR="$mindi_tmp_dir"
    90 FDDEVICE="$mindi_fd_device"
    9189USBDEVICE="$mindi_usb_device"
    9290TAPEDEV="$mindi_tape_device"
     
    31483146fi
    31493147if [ _"$MONDO_SHARE" = _"" ] && [ "$INTERACTIVE" = "yes" ] && [ "$ARCH" != "ia64" ] ; then
    3150     echo -en "Would you like to use LILO (instead of syslinux)\nfor your boot CD/floppies (y/[n]) ?"
     3148    echo -en "Would you like to use LILO (instead of syslinux)\nfor your boot image (y/[n]) ?"
    31513149    read ch
    31523150    if [ "$ch" = "y" ] || [ "$ch" = "Y" ] ; then
  • branches/stable/mindi/rootfs/README

    r998 r1581  
    66which may be found at <http://www.mondorescue.org>.
    77
    8 This CD (or, this set of floppy disks) contains the tools required to do
     8This CD (or image) contains the tools required to do
    99basic system maintenance, e.g. formatting, moving files, mounting partitions.
    1010
    11 If you used Mondo to make this CD (or set of floppies) then oh boy, are you in
     11If you used Mondo to make this CD (or image) then oh boy, are you in
    1212for some fun. To do a basic restore, type:-
    13 # mondo-restore
     13# mondorestore
    1414
    1515To edit the mountlist, type:-
  • branches/stable/mindi/rootfs/sbin/find-and-mount-cdrom

    r1158 r1581  
    7575    exit 0
    7676fi
    77 #mount /dev/fd0u1722 -t ext2 /mnt/floppy
    78 [ "$1" = "--second-try" ] && exit 1; # don't try to mount floppy drive
     77[ "$1" = "--second-try" ] && exit 1;
    7978if [ "`grep "using-cdstream=yes" /tmp/mondo-restore.cfg`" ] ; then
    8079    LogIt "Because you are using cdstream, I won't try to mount CD."
    8180    exit 0
    8281fi
    83 mount /dev/fd0 -t ext2 -o ro /mnt/floppy 2> /dev/null
    84 if [ "$?" -eq "0" ] ; then
    85     umount /mnt/floppy 2> /dev/null
    86     exit 1
    87 else
    88     LogIt "Please go to another PC, mount this CD and copy the data disk images" 1
    89     LogIt "from the CD's /images directory to blank 1.44MB floppy disks. You should" 1
    90     LogIt "use something like 'dd if=/mnt/cdrom/images/mindi-data-1.img of=/dev/fd0'" 1
    91     LogIt "for the first data disk, mindi-data-2.img for the second, and so on." 1
    92     LogIt "(If you are already booting from a floppy, please ignore this message.)" 1
    93     exit 2
    94 fi
    95 
    96 
    97 
    98 
  • branches/stable/mindi/rootfs/sbin/init

    r1478 r1581  
    123123        LogIt "$tapedev failed to act as extended data disk for booting." 1
    124124        LogIt "Please specify an alternate tape device," 1
    125         LogIt "or hit <Enter> to boot from CD/floppies." 1
     125        LogIt "or hit <Enter> to boot from CD." 1
    126126        echo -en "---> "
    127127        read tapedev
     
    138138
    139139    if [ "$res" -ne "0" ] ; then
    140     cd /
    141     LogIt "Failed to use tape as extended datadisk. Reverting to floppies." 1
    142     HandleCDROMorFloppies
    143     res=$?
     140        cd /
     141        LogIt "Failed to use tape as extended datadisk. Reverting to cd." 1
     142        HandleCDROM
     143        res=$?
    144144    else
    145 #   clear
    146     LogIt "Using tape as extended datadisk. Good." 3
    147     echo "Using tape as extd ddisk." > /tmp/TAPEDEV-HAS-DATA-DISKS
    148     res=0
     145    #   clear
     146        LogIt "Using tape as extended datadisk. Good." 3
     147        echo "Using tape as extd ddisk." > /tmp/TAPEDEV-HAS-DATA-DISKS
     148        res=0
    149149        CD_MOUNTED_OK=yes
    150150    fi
     
    154154
    155155
    156 HandleCDROMorFloppies() {
     156HHandleCDROM() {
    157157    find-and-mount-cdrom
    158158    res=$?
     
    167167        LogIt "OK, I am running on a CD-ROM. Good." 3
    168168        CD_MOUNTED_OK=yes
    169     elif [ "$res" -eq "1" ] ; then
    170         LogIt "OK, I am running on floppies. Good." 3
    171         CD_MOUNTED_OK=""
    172169    else
    173         LogIt "OK, I am falling back to floppy mode." 3
    174         LogIt "That means you'll have to copy the data disk images from" 3
    175         LogIt "the CD/hard disk/whatever to physical 1.44MB disks and" 3
    176         LogIt "insert them, one after the other. Please see the manual." 3
    177         LogIt "The images are in /images on the CD, or /var/cache/mindi" 3
    178         LogIt "on your hard disk. Your archives are probably fine but" 3
     170        LogIt "OK, I am unable to go on. You seem to be missing a driver" 3
     171        LogIt "Your archives are probably fine but" 3
    179172        LogIt "your tape streamer and/or CD-ROM drive are eccentric. :-)" 3
    180173        CD_MOUNTED_OK=""
     
    479472    ExtractDataDisksAndLoadModules
    480473else
    481     HandleCDROMorFloppies
     474    HandleCDROM
    482475    ExtractDataDisksAndLoadModules
    483476    # We need to get here exported variables from start-nfs
     
    563556else
    564557    LogIt "backup-media-type is not specified in config file."
    565     LogIt "I think this CD/floppy has no archives on it."
     558    LogIt "I think this media has no archives on it."
    566559fi
    567560echo -en "Type 'exit' to reboot the PC\n"
  • branches/stable/mindi/rootfs/sbin/untar-and-softlink

    r866 r1581  
    1414# ---------------------- main ----------------------
    1515
    16 mountpoint=/mnt/floppy
     16mountpoint=""
    1717[ -e "/tmp/CDROM-LIVES-HERE" ] && mountpoint=/mnt/cdrom/images
    1818[ "$#" -eq "3" ] || Die "untar-and-softlink <tarball> <untar_to> <softlink_to>"
     
    2323if [ -e "/tmp/CDROM-LIVES-HERE" ] ; then
    2424    [ -e "$tarball" ] || LogIt "Can't find CD's $tarball" 1
    25 else
    26     while [ ! -f "$tarball" ] ; do
    27         echo -e -n "Please insert data (floppy) disk #$diskno and press ENTER."
    28         read line
    29         mount /dev/fd0 -t ext2 -o ro $mountpoint
    30         [ -f "$tarball" ] || umount $mountpoint ; # unmount if tarball not on disk
    31         echo -en "Working..."
    32     done
    3325fi
    3426
  • branches/stable/mondo-doc/distributions/debian/mondo-doc.doc-base

    r731 r1581  
    66 effortlessly backup and interactively restore Linux, Windows and other
    77 supported filesystem partitions to/from CD-R/RW media, tape, NFS, ... and
    8  Mindi Linux provides the bootable emergency restore CD/floppy set which Mondo
     8 Mindi Linux provides the bootable emergency restore CD/iso set which Mondo
    99 uses at boot-time.
    1010Section: utils
  • branches/stable/mondo-doc/mindi.8

    r1500 r1581  
    3939.PP
    4040.B mindi
    41 creates a set of boot/root floppy disk images and/or a bootable ISO image using
     41creates a set of bootable ISO images using
    4242files from the system it runs on.
    4343.B mindi
     
    4848is used by
    4949.B monodarchive(8)
    50 to produce the required boot/root floppy or CD images but can also be used
     50to produce the required boot/root CD images but can also be used
    5151stand-alone.
    5252
     
    160160.I /var/cache/mindi/mindi-boot.F.img
    161161.B mindi
    162 boot floppy of size F [KB].
     162boot image of size F [KB].
    163163.TP
    164164.I /var/cache/mindi/mindi-root.F.img
    165165.B mindi
    166 root floppy of size F [KB].
     166root image of size F [KB].
    167167.TP
    168168.I /var/cache/mindi/mindi-data.N.img
    169169.B mindi
    170 data floppy number N for boot/root floppies.
     170data image number N for boot/root images.
    171171.TP
    172172.I /var/cache/mindi/mindi.iso
  • branches/stable/mondo-doc/mondoarchive.8

    r1489 r1581  
    4646With
    4747.BR \-O ,
    48 it backs up your filesystem to CD, tape, ISO images or NFS share. Boot floppies
    49 or a special boot CD will be created to allow you to restore from bare metal if
     48it backs up your filesystem to CD, tape, ISO images or NFS share.
     49A special boot CD will be created to allow you to restore from bare metal if
    5050necessary.
    5151
     
    6969To restore data, either run
    7070.I mondorestore
    71 from the command line or boot from the emergency CD/floppies generated during
     71from the command line or boot from the emergency CD generated during
    7272the backup process. The latter will come in handy if a gremlin wipes your hard
    7373disk.
     
    206206.TP
    207207.BI "-o "
    208 Use LILO as boot loader of boot floppy/CD instead of SYSLINUX/ISOLINUX. By
    209 default, SYSLINUX is used for floppies and ISOLINUX for CD's. Use LILO if you
     208Use LILO as boot loader of boot CD instead of SYSLINUX/ISOLINUX. By
     209default, ISOLINUX is used for CD's. Use LILO if you
    210210prefer to use that boot loader. NB: This does not affect which boot loader you
    211 use to boot your PC, merely the boot loader used by the CD's/floppies created
     211use to boot your PC, merely the boot loader used by the CD's created
    212212by Mondo. Use ELILO instead which is mandatory for IA64 machines.
    213213
     
    246246
    247247.TP
    248 .BI "-F "
    249 Do not offer to write boot+data floppy disk images to 3.5-inch floppy disks.
    250 The images will remain in /var/cache/mindi until your next backup run,
    251 however.
    252 
    253 .TP
    254248.BI "-H "
    255249When you boot from the tape/CD, your hard drive will be wiped and the archives
  • branches/stable/mondo-doc/mondorescue-howto.sgml

    r1338 r1581  
    3131other supported filesystem partitions to/from CD/DVD-+R/RW media, tape,
    3232NFS, ... and Mindi Linux provides the bootable emergency restore
    33 CD/floppy set which Mondo uses at boot-time.
     33CD set which Mondo uses at boot-time.
    3434</para>
    3535</abstract>
     
    421421</entry>
    422422<entry>
    423 Mondo calls Mindi. Mindi generates bootable floppy disk images and
    424 auxiliary data disk images which are based on your existing Linux
     423Mondo calls Mindi. Mindi generates bootable images and
     424auxiliary data images which are based on your existing Linux
    425425distribution and filesystem. That way, you can be sure Mondo's
    426426tools will be compatible with your existing filesystems and
     
    453453</entry>
    454454<entry>
    455 Do you want to create a boot floppy at the end? Yes, if you're a
     455Do you want to create a boot image at the end? Yes, if you're a
    456456tape or NFS user. No, if you are using CD/DVD-R[W]'s and your computer
    457 supports bootable CD's. Tape users only need one floppy but other
    458 users may need more. Mondo will advise accordingly.
     457supports bootable CD's or using PXE.
    459458</entry>
    460459</row>
     
    463462<itemizedlist>
    464463<listitem>
    465 <para>Try to boot from the first CD of the backup (or the first
    466 floppy, if you made floppies). Choose 'Compare Mode' by typing
     464<para>Try to boot from the first CD of the backup. Choose 'Compare Mode' by typing
    467465compare at the boot screen.</para>
    468466</listitem>
     
    471469checkout the compatibility of your system. (see
    472470<link linkend="test-mindi">Testing Mindi</link> for more
    473 details). Remove the CD/floppy; boot your computer as usual;
     471details). Remove the CD; boot your computer as usual;
    474472execute as root</para>
    475473<para></para>
     
    542540<entry>
    543541
    544 bash# mondoarchive -OVc 4 -I /home -gF
     542bash# mondoarchive -OVc 4 -I /home -g
    545543
    546544</entry>
     
    551549latter would require 'w' instead of 'c'). The '4' is the speed of
    552550your CD writer. The string after -I is the path to be backed up.
    553 The '-gF' means you are going to see the pretty yellow-on-blue
    554 screen instead of the boring white-on-black screen. :) It also
    555 means Mondo will not offer to create physical boot floppies for
    556 you. It is assumed that you are able to boot from the CD which
    557 Mondo has generated.</para>
     551The '-g' means you are going to see the pretty yellow-on-blue
     552screen instead of the boring white-on-black screen. :)
     553</para>
    558554<para>Example 2-2. A backup of your whole filesystem to NFS using
    559555the command line</para>
     
    612608If you find this to be the case for your computer, please use '-L'
    613609to force Mondo to use LILO instead of Syslinux as the boot loader
    614 for its CD/floppies. (NB: This has nothing to do with which boot
     610for its CD. (NB: This has nothing to do with which boot
    615611loader your hard drive uses.) Also, it is a good habit to specify
    616612your tape streamer with '-d &lt;device&gt;'. You don't usually need
     
    688684<title>Mindi</title>
    689685<para>
    690 Mindi Linux creates a set of boot/root floppy disk images
     686Mindi Linux creates a set of boot/root images
    691687that will let you perform basic system maintenance on your Linux
    692688distro. The principal virtues of Mindi's boot disks are the fact
     
    749745            tape. Say 'yes' when asked if you want to verify them.</para>
    750746</listitem>
    751 <listitem>
    752     <para>If you are not backing up to CD, please create boot
    753     floppies when prompted.</para>
    754 </listitem>
    755747</itemizedlist>
    756748<para>Next, restore archives to your live filesystem.</para>
     
    760752command-line options.</para>
    761753</listitem>
    762 <listitem><para>Insert the CD or the first boot floppy when prompted.
     754<listitem><para>Insert the CD when prompted.
    763755                Press &lt;Enter&gt;. Wait a moment.</para></listitem>
    764756<listitem><para>Select a subset of files to restore, e.g. /usr/local/man
     
    772764<itemizedlist>
    773765<listitem>
    774 <para>Boot from CD/floppies.</para>
     766<para>Boot from CD.</para>
    775767</listitem>
    776768<listitem><para>Select 'Interactive Mode' at boot-time. (Type
     
    910902</listitem>
    911903<listitem>
    912 <para>floppy disk support (built in)</para>
    913 </listitem>
    914 <listitem>
    915904<para>ext2 file system support (built-in)</para>
    916905</listitem>
     
    923912also</para>
    924913<para>vfat support in the active kernel - mindi needs this when creating
    925 syslinux boot floppies</para>
     914syslinux boot images</para>
    926915</listitem>
    927916</itemizedlist>
     
    934923module. It does require that your kernel support the initrd
    935924initial ramdisk facility. Typically this is supported by the Linux
    936 kernel. Modules used are needed to support the CD, floppy disks,
     925kernel. Modules used are needed to support the CD,
    937926hard disks, etc. If the support is modular, then the modules will
    938927be incorporated in a boot disk by Mindi. If the support is built-in
     
    12181207
    12191208# mindi
    1220 Mindi Linux mini-distro generator v1.09-r762
     1209Mindi Linux mini-distro generator v1.2.4-r1532
    12211210
    12221211Latest Mindi is available from http://www.mondorescueg
     
    12271216Do you want to use your own kernel to build the boot disk (y/n) ?y
    12281217Would you like to use LILO (instead of syslinux)
    1229 for your boot CD/floppies (y/n) ?n
     1218for your boot CD (y/n) ?n
    12301219Analyzing dependency requirements                               Done.
    12311220Making complete dependency list                                 Done.
     
    12541243Tarring and zipping the groups..................                Done.
    12551244Creating data disk #1...#2...#3...#4...#5...                    Done.
    1256 Making 1722KB boot disk...........................1440+0 enregistrements lus.
    1257 1440+0 enregistrements écrits.
    1258 mke2fs 1.38 (30-Jun-2005)
    1259 Failed to copy /boot/vmlinuz-2.6.12-15mdk-i686-up-4GB to ramdisk
    1260 
    1261 Warning - failed to create 1.44MB boot/root floppies
    1262 
    1263 Warning - failed to create 1.72MB boot image. Please reduce your kernel's size
    1264 
    1265 if you want to make a 1.72MB floppy disk.
    1266 
    12671245Making 2880KB boot disk...........................mkfs.vfat 2.10 (22 Sep 2003)
    12681246... 2880 KB boot disks were created OK                          Done.
    12691247In the directory '/var/cache/mindi' you will find the images:-
    12701248   mindi-data-1.img    mindi-data-2.img    mindi-data-3.img    mindi-data-4.img    mindi-data-5.img mindi-root.1440.img
    1271 Would you like to create boot+data floppy disks now (y/n) ?n
    12721249Shall I make a bootable CD image? (y/n) y
    12731250NB: Mindi's bootable CD always uses isolinux.
     
    12831260</screen>
    12841261
    1285 <para>If your kernel is too large (more than about 900KB) then you
    1286 cannot make boot floppies, although you can still make a bootable
    1287 CD image. The easiest way to test Mindi in either case is to say
    1288 'n' to its first question and 'y' to its second, then use the
     1262<para>
     1263The easiest way to test Mindi is to say
     1264'y' to the last question, then use the
    12891265separate application cdrecord to make a bootable CD-R or
    12901266CD-RW.</para>
     
    15311507isn't a good idea unless you're a Mondo expert because they'll try
    15321508to restore over a network by default, which is silly because the
    1533 archives are on the CD's). Or, you can boot from the Mindi floppies
    1534 (or mondorescue.iso) and hit ENTER a few times to restore.</para>
     1509archives are on the CD's). Or, you can boot from the Mindi
     1510mondorescue.iso and hit ENTER a few times to restore.</para>
    15351511<para>Those ISO images can also be used for a PXE restore. For this
    15361512        to work, please refer to the file README.pxe provided with
     
    19081884</para>
    19091885<para>If you find that you cannot make your PC boot from the CD,
    1910 take heart: the first backup CD of each set contains floppy disk
    1911 images to give you the same functionality as the CD (minus the
    1912 archives, of course) on floppies. Remember, your Mondo CD is a
    1913 fully functional CD-based mini-distribution as well as a recovery
    1914 CD.</para>
     1886it's mostly because not all the required drivers to support the CD are included.
     1887</para>
    19151888<para>You can choose from the following modes:</para>
    19161889
     
    20121985<listitem>
    20131986<para>If it did not work then please copy /tmp/mondo-restore.log to
    2014 a floppy (or to your hard disk, USB key, ...), gzip it and e-mail it to the
     1987your hard disk, USB key, ..., gzip it and e-mail it to the
    20151988&ML;.</para>
    20161989</listitem>
     
    23552328<para>It is now possible to restore to a live filesystem using
    23562329Mondo. In other words, you do not have to boot your PC from your
    2357 CD/floppy in order to restore files. Mondo was originally designed
     2330CD in order to restore files. Mondo was originally designed
    23582331for disaster recovery - situations in which you cannot boot your
    23592332PC. If you can boot your PC, it is not really a disaster, is it? :)
     
    23842357Choose your type of backup media. The live restoration process is
    23852358very similar to what you'll experience if you type mondorestore
    2386 with no parameters after booting from a Mondo CD/floppy.
     2359with no parameters after booting from a Mondo CD.
    23872360</entry>
    23882361</row>
     
    23972370Hit 'OK' when you have inserted the tape/CD. If you generated a
    23982371tape backup, the tape itself should be enough. If you generated a
    2399 CD backup, the first CD should be enough. Otherwise, you may need
    2400 the boot floppy.
     2372CD backup, the first CD should be enough.
    24012373</entry>
    24022374</row>
     
    26572629</qandaentry>
    26582630<qandaentry>
    2659 <question><para>Q: Why do you insist on putting floppy
    2660 disk images on Mondo CD? They waste space and I never use them. The
    2661 CD works just fine, so why keep the floppy disk images?</para>
    2662 </question>
    2663 <answer>
    2664 <para>A: Because. It helped us in the past. If you
    2665 really, truly want them gone then please submit a patch to make
    2666 them optional.</para>
    2667 </answer>
    2668 </qandaentry>
    2669 <qandaentry>
    26702631<question><para>Q: Why doesn't the Mondo project have a
    26712632cool-looking animal logo?</para></question>
     
    27372698your kernel does not support these things, Mondo will not boot from
    27382699your CD. However, when running Mindi, you may choose to use _its_
    2739 kernel instead of your own. In addition, you may boot from floppy
    2740 disk images instead the CD: copy the disk images from the CD
    2741 /images directory to floppy disks, using 'dd'. Take a look at
    2742 <link linkend="copybootdatadisk">Copy boot data
    2743 disks</link> on how to make those.</para>
    2744 </answer>
    2745 </qandaentry>
    2746 <qandaentry>
    2747 <question><para>Q: The Mondo CD/floppy takes ages to
     2700kernel instead of your own.
     2701</para>
     2702</answer>
     2703</qandaentry>
     2704<qandaentry>
     2705<question><para>Q: The Mondo CD takes ages to
    27482706                boot. How can I speed it up?</para></question>
    27492707<answer>
     
    27702728                CD?</para></question>
    27712729<answer>
    2772 <para>A: Copy the image files from the CD /images directory, using
    2773 the dd command. Take a look at
    2774 <link linkend="copybootdatadisk">Copy boot data
    2775 disks</link> on how to make those. Then boot from the first
    2776 floppy; follow it up with the data disks; finally, type 'mount
    2777 /mnt/cdrom' and then utilize the restore script as usual, e.g.
    2778 mondorestore.</para>
    2779 <para>A: You may also want to boot using the network with PXE.
     2730<para>A: You may want to boot using the network with PXE.
    27802731        Look at the README.pxe file of mindi to know more details on how.</para>
     2732<para>A: You may also want to use a USB device (key, disk) if your machine can boot from it.
    27812733</answer>
    27822734</qandaentry>
     
    28012753<para>A: On the tape. :-) The first 32MB of the tape will be set
    28022754aside for a large tarball containing the data disks, a list of all
    2803 files backed up, and other sundries. If Mondo and Mindi do their
    2804 respective jobs then you won't need additional floppies, just the
    2805 boot floppy and the tape(s).</para>
     2755files backed up, and other sundries.
     2756</para>
    28062757<para>For the moment mondorescue doesn't support OBDR for tapes.
    28072758        Feel free to produce patches for it :-)</para>
     
    28302781at <link linkend="overview-sysrq-kernelreq">Linux Kernel support</link> to
    28312782see what your kernel must support.</para>
    2832 </answer>
    2833 </qandaentry>
    2834 <qandaentry>
    2835 <question>
    2836 <para id="copybootdatadisk">Q: How do i copy boot+data disk images to physical floppy disks ?</para>
    2837 </question>
    2838 <answer>
    2839         <para>A: The images are in /var/cache/mindi (even if they are
    2840 created by Mondo) and also in the 'images' directory on the first
    2841 CD of your backup set, if you have backed up to CD. You can copy
    2842 the images to disk as follows:-</para>
    2843 <informaltable><tgroup cols="1"><tbody>
    2844 <row>
    2845 <entry>
    2846         Put an empty Boot floppy
    2847 </entry>
    2848 </row>
    2849 <row>
    2850 <entry>
    2851         bash# fdformat /dev/fd0u1722
    2852 </entry>
    2853 </row>
    2854 <row>
    2855 <entry>
    2856         bash# dd if=/var/cache/mindi/mindi-boot.1722.img of=/dev/fd0u1722
    2857 </entry>
    2858 </row>
    2859 <row>
    2860 <entry>
    2861         Put an empty Data floppy
    2862 </entry>
    2863 </row>
    2864 <row>
    2865 <entry>
    2866         bash# fdformat /dev/fd0
    2867 </entry>
    2868 </row>
    2869 <row>
    2870 <entry>
    2871         bash# dd if=/var/cache/mindi/mindi-data-N.img of=/dev/fd0
    2872 </entry>
    2873 </row>
    2874 <row>
    2875 <entry>
    2876         Replace N with 1, 2, etc.
    2877 
    2878 </entry>
    2879 </row>
    2880 </tbody></tgroup></informaltable>
    28812783</answer>
    28822784</qandaentry>
     
    30032905</qandaentry>
    30042906<qandaentry>
    3005 <question><para>Q: How do I copy the floppy images from
    3006                 the CD to floppy disks?</para></question>
    3007 <answer>
    3008 <para>A: Mount the CD-ROM, e.g. at /mnt/cdrom. Insert a blank
    3009 floppy. Type:</para>
    3010 <para></para>
    3011 <informaltable><tgroup cols="1"><tbody>
    3012 <row>
    3013 <entry>
    3014 
    3015         bash# cd /mnt/cdrom/images
    3016 </entry>
    3017 </row>
    3018 <row>
    3019 <entry>
    3020         bash# dd if=mindi-boot.1722.img of=/dev/fd0u1722
    3021 
    3022 </entry>
    3023 </row>
    3024 </tbody></tgroup></informaltable>
    3025 
    3026 <para>Insert another blank floppy and type:</para>
    3027 <para></para>
    3028 <informaltable><tgroup cols="1"><tbody>
    3029 <row>
    3030 <entry>
    3031 
    3032 bash# dd if=mindi-data-1.img of=/dev/fd0u1722
    3033 
    3034 </entry>
    3035 </row>
    3036 </tbody></tgroup></informaltable>
    3037 
    3038 <para>Do the above for each 'mindi-data' disk image.</para>
    3039 </answer>
    3040 </qandaentry>
    3041 <qandaentry>
    30422907<question><para>Q: Sometimes, my laptop won't mount
    30432908                Mondo CD properly, or something. Umm...</para></question>
     
    32033068<para>A: Yes. Just backup as usual but add '-d /mnt/nfs' or
    32043069wherever your partition is mounted; don't use '-Oc' or '-Ot' at
    3205 all; just '-Oi -d /root'. Then, after booting from the floppies
     3070all; just '-Oi -d /root'. Then, after booting from the media
    32063071which Mondo generates, you need to type 'ISO' at the
    32073072console.</para>
     
    33043169<qandaentry>
    33053170<question><para id="SEGF">Q: When I restore after
    3306 booting from the CD/floppies, I sometimes get errors like, "Running
     3171booting from the CD, I sometimes get errors like, "Running
    33073172out of memory" or "Segmentation fault". What is going on?</para></question>
    33083173<answer><para>A: It sounds as if you are running out of disk
  • branches/stable/mondo-web/distributions/debian/mondo-web.doc-base

    r1222 r1581  
    66 effortlessly backup and interactively restore Linux, Windows and other
    77 supported filesystem partitions to/from CD-R/RW media, tape, NFS, ... and
    8  Mindi Linux provides the bootable emergency restore CD/floppy set which Mondo
     8 Mindi Linux provides the bootable emergency restore CD set which Mondo
    99 uses at boot-time.
    1010Section: utils
  • branches/stable/mondo-web/mondo-web.pl

    r1225 r1581  
    5353my @media = sort keys %media;
    5454my %options = (
    55         'NOFLOPPY' => 'No Boot floppy production',
    5655        'NOBOOTABLE' => 'Create Non-Bootable media',
    5756        'AUTO', => 'Auto Restore Mode',
     
    154153
    155154    @default = (@default,'AUTO') if ($config->get("mondo_automatic_restore") =~ /yes/);
    156     @default = (@default,'NOFLOPPY') if ($config->get("mondo_write_boot_floppy") =~ /no/);
    157155    @default = (@default,'DIFF') if ($config->get("mondo_differential") =~ /yes/);
    158156    #'NFSEXCL' => 'Exclude Network File Systems',
     
    263261    }
    264262    foreach my $s ($cgi->param('options')) {
    265         $command .= "-F " if ($s =~ /NOFLOPPY/);
    266263        $command .= "-W " if ($s =~ /NOBOOTABLE/);
    267264        $command .= "-H " if ($s =~ /AUTO/);
  • branches/stable/mondo/distributions/debian/README.Debian

    r1051 r1581  
    77This is not the official Debian package of mondo but the upstream
    88version. Please to not report errors to the Debian Bug Tracking
    9 System but to <the mailing list>. Thnak you.
     9System but to <the mailing list>. Thank you.
    1010
    1111IMPORTANT +++ IMPORTANT +++ IMPORTANT +++ IMPORTANT +++ IMPORTANT
     
    108108
    109109
    110 Using floppy disks as rescue media
    111 ----------------------------------
    112 
    113 mondoarchive will offer to write a set of rescue floppies (unless the '-F'
    114 switch is used). These floppy disks will only work with the FAILSAFE kernel. The
    115 reason is that stock Debian kernels don't have the floppy driver built into the
    116 kernel and that the kernel is too large for one floppy with an initrd and a
    117 kernel image. Because of the space issue, mondoarchiv (or rather mindi) creates
    118 a root/boot floppy set. Because the stock kernel does not have floppy support
    119 compiled in a kernel panic results when trying to acces the second (the root)
    120 floppy.
    121 
    122 Also, building the boot/root floppy images requires that lilo is installed on
    123 the system. This does not mean that it actually needs to be used to boot the
    124 system, only that the package is installed. (Because most people won't need the
    125 boot/root floppies, the mindi package only suggests the lilo package.)
    126 
    127 Finally a word of caution: Floppy disks are notoriously unreliable. Dont't use
    128 them unless you really really have to. (A CD writer costs the same as a few
    129 boxes of floppy disks these days.)
    130 
    131 
    132110 -- Andree Leidenfrost <aleidenf@bigpond.net.au>  Sun,  8 Jan 2005 15:20:05 +1100
  • branches/stable/mondo/po/fr.po

    r1558 r1581  
    11481148
    11491149#: ../src/mondorestore/mondo-rstr-tools.c:2223
    1150 msgid "Cannot find config info on tape/CD/floppy"
     1150msgid "Cannot find config info on tape/CD"
    11511151msgstr "Impossible de trouver des infos de configuration sur CD/tape..."
    11521152
     
    12861286msgid ""
    12871287"Partition and format your disk using Compaq's disaster recovery CD. After "
    1288 "you've done that, please reboot with your Mondo CD/floppy in Interactive "
     1288"you've done that, please reboot with your Mondo CD in Interactive "
    12891289"Mode."
    12901290msgstr ""
     
    15231523
    15241524#: ../src/mondorestore/mondorestore.c:887
    1525 msgid "Please insert tape/CD/boot floppy, then hit 'OK' to continue."
    1526 msgstr "Insérez le CD/bande/disquette puis appuyez sur 'OK'"
     1525msgid "Please insert tape/CD, then hit 'OK' to continue."
     1526msgstr "Insérez le CD/bande puis appuyez sur 'OK'"
    15271527
    15281528#: ../src/mondorestore/mondorestore.c:900
     
    17071707
    17081708#: ../src/mondorestore/mondorestore.c:3160
    1709 msgid "Run complete. Please remove floppy/CD/media and reboot."
    1710 msgstr "Terminé. Enlevez le/a disauette/CD/media et rebootez."
     1709msgid "Run complete. Please remove CD/media and reboot."
     1710msgstr "Terminé. Enlevez le CD/media et rebootez."
    17111711
    17121712#: ../src/mondorestore/mondorestore.c:3175
     
    19681968
    19691969#: ../src/common/libmondo-devices.c:1457
    1970 msgid "Please remove CD/floppy from drive(s)"
    1971 msgstr "Veuillez enlevez le CD ou la disquette du lecteur"
     1970msgid "Please remove CD from drive"
     1971msgstr "Veuillez enlevez le CD du lecteur"
    19721972
    19731973#: ../src/common/libmondo-devices.c:1480
     
    26772677
    26782678#: ../src/mondoarchive/mondo-cli.c:842
    2679 msgid "using LILO instead of SYSLINUX as the CD/floppy's boot loader."
    2680 msgstr "LILO au lieu de SYSLINUX comme chargeur d'amorçage pour votre CD/Floppy"
     2679msgid "using LILO instead of SYSLINUX as the CD boot loader."
     2680msgstr "LILO au lieu de SYSLINUX comme chargeur d'amorçage pour votre CD"
    26812681
    26822682#: ../src/mondoarchive/mondo-cli.c:848
  • branches/stable/mondo/src/common/libmondo-archive.c

    r1572 r1581  
    4444extern struct mr_ar_conf *mr_conf;
    4545
    46 
    47 
    48 /** @def DEFAULT_1722MB_DISK The default 1.722M floppy disk to write images to. */
    49 /** @def BACKUP_1722MB_DISK  The 1.722M floppy disk to try if the default fails. */
    50 
    51 #ifdef __FreeBSD__
    52 #define DEFAULT_1722MB_DISK "/dev/fd0.1722"
    53 #define BACKUP_1722MB_DISK "/dev/fd0.1722"
    54 #else
    55 #define DEFAULT_1722MB_DISK "/dev/fd0u1722"
    56 #define BACKUP_1722MB_DISK "/dev/fd0H1722"
     46#ifndef __FreeBSD__
    5747#ifndef _SEMUN_H
    5848#define _SEMUN_H
     
    6757    struct seminfo *__buf;
    6858};
    69 #endif
    7059#endif                          /* __FreeBSD__ */
    7160
     
    793782        res++;
    794783        log_OS_error("Unable to make images directory");
    795     }
    796     mr_free(command);
    797 
    798     mr_asprintf(&command, "mkdir -p %s%s", bkpinfo->scratchdir, MNT_FLOPPY);
    799     if (system(command)) {
    800         res++;
    801         log_OS_error("Unable to make mnt floppy directory");
    802784    }
    803785    mr_free(command);
     
    13071289    }
    13081290    return (retval);
    1309 }
    1310 
    1311 
    1312 /**
    1313  * Calls floppy-formatting @c cmd and tracks its progress if possible.
    1314  *
    1315  * @param cmd The command to run (e.g. @c fdformat @c /dev/fd0).
    1316  * @param title The human-friendly description of the floppy you are writing.
    1317  * This will be used as the title in the progress bar window. Example:
    1318  * "Formatting disk /dev/fd0".
    1319  * @see format_disk
    1320  * @return The exit code of fdformat/superformat.
    1321  */
    1322 int format_disk_SUB(char *cmd, char *title)
    1323 {
    1324 
    1325     /*@ int *************************************************************** */
    1326     int res = 0;
    1327     int percentage = 0;
    1328     int maxtracks = 0;
    1329     int trackno = 0;
    1330     int last_trkno = 0;
    1331 
    1332     /*@ buffers *********************************************************** */
    1333     char *command = NULL;
    1334     char *tempfile;
    1335 
    1336     /*@ pointers ********************************************************** */
    1337     FILE *pin;
    1338 
    1339     assert_string_is_neither_NULL_nor_zerolength(cmd);
    1340     assert_string_is_neither_NULL_nor_zerolength(title);
    1341 
    1342     malloc_string(tempfile);
    1343 #ifdef __FreeBSD__
    1344 /* Ugh. FreeBSD fdformat prints out this pretty progress indicator that's
    1345    impossible to parse. It looks like
    1346    VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVF-------------------
    1347    where V means verified, E means error, F means formatted, and - means
    1348    not done yet.
    1349 */
    1350     return (run_program_and_log_to_screen(cmd, title));
    1351 #endif
    1352 
    1353 /* if Debian then do bog-standard superformat; don't be pretty */
    1354     if (strstr(cmd, "superformat")) {
    1355         return (run_program_and_log_to_screen(cmd, title));
    1356     }
    1357 /* if not Debian then go ahead & use fdformat */
    1358     strcpy(tempfile,
    1359            call_program_and_get_last_line_of_output
    1360            ("mktemp -q /tmp/mondo.XXXXXXXX"));
    1361     mr_asprintf(&command, "%s >> %s 2>> %s; rm -f %s", cmd, tempfile, tempfile, tempfile);
    1362     mr_msg(3, command);
    1363     open_evalcall_form(title);
    1364     if (!(pin = popen(command, "r"))) {
    1365         log_OS_error("fmt err");
    1366         return (1);
    1367     }
    1368     if (strstr(command, "1722")) {
    1369         maxtracks = 82;
    1370     } else {
    1371         maxtracks = 80;
    1372     }
    1373     mr_free(command);
    1374 
    1375     for (sleep(1); does_file_exist(tempfile); sleep(1)) {
    1376         trackno = get_trackno_from_logfile(tempfile);
    1377         if (trackno < 0 || trackno > 80) {
    1378             mr_msg(1, "Weird track#");
    1379             continue;
    1380         }
    1381         percentage = trackno * 100 / maxtracks;
    1382         if (trackno <= 5 && last_trkno > 40) {
    1383             close_evalcall_form();
    1384             strcpy(title, "Verifying format");
    1385             open_evalcall_form(title);
    1386         }
    1387         last_trkno = trackno;
    1388         update_evalcall_form(percentage);
    1389     }
    1390     close_evalcall_form();
    1391     if (pclose(pin)) {
    1392         res++;
    1393         log_OS_error("Unable to pclose");
    1394     }
    1395     unlink(tempfile);
    1396     mr_free(tempfile);
    1397     return (res);
    1398 }
    1399 
    1400 
    1401 /**
    1402  * Wrapper around @c format_disk_SUB().
    1403  * This function calls @c format_disk_SUB() with a @c device of its @c device
    1404  * parameter and a @c title of Formatting disk @c device. If the format
    1405  * fails, the user will be given the option of retrying.
    1406  *
    1407  * @param device The floppy drive to write to.
    1408  * @see format_disk_SUB
    1409  * @return The exit code of fdformat/superformat.
    1410  * @ingroup deviceGroup
    1411  */
    1412 int format_disk(char *device)
    1413 {
    1414 
    1415     /*@ int ************************************************************** */
    1416     int res = 0;
    1417 
    1418     /*@ buffer *********************************************************** */
    1419     char *command;
    1420     char *title;
    1421 
    1422     assert_string_is_neither_NULL_nor_zerolength(device);
    1423 
    1424     if (!system("which superformat > /dev/null 2> /dev/null")) {
    1425         mr_asprintf(&command, "superformat %s", device);
    1426     } else {
    1427 #ifdef __FreeBSD__
    1428         mr_asprintf(&command, "fdformat -y %s", device);
    1429 #else
    1430         mr_asprintf(&command, "fdformat %s", device);
    1431 #endif
    1432     }
    1433     mr_asprintf(&title, "Formatting disk %s", device);
    1434     while ((res = format_disk_SUB(command, title))) {
    1435         if (!ask_me_yes_or_no("Failed to format disk. Retry?")) {
    1436             return (res);
    1437         }
    1438     }
    1439     mr_free(title);
    1440     mr_free(command);
    1441     return (res);
    14421291}
    14431292
     
    26072456
    26082457/**
    2609  * Offer to write boot and data disk images to 3.5" floppy disks.
    2610  * @param bkpinfo The backup information structure. Only the
    2611  * @c backup_media_type field is used in this function.
    2612  * @param imagesdir The directory containing the floppy images (usually
    2613  * /var/cache/mindi).
    2614  *
    2615  * @return The number of errors encountered (0 for success)
    2616  * @see write_image_to_floppy
    2617  * @see format_disk
    2618  * @ingroup MLarchiveGroup
    2619  */
    2620 int offer_to_write_floppies(struct s_bkpinfo *bkpinfo, char *imagesdir)
    2621 {
    2622     /*@ buffer ************************************************************ */
    2623     char *tmp = NULL;
    2624     char *comment = NULL;
    2625     char *bootdisk_dev =NULL;
    2626     char *datadisk_dev = NULL;
    2627     char *bootdisk_file = NULL;
    2628     char *rootdisk_file = NULL;
    2629 
    2630     /*@ int *************************************************************** */
    2631     int i = 0;
    2632     int res = 0;
    2633 
    2634     /*@ bool ************************************************************** */
    2635     bool format_first;
    2636     bool root_disk_exists = FALSE;
    2637 
    2638     assert(bkpinfo != NULL);
    2639     assert_string_is_neither_NULL_nor_zerolength(imagesdir);
    2640 
    2641     if (!ask_me_yes_or_no
    2642         ("Write boot and data disk images to 3.5\" floppy disks?")) {
    2643         return (0);
    2644     }
    2645     if (does_device_exist(DEFAULT_1722MB_DISK)) {
    2646 #ifdef __FreeBSD__
    2647         // tell the system that this is a 1.72m floppy
    2648         system("/usr/sbin/fdcontrol -F 1722 /dev/fd0.1722");
    2649 #endif
    2650         mr_asprintf(&bootdisk_dev, DEFAULT_1722MB_DISK);
    2651     } else if (does_device_exist(BACKUP_1722MB_DISK)) {
    2652         mr_asprintf(&bootdisk_dev, "/dev/fd0H1722");
    2653     } else {
    2654         mr_msg(1, "Warning - can't find a 1.72MB floppy device *sigh*");
    2655         mr_asprintf(&bootdisk_dev, DEFAULT_1722MB_DISK);
    2656     }
    2657     mr_asprintf(&datadisk_dev, "/dev/fd0");
    2658     if (!does_device_exist(datadisk_dev)) {
    2659         mr_msg(1, "Warning - can't find a 1.44MB floppy device *sigh*");
    2660     }
    2661     format_first = ask_me_yes_or_no
    2662         ("Do you want me to format the disks before I write to them?");
    2663 
    2664     /* boot disk */
    2665     if (ask_me_OK_or_cancel("About to write boot disk")) {
    2666         log_to_screen("Writing boot floppy");
    2667 #ifdef __FreeBSD__
    2668         mr_asprintf(&tmp, "%s/mindi-kern.1722.img", imagesdir);
    2669         if (format_first) {
    2670             format_disk(bootdisk_dev);
    2671         }
    2672         res += write_image_to_floppy(bootdisk_dev, tmp);
    2673         mr_free(tmp);
    2674 
    2675         if (ask_me_OK_or_cancel("About to write 1.44MB mfsroot disk")) {
    2676             log_to_screen("Writing mfsroot floppy");
    2677             if (format_first) {
    2678                 format_disk(datadisk_dev);
    2679             }
    2680             mr_asprintf(&tmp, "%s/mindi-mfsroot.1440.img", imagesdir);
    2681             write_image_to_floppy(datadisk_dev, tmp);
    2682             mr_free(tmp);
    2683         }
    2684 #else
    2685         mr_asprintf(&bootdisk_file, "%s/mindi-bootroot.1722.img", imagesdir);
    2686         if (does_file_exist(bootdisk_file)) {
    2687             if (format_first) {
    2688                 format_disk(bootdisk_dev);
    2689             }
    2690             res += write_image_to_floppy(bootdisk_dev, bootdisk_file);
    2691         } else {
    2692             mr_free(bootdisk_file);
    2693             mr_asprintf(&bootdisk_file, "%s/mindi-boot.1440.img", imagesdir);
    2694             mr_asprintf(&rootdisk_file, "%s/mindi-root.1440.img", imagesdir);
    2695             root_disk_exists = TRUE;
    2696             if (!does_file_exist(rootdisk_file)
    2697                 || !does_file_exist(bootdisk_file)) {
    2698                 popup_and_OK
    2699                     ("Cannot write boot/root floppies. Files not found.");
    2700                 log_to_screen
    2701                     ("Failed to find boot/root floppy images. Oh dear.");
    2702                 mr_free(bootdisk_file);
    2703                 mr_free(rootdisk_file);
    2704                 mr_free(bootdisk_dev);
    2705                 return (1);
    2706             }
    2707             if (format_first) {
    2708                 format_disk(datadisk_dev);
    2709             }
    2710             res += write_image_to_floppy(datadisk_dev, bootdisk_file);
    2711             if (ask_me_OK_or_cancel("About to write root disk")) {
    2712                 log_to_screen("Writing root floppy");
    2713                 if (format_first) {
    2714                     format_disk(datadisk_dev);
    2715                 }
    2716                 mr_asprintf(&tmp, "cat %s > %s", rootdisk_file, datadisk_dev);
    2717                 mr_msg(1, "tmp = '%s'", tmp);
    2718                 res +=
    2719                     run_external_binary_with_percentage_indicator_NEW
    2720                     ("Writing root floppy", tmp);
    2721 //              res += write_image_to_floppy (datadisk_dev, rootdisk_file);
    2722                 mr_free(tmp);
    2723             }
    2724             mr_free(rootdisk_file);
    2725            
    2726         }
    2727         mr_free(bootdisk_file);
    2728 #endif
    2729     }
    2730     mr_free(bootdisk_dev);
    2731 
    2732     if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    2733         log_to_screen
    2734             ("FYI, the data disks are stored on tape/CD for your convenience.");
    2735         return (0);
    2736     }
    2737     for (i = 1; i < 99; i++) {
    2738         mr_asprintf(&tmp, "%s/mindi-data-%d.img", imagesdir, i);
    2739         mr_msg(3, tmp);
    2740         if (!does_file_exist(tmp)) {
    2741             mr_msg(3, "...not found");
    2742             break;
    2743         }
    2744         mr_asprintf(&comment, "About to write data disk #%d", i);
    2745         if (ask_me_OK_or_cancel(comment)) {
    2746             mr_free(comment);
    2747             mr_asprintf(&comment, "Writing data disk #%3d", i);
    2748             log_to_screen(comment);
    2749             mr_free(comment);
    2750             if (format_first) {
    2751                 res += format_disk(datadisk_dev);
    2752             }
    2753             res += write_image_to_floppy(datadisk_dev, tmp);
    2754         }
    2755         mr_free(tmp);
    2756     }
    2757     /* In case of break free mem as well */
    2758     mr_free(tmp);
    2759     mr_free(datadisk_dev);
    2760     return (res);
    2761 }
    2762 
    2763 
    2764 /**
    2765  * Wrapper around @c offer_to_write_floppies().
    2766  * @param bkpinfo The backup information structure. Used only
    2767  * in the call to @c offer_to_write_floppies().
    2768  * @return 0 if the boot floppies were found (not necessarily written OK),
    2769  * 1 otherwise.
    2770  * @see offer_to_write_floppies
    2771  * @ingroup MLarchiveGroup
    2772  */
    2773 
    2774 int offer_to_write_boot_floppies_to_physical_disks(struct s_bkpinfo *bkpinfo) {
    2775    
    2776     int res = 0;
    2777 
    2778     assert(bkpinfo != NULL);
    2779 
    2780     mvaddstr_and_log_it(g_currentY, 0,
    2781                         "Writing boot+data floppy images to disk");
    2782 
    2783     if (!bkpinfo->nonbootable_backup) {
    2784 #ifdef __FreeBSD__
    2785         if (!does_file_exist(MINDI_CACHE"/mindi-kern.1722.img"))
    2786 #else
    2787         /* BERLIOS: To be improved */
    2788         if (!does_file_exist(MINDI_CACHE"/mindi-bootroot.1722.img")
    2789             && !does_file_exist(MINDI_CACHE"/mindi-boot.1440.img")
    2790             && !does_file_exist(MINDI_CACHE"/mindi-boot.2880.img")
    2791             && !does_file_exist(MINDI_CACHE"/mindi-boot.5760.img")
    2792             && !does_file_exist(MINDI_CACHE"/mindi-boot.8192.img"))
    2793 #endif
    2794         {
    2795             mvaddstr_and_log_it(g_currentY++, 74, "No Imgs");
    2796             if (does_file_exist(MINDI_CACHE"/mondorescue.iso")) {
    2797                 popup_and_OK
    2798                     ("Boot+data floppy creation failed. However, FYI, you may burn "MINDI_CACHE"/mondorescue.iso to a CD and boot from that instead if you wish.");
    2799                 res++;
    2800             }
    2801         } else {
    2802             offer_to_write_floppies(bkpinfo, MINDI_CACHE);
    2803             mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    2804         }
    2805     } else {
    2806         popup_and_OK
    2807             ("Since you opted for a nonbootable backup, no boot floppies were created.");
    2808     }
    2809 
    2810     return (res);
    2811 }
    2812 
    2813 
    2814 /**
    28152458 * @addtogroup LLarchiveGroup
    28162459 * @{
     
    38123455
    38133456
    3814 /**
    3815  * @addtogroup utilityGroup
    3816  * @{
    3817  */
    3818 /**
    3819  * Write an image to a real 3.5" floppy disk.
    3820  * @param device The device to write to (e.g. @c /dev/fd0)
    3821  * @param datafile The image to write to @p device.
    3822  * @return The number of errors encountered (0 for success)
    3823  * @see write_image_to_floppy
    3824  */
    3825 int write_image_to_floppy_SUB(char *device, char *datafile)
    3826 {
    3827     /*@ int *************************************************************** */
    3828     int res = 0;
    3829     int percentage = 0;
    3830     int blockno = 0;
    3831     int maxblocks = 0;
    3832 
    3833     /*@ buffers************************************************************ */
    3834     char *tmp;
    3835     char blk[1024];
    3836     char *title;
    3837 
    3838     /*@ pointers ********************************************************** */
    3839     char *p;
    3840     FILE *fout, *fin;
    3841 
    3842 
    3843     /* pretty stuff */
    3844     if (!(p = strrchr(datafile, '/'))) {
    3845         p = datafile;
    3846     } else {
    3847         p++;
    3848     }
    3849     mr_asprintf(&title, "Writing %s to floppy", p);
    3850     open_evalcall_form(title);
    3851     mr_free(title);
    3852 
    3853     /* functional stuff */
    3854     for (p = device + strlen(device); p != device && isdigit(*(p - 1));
    3855          p--);
    3856     maxblocks = atoi(p);
    3857     if (!maxblocks) {
    3858         maxblocks = 1440;
    3859     }
    3860     mr_asprintf(&tmp, "maxblocks = %d; p=%s", maxblocks, p);
    3861     mr_msg(2, tmp);
    3862     mr_free(tmp);
    3863 
    3864     /* copy data from image to floppy */
    3865     if (!(fin = fopen(datafile, "r"))) {
    3866         log_OS_error("Cannot open img");
    3867         return (1);
    3868     }
    3869     if (!(fout = fopen(device, "w"))) {
    3870         log_OS_error("Cannot open fdd");
    3871         return (1);
    3872     }
    3873     for (blockno = 0; blockno < maxblocks; blockno++) {
    3874         percentage = blockno * 100 / maxblocks;
    3875         if (fread(blk, 1, 1024, fin) != 1024) {
    3876             if (feof(fin)) {
    3877                 mr_msg(1,
    3878                         "img read err - img ended prematurely - non-fatal error");
    3879                 sleep(3);
    3880                 return (res);
    3881             }
    3882             res++;
    3883             log_to_screen("img read err");
    3884         }
    3885         if (fwrite(blk, 1, 1024, fout) != 1024) {
    3886             res++;
    3887             log_to_screen("fdd write err");
    3888         }
    3889         if (((blockno + 1) % 128) == 0) {
    3890             sync(); /* fflush doesn't work; dunno why */
    3891             update_evalcall_form(percentage);
    3892         }
    3893     }
    3894     paranoid_fclose(fin);
    3895     paranoid_fclose(fout);
    3896     close_evalcall_form();
    3897     return (res);
    3898 }
    3899 
    3900 
    3901 /**
    3902  * Wrapper around @c write_image_to_floppy_SUB().
    3903  * This function, unlike @c write_image_to_floppy_SUB(),
    3904  * gives the user the opportunity to retry if the write fails.
    3905  * @see write_image_to_floppy_SUB
    3906  */
    3907 int write_image_to_floppy(char *device, char *datafile)
    3908 {
    3909     /*@ int ************************************************************** */
    3910     int res = 0;
    3911 
    3912     assert_string_is_neither_NULL_nor_zerolength(device);
    3913     assert_string_is_neither_NULL_nor_zerolength(datafile);
    3914 
    3915     while ((res = write_image_to_floppy_SUB(device, datafile))) {
    3916         if (!ask_me_yes_or_no("Failed to write image to floppy. Retry?")) {
    3917             return (res);
    3918         }
    3919     }
    3920     return (res);
    3921 }
    3922 
    3923 /* @} - end of utilityGroup */
    3924 
    39253457void setenv_mondo_var(void) {
    39263458
  • branches/stable/mondo/src/common/libmondo-devices.c

    r1578 r1581  
    14591459    }
    14601460    if (bkpinfo->backup_media_type == tape && bkpinfo->restore_data) {
    1461         popup_and_OK(_("Please remove CD/floppy from drive(s)"));
     1461        popup_and_OK(_("Please remove CD from drive"));
    14621462    }
    14631463    mr_msg(3, "media type = %s",
  • branches/stable/mondo/src/mondoarchive/mondo-cli.c

    r1569 r1581  
    827827                (_("Your kernel appears not to support vfat filesystems. I am therefore"));
    828828            log_to_screen
    829                 (_("using LILO instead of SYSLINUX as the CD/floppy's boot loader."));
     829                (_("using LILO instead of SYSLINUX as the CD's boot loader."));
    830830        }
    831831        if (run_program_and_log_output("which mkfs.vfat", FALSE)) {
  • branches/stable/mondo/src/mondoarchive/mondoarchive.c

    r1571 r1581  
    184184    p = NULL;
    185185
    186     mr_cnf->write_boot_floppy = mr_conf_bread("mondo_write_boot_floppy");
    187186    mr_cnf->create_mindi_cd = mr_conf_bread("mondo_create_mindi_cd");
    188187
     
    543542    }
    544543
    545     /* Offer to write floppy disk images to physical disks */
    546     if (bkpinfo->backup_data && !g_skip_floppies) {
    547         res = offer_to_write_boot_floppies_to_physical_disks(bkpinfo);
    548         retval += res;
    549     }
    550 
    551544    /* Report result of entire operation (success? errors?) */
    552545    if (!retval) {
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c

    r1556 r1581  
    20812081
    20822082/**
    2083  * Get the configuration file from the floppy, tape, or CD.
     2083 * Get the configuration file from the tape, or CD.
    20842084 * @param bkpinfo The backup information structure. Fields used:
    20852085 * - @c bkpinfo->backup_media_type
     
    21222122    mr_msg(2, "mountpt = %s; cfg_file=%s", mountpt, cfg_file);
    21232123
    2124     /* Floppy? */
    2125     mr_asprintf(&tmp, "mkdir -p %s", mountpt);
    2126     run_program_and_log_output(tmp, FALSE);
    2127     mr_free(tmp);
    2128 
    21292124    mr_asprintf(&tmp, "mkdir -p %s/tmp", bkpinfo->tmpdir);
    21302125    run_program_and_log_output(tmp, FALSE);
    21312126    mr_free(tmp);
    21322127
    2133     mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output("dmesg | grep -i floppy"));
    2134     if (strcmp(tmp, "")) {
    2135         mr_asprintf(&command, "mount /dev/fd0u1722 %s", mountpt);
    2136         mr_asprintf(&tmp,
    2137             "(sleep 15; kill `ps | grep \"%s\" | cut -d' ' -f1` 2> /dev/null) &",
    2138             command);
    2139         mr_msg(1, "tmp = '%s'", tmp);
    2140         system(tmp);
    2141         mr_free(tmp);
    2142 
    2143         res = run_program_and_log_output(command, FALSE);
    2144         mr_free(command);
    2145 
    2146         if (res) {
    2147             mr_asprintf(&command, "mount /dev/fd0H1440 %s", mountpt);
    2148             res = run_program_and_log_output(command, FALSE);
    2149             mr_free(command);
    2150         }
    2151     } else {
    2152         res = 1;
    2153     }
    2154     if (res) {
    2155         try_plan_B = TRUE;
    2156     } else {
    2157         try_plan_B = TRUE;
    2158         mr_msg(2,
    2159                 "Mounted floppy OK but I don't trust it because the archives might contain more up-to-date config file than the floppy does.");
    2160         // NB: If busybox does not support 'mount -o loop' then Plan A WILL NOT WORK.
    2161         mr_msg(2, "Processing floppy (plan A?)");
    2162         mr_asprintf(&ramdisk_fname, "%s/mindi.rdz", mountpt);
    2163         if (!does_file_exist(ramdisk_fname)) {
    2164             mr_free(ramdisk_fname);
    2165             mr_asprintf(&ramdisk_fname, "%s/initrd.img", mountpt);
    2166         }
    2167         if (!does_file_exist(ramdisk_fname)) {
    2168             mr_msg(2,
    2169                     "Cannot find ramdisk file on mountpoint. Are you sure that's a boot disk in the drive?");
    2170         }
    2171         if (extract_config_file_from_ramdisk
    2172             (bkpinfo, ramdisk_fname, cfg_file, mountlist_file)) {
    2173             mr_msg(2,
    2174                     "Warning - failed to extract config file from ramdisk. I think this boot disk is mangled.");
    2175         }
    2176         mr_asprintf(&command, "umount %s", mountpt);
    2177         run_program_and_log_output(command, 5);
    2178         mr_free(command);
    2179 
    2180         unlink(ramdisk_fname);
    2181         mr_free(ramdisk_fname);
    2182     }
    21832128    if (!does_file_exist(cfg_file)) {
    21842129        mr_msg(2, "gcffa --- we don't have cfg file yet.");
     
    22322177            if (!does_file_exist("tmp/mondo-restore.cfg")) {
    22332178                log_to_screen(_
    2234                               ("Cannot find config info on tape/CD/floppy"));
     2179                              ("Cannot find config info on tape/CD"));
    22352180                return (1);
    22362181            }
    22372182        } else {
    2238             /* BERLIOS : Useless ? */
    2239             /* That boot image doesn't always exist where the following method always works
    2240             log_msg(2,
    2241                     "gcffa --- looking at mounted CD for mindi-boot.2880.img");
    2242             mr_asprintf(&command,
    2243                     "mount " MNT_CDROM
    2244                     "/images/mindi-boot.2880.img -o loop %s", mountpt);
    2245                     */
    22462183            mr_asprintf(&mounted_cfgf_path, "%s/%s", mountpt, cfg_file);
    22472184            if (!does_file_exist(mounted_cfgf_path)) {
  • branches/stable/mondo/src/mondorestore/mondorestore.c

    r1556 r1581  
    173173 * The message to display if we detect that the user is using a Compaq Proliant.
    174174 */
    175 #define COMPAQ_PROLIANTS_SUCK _("Partition and format your disk using Compaq's disaster recovery CD. After you've done that, please reboot with your Mondo CD/floppy in Interactive Mode.")
     175#define COMPAQ_PROLIANTS_SUCK _("Partition and format your disk using Compaq's disaster recovery CD. After you've done that, please reboot with your Mondo media in Interactive Mode.")
    176176
    177177
     
    908908    if (!g_restoring_live_from_cd) {
    909909        popup_and_OK
    910             (_("Please insert tape/CD/boot floppy, then hit 'OK' to continue."));
     910            (_("Please insert tape/CD, then hit 'OK' to continue."));
    911911        sleep(1);
    912912    }
     
    28472847
    28482848    run_program_and_log_output("mkdir -p " MNT_CDROM, FALSE);
    2849     run_program_and_log_output("mkdir -p /mnt/floppy", FALSE);
    28502849
    28512850    malloc_string(a);
     
    31863185            mvaddstr_and_log_it(g_currentY++,
    31873186                                0,
    3188                                 _("Run complete. Please remove floppy/CD/media and reboot."));
     3187                                _("Run complete. Please remove CD/media and reboot."));
    31893188        } else {
    31903189            run_program_and_log_output("sync", FALSE);
Note: See TracChangeset for help on using the changeset viewer.