LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-07-2008, 03:49 PM   #1
jsurles
Member
 
Registered: Feb 2007
Location: Katy, TX
Distribution: gentoo, slackware, centos, ESX, gnu/linux
Posts: 34

Rep: Reputation: 15
dd imaging issue


Hello,

I've looked around a bit but seem to be unable to get confirmation on the possibility (or lack thereof) of doing what I am trying to do.

I have a disk image of a particular setup that I like to use. I created this image using 'dd' to get the disk image. When it was originally created, it was on a 60gb disk. The actual data is only about 4gb.

The problem I'm running into is that I want to put this image on a 30gb drive. I can use dd to write the image to disk, but obviously it runs out of room. Is there an easy way to modify the image to only span 30gb, or am I stuck having to build a machine from scratch and using dd to get a new image? I really don't want to go through that time consuming process right now.

Any ideas or info would be appreciated!

Jim
 
Old 01-07-2008, 03:58 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
The only problem I see with this is the data on the 60GB drive could be spread out, so not knowing what chunks to take out of the 60GB image, you might lose data that you want. My suggestion, get another 60GB drive or if the original image or drive is around, take another image but not of the raw disk but of the actual data itself.
 
Old 01-07-2008, 04:02 PM   #3
jsurles
Member
 
Registered: Feb 2007
Location: Katy, TX
Distribution: gentoo, slackware, centos, ESX, gnu/linux
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by trickykid View Post
The only problem I see with this is the data on the 60GB drive could be spread out, so not knowing what chunks to take out of the 60GB image, you might lose data that you want. My suggestion, get another 60GB drive or if the original image or drive is around, take another image but not of the raw disk but of the actual data itself.
Is there a particular safe way of taking an image the data? I'm assuming I could do a cp -R, but I'm not sure if that would truly grab everything.. maybe if I tar'ed up the entire partition?
 
Old 01-07-2008, 04:07 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by jimsu View Post
Is there a particular safe way of taking an image the data? I'm assuming I could do a cp -R, but I'm not sure if that would truly grab everything.. maybe if I tar'ed up the entire partition?
If your only dealing with about 4GB of data, I'd just use rsync with tar/gzip to get the data you want to migrate to a new machine. dd a whole 60GB partition is just silly and your wasting time and disk space really.

Think of it sort of a bare metal recovery. You only backup the data that isn't part of the base OS. If the system goes down, reinstall the OS, then restore the data that's changed or outside of the OS.
 
Old 01-08-2008, 02:32 AM   #5
jsurles
Member
 
Registered: Feb 2007
Location: Katy, TX
Distribution: gentoo, slackware, centos, ESX, gnu/linux
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by trickykid View Post
If your only dealing with about 4GB of data, I'd just use rsync with tar/gzip to get the data you want to migrate to a new machine. dd a whole 60GB partition is just silly and your wasting time and disk space really.

Think of it sort of a bare metal recovery. You only backup the data that isn't part of the base OS. If the system goes down, reinstall the OS, then restore the data that's changed or outside of the OS.
The problem with that is that the systems I'm trying to 'image' are windows boxes using NTFS. It doesn't seem to play too nice doing it this way.
 
Old 01-08-2008, 10:25 AM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Well that changes things drastically. Windows spreads it's data to my knowledge all around, gets fragmented. I'd suggest you may want to look into something like Norton Ghost or the like to image Windows Installs/OS's, not dd, rsync, gzip. You know, providing this info first might have saved some time and posts.
 
Old 01-08-2008, 10:37 AM   #7
jsurles
Member
 
Registered: Feb 2007
Location: Katy, TX
Distribution: gentoo, slackware, centos, ESX, gnu/linux
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by trickykid View Post
Well that changes things drastically. Windows spreads it's data to my knowledge all around, gets fragmented. I'd suggest you may want to look into something like Norton Ghost or the like to image Windows Installs/OS's, not dd, rsync, gzip. You know, providing this info first might have saved some time and posts.
Yeah, I didn't think about it too much at first.. Sorry.

But the good news is using backtrack I was able to mount the NTFS partition r/w and mount the dd image, and using rsync was able to move the files to the smaller drive. Yippee!

Thanks for the input.. it worked.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
imaging question newio Slackware 1 02-21-2007 02:47 PM
Imaging kandikonda_sat Fedora 2 11-16-2005 06:22 AM
imaging HD MACSRULE Linux - Newbie 1 07-30-2005 11:49 PM
Imaging CD zedman Linux - Software 4 10-08-2004 11:24 PM
Drive imaging witeshark General 1 01-28-2004 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:54 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
Open Source Consulting | Domain Registration