Operating System - Linux
1819793 Members
3286 Online
109607 Solutions
New Discussion юеВ

how works dd command to create an Image of whole harddisk ?

 
SOLVED
Go to solution
'chris'
Super Advisor

how works dd command to create an Image of whole harddisk ?

hi

I'd like create an Image of the w2k workstation ( 2 partitions )
and send it over LAN via nfs to the linux Server.

How should I do that, using dd command ?

kind regards
chris
8 REPLIES 8
Zeev Schultz
Honored Contributor

Re: how works dd command to create an Image of whole harddisk ?

Sorry, no dd for windows. You can use 3d party software like Norton Ghost to create an image for windows.

man dd on linux for dd syntax.

If you mean to perfom dd for NFS-mounted windows directory / partition - use tar instead
tar cf /dev/rmt0 /your_windows_mount_directory
dd works with raw devices / disks mostly since its intended to copy bit-after-bit style and not buffers (like many other utils). And gnu (linux) tar is good.
So computers don't think yet. At least not chess computers. - Seymour Cray
'chris'
Super Advisor

Re: how works dd command to create an Image of whole harddisk ?

hi

sorry, I think you didn't understand me,
because I wrote not so clearly.

I would like to boot w2k prof. client
with one floppy mini linux like tomsrtbt from:

http://www.toms.net/rb/

mount via nfs over LAN to the linux server
and create an Image of the whole harddisk
and send it via nfs to the server.

best regards
chris
Huc_1
Honored Contributor
Solution

Re: how works dd command to create an Image of whole harddisk ?

if I get you right you want to boot a W2K using a tomsrtbt floppy and block copy using dd from kernel in memory to an nfs dirctory on a linux server.

boot floppy
start network
create mount point for nfs partiton (ex: mkdir /mnt/Rem_file)
mount nfs partition from linux server to /mnt/Rem_file

dd if=/dev/hda1 of=/mnt/Rem_file/w2k_C
(this is if your c: is on /dev/hda1)

dd if=/dev/hda2 of=/mnt/Rem_file/w2k_D
(this is if your d: is on /dev/hda2)

Now I do not know that you are able to restore this I have not try this you should test this first in a none important enviroment.

I think you may have to fdisk/mbr on disk after restore and force a scandisk on boot from w2k before use (dear prudence)

Tell us if you go that way and how it turn out.

J-P
Smile I will feel the difference
'chris'
Super Advisor

Re: how works dd command to create an Image of whole harddisk ?

hi

know someone how to create an Image
of the whole hard disk with cut command ?

regards
chris
benoit Bruckert
Honored Contributor

Re: how works dd command to create an Image of whole harddisk ?

You can create image of W2K workstation with dd. I did it and it works.
What I did :
On a linux workstation, plug the w2k disk, plug the empty disk.
dd one disk to the other,
or just the wanted partition.
You can also boot a linux on floppy with the dd command (then plug just the emty disk to copy).

By this way you can copy any kind of filesystems (Fat, ntfs, ext2/3, LVM.....), you don't need to have the driver to access the file system....

Through the network (nfs), I had some troubles, because you have no compression and the temporary file generated was to big (partition was 8Gig, and dd copy also empty sectors) to be manipulate through NFS, but my nfs server was quite old and my nfs client also, may be newest client/server NFS can handle such big file (and also file systems on the NFS server) - I don't know.
But from disk to disk no troubles ! May be you will have to boot on an msdos floppy and fdisk /mbr to restart properly w2k in your new workstation...

hope that help
Benoit

Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
Mark Grant
Honored Contributor

Re: how works dd command to create an Image of whole harddisk ?

I once managed to get a completly usable windows system sitting contiguously on a disk by using tar. Mounted it on my linux box, tar the whole thing into a file on a linux file system, "rm -r" the windows system and tar xvf my image off again. Well cool!
Never preceed any demonstration with anything more predictive than "watch this"
'chris'
Super Advisor

Re: how works dd command to create an Image of whole harddisk ?

hi Mark Grant

can you write more some details, please

regards
chris
Mark Grant
Honored Contributor

Re: how works dd command to create an Image of whole harddisk ?

Chris,

I put my windows disk in a linux machine that had enough space to hold the entire contents of the windows C drive. Made sure I had VFAT support in the linux kernel and mounted the windows disk as a filesystem on the linux box with "mount -t vfat /dev/hdb1 /windows" obviously making the /windows mountpoint first. Then "cd /". Then made a tar archive in my linux home directory "tar cvzf /home/windows.tgz windows". Then removed everything in /windows ("cd /windows; rm -rf *"). Then, "cd /;tar xvzf /home/windows.tgz".

This put all the windows stuff back on the disk but without all those annoying little blocks of disk that windows seems to scatter all over the disk. I needed to do this because I wanted to reduce the size of the windows partition and windows defrag and scandisk and all that couldn't do it properly.

I would point out that I don't guarantee that this is going to work for anybody else it just worked that time for me.
Never preceed any demonstration with anything more predictive than "watch this"