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!
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.
The standard output shows only printed characters and not the full range of hexadecimal values, ...
Where on Earth did you get an idea like that? In the absence of an "of=" argument, dd writes exactly the same data to stdout as would have gone to the "of=" file. Yes, if that output goes to a terminal you will see garbage, but redirecting to a file should be fine.
@RagonichaFulva: Does that 47GB size of the image file match the size of the original sda5 partition? That "bad geometry" message suggests that the original file system was 285GB. Was the original filesystem type really ext4? What does the file command report as the type of the partitionimage.dd file, i.e., the output from
I can't assure it, but I'd say that the partition was bigger than 47 GBytes.
That would be most unfortunate. The image file should be exactly the same size as the original partition. If that was really an ext4 file system, it would also be useful to see the output from
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Quote:
Originally Posted by rknichols
Where on Earth did you get an idea like that? In the absence of an "of=" argument, dd writes exactly the same data to stdout as would have gone to the "of=" file. Yes, if that output goes to a terminal you will see garbage, but redirecting to a file should be fine...
Simple. When you write it to stdout, the driver for your graphic card will interpret it to display it on your screen. So you lose in due course lots of data / information. That is at least what I reasoned. Do I understand you all right that stdout can circumvent the graphics driver?
Simple. When you write it to stdout, the driver for your graphic card will interpret it to display it on your screen. So you lose in due course lots of data / information. That is at least what I reasoned. Do I understand you all right that stdout can circumvent the graphics driver?
There is no circumvention needed. Data written to stdout is, if not redirected, "translated" by the shell into characters and control codes (like color codes, the beep, ...) and then displayed. The graphics card drivers will not interpret characters displayed on screen.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Quote:
Originally Posted by TobiSGD
...Data written to stdout is, if not redirected, "translated" by the shell into characters and control codes (like color codes, the beep...
Okay, so it is not the graphics driver but the shell which does the pruning -- or does it? I mean, is there a difference in the files when created via ">" as opposed to "of="?
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
I confess I doubted you but you stand vindicated : I "dd"ed my 125 MB boot partition with ">" and "of=" and then ran sha256sum on both files: They are identical. Ah, well, it was a nice theory of mine as long as it lasted. Kudos to all participants involved in relieving the darkness of my ignorance and thanks for the ongoing instructions on LQ.
. Umm, sorry. "of=" stands for the output file = (is, or rather will be) the following path (/mnt/diska/) and filename (cd-001.dd)...
thx, so if I would say that this command creates a duplicate of the (hda) and then places it at /mnt/diska/ with the filename cd-001.dd I would be right? My first thought was that this created a dd file on the mounted cd-rom but thats totally wrong?
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
Rep:
Quote:
of=/mnt/diska/cd-001.dd
cd-001.dd would be the filename you're giving in /mnt/diska directory which you've mounted under /mnt/ where you want to save the data of /dev/hda.
Am I right? Please make me correct if I'm wrong.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Quote:
Originally Posted by greasedupdeafguy
thx, so if I would say that this command creates a duplicate of the (hda) and then places it at /mnt/diska/ with the filename cd-001.dd I would be right?
Yes it duplicates all, including the internal structures of the disk (master boot record, partition table, all partitions including empty space (if so ordered)).
Quote:
Originally Posted by greasedupdeafguy
My first thought was that this created a dd file on the mounted cd-rom but thats totally wrong?
Yes. It does not burn a CD (but it could write to a CD-RW).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.