Cloning a linux usb into a empty disk image
I Have created a raspberry pi video loopier on a USB and i can easily clone from one USB to another USB using the dd command. This USB has multiple partitions and i wish to clone in into a empty disk image or something similar so that i can also have a clone of the USB on my computer should i lose the other USB. Is there any way for me to take everything of this USB and put it into a disk image. Any advice would be much appreciated. I have tried using the dd command to clone directly onto the pc but this does not seem to work
i used "sudo dd if=/dev/sdd of=/dev/sdc bs=9M status = progress" to clone from one usb to another so i want to do the exact same but not to another us. i just want a disk image so that i have a clone direcly on my pc
linux command-line raspberry-pi
add a comment |
I Have created a raspberry pi video loopier on a USB and i can easily clone from one USB to another USB using the dd command. This USB has multiple partitions and i wish to clone in into a empty disk image or something similar so that i can also have a clone of the USB on my computer should i lose the other USB. Is there any way for me to take everything of this USB and put it into a disk image. Any advice would be much appreciated. I have tried using the dd command to clone directly onto the pc but this does not seem to work
i used "sudo dd if=/dev/sdd of=/dev/sdc bs=9M status = progress" to clone from one usb to another so i want to do the exact same but not to another us. i just want a disk image so that i have a clone direcly on my pc
linux command-line raspberry-pi
i used "sudo dd if=/dev/sdd of=/dev/sdc bs=9M status = progress" to clone from one usb to another so i want to do the exact same but not to another us. i just want a disk image so that i have a clone direcly on my pc
– Lawo DemoKit1
Jan 25 at 17:40
How exactly did you try "using the dd command to clone directly onto the pc" and why didn't it work? Also, if the files are significantly smaller than the entire USB, you might consider only copying the files (plus whatever bootloader commands are required to "remake" the original USB, if it's even bootable)
– Xen2050
Jan 26 at 7:02
add a comment |
I Have created a raspberry pi video loopier on a USB and i can easily clone from one USB to another USB using the dd command. This USB has multiple partitions and i wish to clone in into a empty disk image or something similar so that i can also have a clone of the USB on my computer should i lose the other USB. Is there any way for me to take everything of this USB and put it into a disk image. Any advice would be much appreciated. I have tried using the dd command to clone directly onto the pc but this does not seem to work
i used "sudo dd if=/dev/sdd of=/dev/sdc bs=9M status = progress" to clone from one usb to another so i want to do the exact same but not to another us. i just want a disk image so that i have a clone direcly on my pc
linux command-line raspberry-pi
I Have created a raspberry pi video loopier on a USB and i can easily clone from one USB to another USB using the dd command. This USB has multiple partitions and i wish to clone in into a empty disk image or something similar so that i can also have a clone of the USB on my computer should i lose the other USB. Is there any way for me to take everything of this USB and put it into a disk image. Any advice would be much appreciated. I have tried using the dd command to clone directly onto the pc but this does not seem to work
i used "sudo dd if=/dev/sdd of=/dev/sdc bs=9M status = progress" to clone from one usb to another so i want to do the exact same but not to another us. i just want a disk image so that i have a clone direcly on my pc
linux command-line raspberry-pi
linux command-line raspberry-pi
edited Jan 25 at 17:43
Lawo DemoKit1
asked Jan 25 at 17:21
Lawo DemoKit1Lawo DemoKit1
62
62
i used "sudo dd if=/dev/sdd of=/dev/sdc bs=9M status = progress" to clone from one usb to another so i want to do the exact same but not to another us. i just want a disk image so that i have a clone direcly on my pc
– Lawo DemoKit1
Jan 25 at 17:40
How exactly did you try "using the dd command to clone directly onto the pc" and why didn't it work? Also, if the files are significantly smaller than the entire USB, you might consider only copying the files (plus whatever bootloader commands are required to "remake" the original USB, if it's even bootable)
– Xen2050
Jan 26 at 7:02
add a comment |
i used "sudo dd if=/dev/sdd of=/dev/sdc bs=9M status = progress" to clone from one usb to another so i want to do the exact same but not to another us. i just want a disk image so that i have a clone direcly on my pc
– Lawo DemoKit1
Jan 25 at 17:40
How exactly did you try "using the dd command to clone directly onto the pc" and why didn't it work? Also, if the files are significantly smaller than the entire USB, you might consider only copying the files (plus whatever bootloader commands are required to "remake" the original USB, if it's even bootable)
– Xen2050
Jan 26 at 7:02
i used "sudo dd if=/dev/sdd of=/dev/sdc bs=9M status = progress" to clone from one usb to another so i want to do the exact same but not to another us. i just want a disk image so that i have a clone direcly on my pc
– Lawo DemoKit1
Jan 25 at 17:40
i used "sudo dd if=/dev/sdd of=/dev/sdc bs=9M status = progress" to clone from one usb to another so i want to do the exact same but not to another us. i just want a disk image so that i have a clone direcly on my pc
– Lawo DemoKit1
Jan 25 at 17:40
How exactly did you try "using the dd command to clone directly onto the pc" and why didn't it work? Also, if the files are significantly smaller than the entire USB, you might consider only copying the files (plus whatever bootloader commands are required to "remake" the original USB, if it's even bootable)
– Xen2050
Jan 26 at 7:02
How exactly did you try "using the dd command to clone directly onto the pc" and why didn't it work? Also, if the files are significantly smaller than the entire USB, you might consider only copying the files (plus whatever bootloader commands are required to "remake" the original USB, if it's even bootable)
– Xen2050
Jan 26 at 7:02
add a comment |
1 Answer
1
active
oldest
votes
If your computer uses Linux (or has a Windows version if DD - I assume that exists) you can use dd with an OF as a file, so
dd if=/dev/sdd of=/path/to/file.name bs=4096
Additional
If you create a large file.with zeros on the USB and delete it you can get a compact compressed file using
dd if=/dev/sdd | gzip > /pathtooutputfile.gz
If you have pv installed you can get a progress report of the copy (and bypass dd)
pv < /dev/sdd | gzip > /path/to/outputfile.gz
What do you mean by creating a file with zero's? @davidgo
– Lawo DemoKit1
Jan 25 at 19:13
If you issue a command like "dd if=/dev/zero of=/path/to/usb/temp.file" it will fill the disk up with zeros (until it dies with an out of disk error). Delete the file and the underlying unused disk will have zeros rather then random junk from previous writes and will compress better.
– davidgo
Jan 25 at 19:19
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1398488%2fcloning-a-linux-usb-into-a-empty-disk-image%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If your computer uses Linux (or has a Windows version if DD - I assume that exists) you can use dd with an OF as a file, so
dd if=/dev/sdd of=/path/to/file.name bs=4096
Additional
If you create a large file.with zeros on the USB and delete it you can get a compact compressed file using
dd if=/dev/sdd | gzip > /pathtooutputfile.gz
If you have pv installed you can get a progress report of the copy (and bypass dd)
pv < /dev/sdd | gzip > /path/to/outputfile.gz
What do you mean by creating a file with zero's? @davidgo
– Lawo DemoKit1
Jan 25 at 19:13
If you issue a command like "dd if=/dev/zero of=/path/to/usb/temp.file" it will fill the disk up with zeros (until it dies with an out of disk error). Delete the file and the underlying unused disk will have zeros rather then random junk from previous writes and will compress better.
– davidgo
Jan 25 at 19:19
add a comment |
If your computer uses Linux (or has a Windows version if DD - I assume that exists) you can use dd with an OF as a file, so
dd if=/dev/sdd of=/path/to/file.name bs=4096
Additional
If you create a large file.with zeros on the USB and delete it you can get a compact compressed file using
dd if=/dev/sdd | gzip > /pathtooutputfile.gz
If you have pv installed you can get a progress report of the copy (and bypass dd)
pv < /dev/sdd | gzip > /path/to/outputfile.gz
What do you mean by creating a file with zero's? @davidgo
– Lawo DemoKit1
Jan 25 at 19:13
If you issue a command like "dd if=/dev/zero of=/path/to/usb/temp.file" it will fill the disk up with zeros (until it dies with an out of disk error). Delete the file and the underlying unused disk will have zeros rather then random junk from previous writes and will compress better.
– davidgo
Jan 25 at 19:19
add a comment |
If your computer uses Linux (or has a Windows version if DD - I assume that exists) you can use dd with an OF as a file, so
dd if=/dev/sdd of=/path/to/file.name bs=4096
Additional
If you create a large file.with zeros on the USB and delete it you can get a compact compressed file using
dd if=/dev/sdd | gzip > /pathtooutputfile.gz
If you have pv installed you can get a progress report of the copy (and bypass dd)
pv < /dev/sdd | gzip > /path/to/outputfile.gz
If your computer uses Linux (or has a Windows version if DD - I assume that exists) you can use dd with an OF as a file, so
dd if=/dev/sdd of=/path/to/file.name bs=4096
Additional
If you create a large file.with zeros on the USB and delete it you can get a compact compressed file using
dd if=/dev/sdd | gzip > /pathtooutputfile.gz
If you have pv installed you can get a progress report of the copy (and bypass dd)
pv < /dev/sdd | gzip > /path/to/outputfile.gz
edited Jan 25 at 18:01
answered Jan 25 at 17:55
davidgodavidgo
44k75292
44k75292
What do you mean by creating a file with zero's? @davidgo
– Lawo DemoKit1
Jan 25 at 19:13
If you issue a command like "dd if=/dev/zero of=/path/to/usb/temp.file" it will fill the disk up with zeros (until it dies with an out of disk error). Delete the file and the underlying unused disk will have zeros rather then random junk from previous writes and will compress better.
– davidgo
Jan 25 at 19:19
add a comment |
What do you mean by creating a file with zero's? @davidgo
– Lawo DemoKit1
Jan 25 at 19:13
If you issue a command like "dd if=/dev/zero of=/path/to/usb/temp.file" it will fill the disk up with zeros (until it dies with an out of disk error). Delete the file and the underlying unused disk will have zeros rather then random junk from previous writes and will compress better.
– davidgo
Jan 25 at 19:19
What do you mean by creating a file with zero's? @davidgo
– Lawo DemoKit1
Jan 25 at 19:13
What do you mean by creating a file with zero's? @davidgo
– Lawo DemoKit1
Jan 25 at 19:13
If you issue a command like "dd if=/dev/zero of=/path/to/usb/temp.file" it will fill the disk up with zeros (until it dies with an out of disk error). Delete the file and the underlying unused disk will have zeros rather then random junk from previous writes and will compress better.
– davidgo
Jan 25 at 19:19
If you issue a command like "dd if=/dev/zero of=/path/to/usb/temp.file" it will fill the disk up with zeros (until it dies with an out of disk error). Delete the file and the underlying unused disk will have zeros rather then random junk from previous writes and will compress better.
– davidgo
Jan 25 at 19:19
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1398488%2fcloning-a-linux-usb-into-a-empty-disk-image%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
i used "sudo dd if=/dev/sdd of=/dev/sdc bs=9M status = progress" to clone from one usb to another so i want to do the exact same but not to another us. i just want a disk image so that i have a clone direcly on my pc
– Lawo DemoKit1
Jan 25 at 17:40
How exactly did you try "using the dd command to clone directly onto the pc" and why didn't it work? Also, if the files are significantly smaller than the entire USB, you might consider only copying the files (plus whatever bootloader commands are required to "remake" the original USB, if it's even bootable)
– Xen2050
Jan 26 at 7:02