LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Creating dd image Win2k Partition with split (https://www.linuxquestions.org/questions/linux-newbie-8/creating-dd-image-win2k-partition-with-split-567651/)

sr_25 07-08-2007 03:46 PM

Creating dd image Win2k Partition with split
 
After reading Awesomemachines thread about dd again I am trying to learn how to create an image of my Win 2k partition. This is what I tried:
Quote:

dd if=/dev/sda5 of=/dev/sdd7/Win2k.image
Well, I should have thought this through a little better because sdd7 is fat32 and pukes because the file size is to large. I have been reading online about split and don't quite know how to combine the 2 commands:
Quote:

dd if=/dev/sda5 | split -b 2000m > /mnt/sdd7/Win2k.image
and
dd if=/dev/sda5 | split -b 1000m > /mnt/sdd7/Win2k.image
but neither works. I get:
Quote:

split: xaa: No Space left on device
and
split: xab: No Space left on device
respectively
but its a 116gb partition!

When I navigate to /mnt/sdd7 it says Win2k.image is 0 bytes.

How do I accomplish this?

PatrickNew 07-08-2007 03:59 PM

Well, probably the best way to do this doesn't use split. Try something like this
Code:

dd bs=1M if=/dev/sda5 of=whereItIsGoing count=howManyMbToWrite
So, this command will copy an arbitrary number of megabytes from /dev/sda5 to wherever. Then, for the second piece, try

Code:

dd bs=1M if=/dev/sda5 of=secondHalfDestination count=remainingBytes skip=bytesToSkip
So just skip however many bytes you copied the first time.

Another thing that you'll run into trouble with is trying to send something to /dev/sdd7/anything. "/dev/sdd7" is a file, not a directory. You have to mount it, then write to where it was mounted.

Daws 07-08-2007 05:06 PM

How about:

Code:

cd whereyouwanttodumpimagefiles
mkfifo temppipe
dd if=/dev/sda5 of=temppipe &
split -b 1000m temppipe

once it is done "rm temppipe"

this will give several files xaa, xab, xac etc of size 1000Mb.
Pipes can be very useful...

PS. When I first read up on the split command, I couldn't figure out how to unsplit them. So just in case you don't yet know:

If I have files xaa through to xaz, and I wanted to reform the original file, I would:

Code:

cat xaa xab xac [...] xay xaz > OriginalFile
or

Code:

cat xa{a..z} > OriginalFile

Junior Hacker 07-08-2007 09:40 PM

The only problem I see with this approach is that you need an extra 116GB storage for your image files. Windows XP Media Center comes on a DVD, it's got allot of extras, my Windows XP Media Center image file is 3.9GB in size regardless of the size of the partition, because the utility I use compresses it and only images allocated sectors, not including un-allocated sectors like dd. When I remove all the videos and music that Media Center installs, the image is 2GB. Which means it can be stored on a single DVD, which is a hell of allot cheaper than another hard drive, and even if you do have an extra hard drive or allot of space, in the event of a major power spike, or whatever, when your hard drive fails (which happens on new computers also), your backup is history, which means, that is not a good backup strategy.
I create my images of a fresh install after fully updating it and configuring, before installing applications that did not come with the OS, applications and a copy of the images are stored in the data partition and easily reinstalled when needed, not as part of the image (you all know what happens to Windows when you bloat it). There's no sense making an image with Office 2003 installed, you could easily come across a copy of Office 2007 later on which is what you'd probably prefer to install.
The utility I use does have a 4GB file size limit for the images and will create as many as required, the file size limit in Fat32 is 4GB. When you restore the image you only point to the first file and it restores the whole shebang if all the files are in the same directory. To this day, Windows Media Center produces the largest image, larger than Vista Ultimate. My default installations of Linux are around 1.5GB. And the utility will burn it to disk during imaging if you want, if the image requires more than one CD/DVD, it will tell you to put another in when the first is full and label them for restoration purposes. It can put the image in an External USB drive etc. etc. etc.
Best of all, it is GUI dos based (easy), it's imaging feature of the many features it has can be used from a floppy or CD for FREE!
It is called bootitng.

Junior Hacker 07-08-2007 10:17 PM

Although I had my doubts when I first read post #6 in the thread link below, after reading it over again, it might work, if you try it, give some feedback please.
http://www.linuxquestions.org/questi...d.php?t=557866

sr_25 07-08-2007 10:32 PM

Thank you for all your replies. I will give your suggestions a try.


All times are GMT -5. The time now is 02:27 PM.