Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
For copying a partition, I'm trying to follow someone's advice to use dd rather than e2image. The problem is that dd doesn't say how long it's going to take. I've seen dd run for hours for a 50 GB partition without finishing, whereas e2image clones it in maybe 15 minutes. Presently I'm giving dd another try. Should have remembered to start my stopwatch right away; but I know it's certainly taking longer than e2image. It's probably been half an hour.
Actually neither of them copies partitions - dd copies files and if a block device is selected it will copy it too, while e2image copies extN filesystems, and by copying only used blocks can do it faster and use less space. Could've been a good tool, where it not for its fondness of sparse files. Note that dd's performance can be greatly reduced by selecting a too small block size value, and copy progress can be checked at any time by sending USR1 signal to dd. And then there is fsarchiver...
dd command technically copies bytes not necessarily files.
Code:
DD(1) User Commands DD(1)
NAME
dd - convert and copy a file
SYNOPSIS
dd [OPERAND]...
dd OPTION
DESCRIPTION
Copy a file, converting and formatting according to the operands.
You can copy a block device i.e. if=/dev/sdx or a partition i.e. if=/dev/sdxy but as posted it will copy unused space as well so if the partition is large it will take time.
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,493
Rep:
Basically, when using dd, give it a bs= (block size) - I often use 1G - the basic size is about 512 bytes if you don't, so will take a very long time...
Since everything is a file the description is true but it can do a lot more.
No it can't. Block device is a file. Everything, absolutely everything dd operates on is files and it does exactly what is says in the man page, no less and no more. It is not dd which can do more but linux concept of a file is wider than in MS DOS.
I can copy bytes from a tape drive.
dd if=/dev/st0 of=/whatever bs=512 count=1
Yes, there are many wondrous things, and they are all files. It all comes into focus once you accept that everything starting with a slash is a file.
Code:
INTRO(4) Linux Programmer's Manual INTRO(4)
NAME
intro - introduction to special files
DESCRIPTION
Section 4 of the manual describes special files (devices).
FILES
/dev/* — device files
In short, everything which can produce and consume bytes (information) is a file. A directory will specify the location of it and the kernel will know how to read from and write to the given location or device.
Programs do nothing else, just read and write files and compute/manage the data (in between).
, the status isn't entirely clear. Which GB is the amount of data copied, and which is the amount remaining? I'm guessing the first is the amount copied.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.