LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-08-2007, 04:46 PM   #1
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Rep: Reputation: 15
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?
 
Old 07-08-2007, 04:59 PM   #2
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
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.
 
Old 07-08-2007, 06:06 PM   #3
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 448

Rep: Reputation: 37
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
 
Old 07-08-2007, 10:40 PM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.
 
Old 07-08-2007, 11:17 PM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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
 
Old 07-08-2007, 11:32 PM   #6
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Original Poster
Rep: Reputation: 15
Thank you for all your replies. I will give your suggestions a try.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a GHOST image of my ext3 partition mario_er Mandriva 9 02-28-2009 08:35 AM
Piping dd through gzip to image Win2k Partition sr_25 Linux - Newbie 2 07-08-2007 03:43 PM
Making an image of my partition in Win2k? Jorophose General 5 06-20-2007 09:00 PM
LXer: Creating a dd/dcfldd Image Using Automated Image & Restore (AIR) LXer Syndicated Linux News 0 03-07-2007 06:16 PM
Restoring a split HD image drt1245 Linux - Software 12 12-14-2005 08:11 AM


All times are GMT -5. The time now is 04:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration