Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
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.
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.
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.
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.