"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "backup-mbr-1.7/README" of archive backup-mbr-1.7.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 
    2 =============================================================================
    3 You can use this script to backup and restore the MBR. v1.7 (11-6-2007)
    4 
    5 The (M)aster (B)oot (R)ecord is the first 512 bytes of a hard drive,
    6 you should always have a current backup of the MBR!
    7 
    8 To hold the MBR, you can use any media with a filesystem on it,
    9 but the filesystem on the media must be supported by the kernel!
   10 
   11 In addition to backing up the MBR of the hard drive you specify, it also
   12 makes a backup of the boot sector from each partition on the hard drive.
   13 
   14 Backup MBR from /dev/sda to directory /mbr on usb device /dev/sdb.
   15 # backup-mbr -b -d /mbr sda sdb  "If directory doesn't exist, will create."
   16 
   17 Restore MBR to /dev/sda from backup in directory /mbr on /dev/sdb.
   18 # backup-mbr -r -d /mbr sda sdb
   19 
   20 Restore boot sector to /dev/sda1 from backup in directory /mbr on /dev/sdb.
   21 # backup-mbr -r -d /mbr sda1 sdb
   22 
   23 If you want to backup the MBR to a multi-session CD-R/RW, do this.
   24 # backup-mbr -cd-multi -b -d /mbr sda scd0
   25 
   26 You can specify the cd device the old (pre kernel v2.6) way, like this.
   27 # backup-mbr -cd-multi -b -d /mbr sda 0,0,0
   28 
   29 You'll need 'cdrecord' and 'mkisofs' installed, and have a CD in the
   30 drive '/dev/scd0', or 0,0,0 etc.
   31 
   32 If it's not a multi-session CD-R/RW, do it this way.
   33 # backup-mbr -cd -b -d /mbr sda scd0  "CD will be written multi-session."
   34 
   35 The non multi-session CD-RW must be blank, blank it first if it's not.
   36 cdrecord blank=fast dev=/dev/scd0  "You'll loose anything on the CD!"
   37 
   38 Or, if you want this script to blank the CD-RW.
   39 
   40 # backup-mbr -cd-blank -b -d /mbr sda scd0
   41 
   42 Restore MBR to /dev/sda from backup in directory /mbr on /dev/scd0.
   43 # backup-mbr -r -d /mbr sda scd0
   44 
   45 krobotti@gmail.com
   46 =============================================================================