[ale] replacing disk sda

Preston preston.lists at gmail.com
Wed Apr 23 10:29:08 EDT 2014


On 4/22/2014 5:40 PM, Paul Cartwright wrote:
> On 04/22/2014 04:36 PM, Preston wrote:
>> 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
>>
>>  
> yes, the FILE is there, but do this:
> $ cat mbr-backup-2014-04-15.bak
>
here's one of the mbr-backups.

pboyington at openmediavault:/media/3b7fcae9-905e-4863-91fb-ddfee3396254/Data/fsarchive-backup$
cat mbr-backup-2014-04-15.bak
# partition table of /dev/sdf
unit: sectors

/dev/sdf1 : start=       63, size=224845677, Id=83, bootable
/dev/sdf2 : start=224845740, size=  9590805, Id= 5
/dev/sdf3 : start=        0, size=        0, Id= 0
/dev/sdf4 : start=        0, size=        0, Id= 0
/dev/sdf5 : start=224845803, size=  9590742, Id=82

maybe you were expecting a hex output like dd does?  this is handled by
sfdisk.

-- 
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/20140423/5eb71ff7/attachment.html>


More information about the Ale mailing list