[ale] replacing disk sda

Preston preston.lists at gmail.com
Tue Apr 22 16:36:19 EDT 2014


On 4/22/2014 3:05 PM, Paul Cartwright wrote:
> On 04/22/2014 03:43 PM, Preston wrote:
>> be aware that the mbr will need to be backed up.  fsarchiver doesn't
>> do it as yet (possibly later as was mentioned in a post).
>>
>> I run my OpenMediaVault off a USB thumb drive and didn't think about
>> the mbr until the drive quit.  That's when I made the script.
>>
>> there's no better motivation than drive failure to get you thinking
>> about how good your backups are...
> I'm not sure about that... you said:
>
> I use sfdisk (/sbin/sfdisk) to back up the mbr:
>
>     /sbin/sfdisk -d /dev/sda > /<backup directory>/mbr-backup-`date
> +%Y-%m-%d`.bak
>
> and I looked at Man sfdisk:
>   -d, --dump
>               Dump  the  partitions  of a device in a format that is
> usable as
>               input to sfdisk.  For example,
>                   % sfdisk -d /dev/hda > hda.out
>                   % sfdisk /dev/hda < hda.out
>               will correct the bad last extended partition that the
> OS/2 fdisk
>               creates.
>
>
>
> I ran the script and I got this:
>
> # partition table of /dev/sda
> unit: sectors
>
> /dev/sda1 : start=       63, size=    80262, Id=de
> /dev/sda2 : start=    81920, size= 30191616, Id= 7, bootable
> /dev/sda3 : start= 30273536, size=1595568128, Id= 7
> /dev/sda4 : start=1625843710, size=2281185458, Id= 5
> /dev/sda5 : start=1625843712, size= 12582912, Id=82
> /dev/sda6 : start=1638428672, size=209715200, Id=83
> /dev/sda7 : start=1848145920, size=2058883248, Id=83
>
>
> not an mbr backup.. did I miss something??
> -- 
> Paul Cartwright
> Registered Linux User #367800 and new counter #561587
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
hmm.  I just ran this:

pboyington at openmediavault:~$ su
Password:
root at openmediavault:/home/pboyington# /sbin/sfdisk -d /dev/sdf >
/media/94bfad2d-164f-445a-a761-f7baba3338aa/fsarchive-image/mbr-backup-`date
+%Y-%m-%d`.bak
root at openmediavault:/home/pboyington# ls
/media/94bfad2d-164f-445a-a761-f7baba3338aa/fsarchive-image/
backup-restore.txt
mbr-backup-2014-04-15.bak
omv-backup-2014-02-07.fsa
omv-backup-2014-04-15.fsa
mbr-backup-2014-04-02.bak
mbr-backup-2014-04-22.bak
omv-backup-2014-04-03.fsa
root at openmediavault:/home/pboyington# exit
exit
pboyington at openmediavault:~$

so, it worked on my box. 

pboyington at openmediavault:~$ uname -a
Linux openmediavault 3.2.0-0.bpo.4-amd64 #1 SMP Debian 3.2.51-1~bpo60+1
x86_64 GNU/Linux


-- Be who you are and say what you feel, because those who mind don't
matter and those who matter don't mind. -Dr. Seuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20140422/f7268c3a/attachment.html>


More information about the Ale mailing list