[nflug] Disk Image/Restore

Cyber Source peter at thecybersource.com
Tue Jul 25 09:42:40 EDT 2006


joshj at linuxmail.org wrote:
> When we last left our adventurers...
>
>> Heres a dumb question, does the drive that i am copying the image to
>> (using dd) have to be formatted? Im going to guess it doesnt but I
>> just want to make sure.
>
> Nope. "dd" copies from the drive byte-for-byte. So filesystem and all 
> is copied. It will even copy the MBR. A coworker of mine used it to 
> copy winxp from drive to drive. It booted without incident.
>
> You can use dd to backup the MBR  and then replace it before doing 
> something
> risky (aka: reinstall windows):
>
> dd if=/dev/hda of=mbr.img bs=512 count=1
>
>
>>
>> On 7/25/06, Cyber Source <peter at thecybersource.com> wrote:
>>>  Frank Kumro wrote:
>>> >  Thanks josh! I was hoping there was a command line way to do this...
>>> > >  On 7/25/06, joshj at linuxmail.org <joshj at linuxmail.org> wrote:
>>> > >  When we last left our adventurers...
>>> > > > > >  Is there a way to create a single image of a hard drive 
>>> in linux? > > >  This
>>> > > >  hard drive is 4gb and I need the backup because I want to 
>>> transfer > > >  the
>>> > > >  image to a new (larger) hard drive and then expand that 
>>> partition to
>>> > > >  take up the whole drive. Now this is not my computer its a 
>>> companies
>>> > > >  windows 98 machine, its beyond me why a company is using 
>>> windows 98.
>>> > > >  In windows there is Acronis True Image 9 which appears to do 
>>> what I
>>> > > >  want however I would have to use a family members machine to 
>>> do that
>>> > > >  (since I dont run windoze). So is there any way in linux to 
>>> do this?
>>> > > >  Thanks in advance !!
>>> > > > >  dd if=/dev/hdX of=hd.img
>>> > > > >  We did this recently to copy harddrives. But you can do it 
>>> to make an
>>> > >  image on another drive and then transfer if thats what you need to
>>> > >  do. To
>>> > >  Transfer:
>>> > > > >  dd if=hd.img of=/dev/hdX
>>> > > > >  Then you can use any partition manager to resize. Or to 
>>> copy right > >  from
>>> > >  drive to drive:
>>> > > > >  dd if=/dev/hdX of=/dev/hdY
>>> > > > >  On a 4G hd this won't take to long. But it can be sped up 
>>> by changing
>>> > >  the
>>> > >  byte size:
>>> > > > >  dd if=/dev/hdX of=/dev/hdY bs=4096
>>> > > > >  The above copied an 80G drive to another in about 27 
>>> minutes. They > >  were
>>> > >  windows installations.
>>> > > > >  -Josh
>>> > > > > > > > >  --
>>> > > >  Frank
>>> > > >  Shenanigans!!
>>> > > >  http://www.syncoder.com
>>> >> > _______________________________________________
>>> > > >  nflug mailing list
>>> > > >  nflug at nflug.org
>>> > > >  http://www.nflug.org/mailman/listinfo/nflug
>>> > > > > > > >> _______________________________________________
>>> > >  nflug mailing list
>>> > >  nflug at nflug.org
>>> > >  http://www.nflug.org/mailman/listinfo/nflug
>>> > > > >
>>>  yes dd works well too, you will still need to run the mbr command.
>>>  _______________________________________________
>>>  nflug mailing list
>>>  nflug at nflug.org
>>>  http://www.nflug.org/mailman/listinfo/nflug
>>>
>>
>>
>> -- 
>> Frank
>> Shenanigans!!
>> http://www.syncoder.com
>> _______________________________________________
>> nflug mailing list
>> nflug at nflug.org
>> http://www.nflug.org/mailman/listinfo/nflug
>>
>>
> _______________________________________________
> nflug mailing list
> nflug at nflug.org
> http://www.nflug.org/mailman/listinfo/nflug
>
Only if you were doing an entire drive would it copy the mbr. If the 
partition being copied was on the 2nd, 3rd partition persay, the mbr 
would not be copied. The "fdisk /mbr" command simply blanks the mbr 
anyway. It is a safe thing to do just to be sure. If this is a brand new 
drive, never having anything installed on it, it is probably not needed. 
98 does not need anything on the mbr to boot.
_______________________________________________
nflug mailing list
nflug at nflug.org
http://www.nflug.org/mailman/listinfo/nflug



More information about the nflug mailing list