Linux - NewbieThis 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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Assuming the 160 gig drive is one partition, and with the partitions (source and destination) mounted, you could the tar command to copy the files to the larger drive:
Copy filesystem to another filesystem using tar
We assume /source/dir is a filesystem, if there are other filesystems under /source/dir they
will also be copied to /destination/dir
tar -cf - . | ( cd /destination/dir ; tar -xpvf - )
I copied it over using the dd command but some of the files are pausing and not playing right so i want to try the rsync command but i cannot get it to work.Could you give me an example witn sdc1 as the input and sdd1 as the target drive.Thanks I am new to Linux.
1) How did you use dd? What was the exact command?
2) WHY did you use dd? Nobody here recommended it, and that's for good reason. It is NOT designed to do what you asked in your original post. Why even bother posting this thread if you're not going to listen to the responses?
As for using rsync, as with ALL of the methods posted above, the drives need to be mounted first. These solutions do NOT work on the raw disk like dd does (again, for good reason).
You probably need to reformat your 1TB drive now, as I suspect you trashed the filesystem using dd. I hope you didn't have anything valuable on it...
Last edited by suicidaleggroll; 11-18-2013 at 11:23 AM.
I used dd if=/dev/sdc1 of=/dev/sdd1 and it copied everything across.I could not get rsync to work and i got the dd command from a man who had a similar problem on this site.I am not sure if the problem could be that the Dreambox cannot handle a 1Tb hard drive or what.I tried what one member said here to my post to copy and paste and it is copying ok but it is 90gb of data so i will try it again then.I had nothing on the drive so i have not lost anything so it is no problem.
I used dd if=/dev/sdc1 of=/dev/sdd1 and it copied everything across.I could not get rsync to work and i got the dd command from a man who had a similar problem on this site.
Then why didn't you ask what you were doing wrong? Are you sure the person with the dd command had same problem? Probably not. dd is used for an entirely different task than what you asked about in this thread.
In short, you asked for a way to copy files. dd, in the way that you used it, copies disks. Not just the files on the disk, but the disk itself, and every bit on it, used and unused. It doesn't care what's on the disk, it just copies it over, bit for bit, to the destination, wiping out everything in its path, including the filesystem
You can think of a disk like a plot of land, while a filesystem is a library built on that land, and files are books in the library. You asked for a way to copy files from one drive to another, that's like asking how to move some books from library A into library B. By using dd, you bulldozed library B and built a brick-for-brick copy of library A in its place. See the difference?
You need to be working on the filesystem level, NOT the raw disk, to accomplish what you asked about. You should reformat your 1 TB disk...wipe it and re-partition it from scratch. Then mount both drives and use any of the above suggestions to copy the files over.
Originally Posted by Magic02
I am not sure if the problem could be that the Dreambox cannot handle a 1Tb hard drive or what.
Doubtful. The more likely explanation is that dd corrupted the filesystem on your 1 TB drive.
They don't call dd "Disk Destroyer" for nothing.
Last edited by suicidaleggroll; 11-18-2013 at 05:22 PM.
Yes he's wanting to do the same thing, I'll let schneidz explain his reasoning for recommending dd in that application. It seems like he was just offering a bit-for-bit mirror option in case that's what the OP was really looking for.
Essentially, dd is good for mirroring a disk. This is VERY useful when you have a corrupted disk or deleted file you want to recover, you can use dd to mirror the disk into an image file (or onto another disk) and then work with the mirror to try to recover your data, rather than working with the original disk and risk corrupting it further. This works well since dd is not copying files, it's doing a bit for bit copy of the disk's actual contents...empty space, used space, it's all just bits on a platter, and it all gets copied equally.
dd is also useful for cloning a disk - partition table, boot sector, everything. It's good for when you set up a system exactly like you want it, and then clone the disk to a backup. Years later you might get a corruption, and you can just swap in your mirrored disk and pick right back up where you left off.
dd is not so good for copying or backing up files/directories, though. For one, the disk onto which you're copying becomes a mirror of the original - size, filesystem type, etc. Two is that dd copies everything, the entire disk. Even if you only have 1 1MB file on your source drive, dd is going to copy all 160 GB, every time you want to make a backup.