Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This 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.


  Search this Thread
Old 02-23-2012, 09:51 PM   #1
LQ Newbie
Registered: Nov 2011
Distribution: Mint
Posts: 4

Rep: Reputation: Disabled
Copying multiple iso to hdd

I have a disk dump in multiple img files(dump1.img, dump2.img,...,dump150.img) . Is it possible to copy these all img files to hdd with ONE dd command? I mean something like:
dd if=dump*.img of=/dev/sda4 bs=512 conv=noerror
Old 02-23-2012, 11:40 PM   #2
LQ Guru
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
If those files already contain the dumped data, you can just copy them directly over using the cp command, unless not done already. If not, you can just use that command several times on one line using the semicolon, as such:
dd if=dump1.img of=/dev/sda4 bs=512 conv=noerror; dd if=dump2.img of=/dev/sda4 bs=512 conv=noerror
EDIT - This is just a rough example. It would have to be edited as needed.
It would need to be like this because using the wildcard, it would join them together as one large file.

Last edited by corp769; 02-24-2012 at 12:24 AM.
Old 02-23-2012, 11:57 PM   #3
LQ Newbie
Registered: Nov 2011
Distribution: Mint
Posts: 4

Original Poster
Rep: Reputation: Disabled
It looks like every image will be written to the same location.
How would dd command know where to jump without seek information.
Any other tricks?
Old 02-24-2012, 12:27 AM   #4
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
What is in each image? Is each image a partition (i.e. created with something like "dd if=/dev/sda2") or is it a full disk image (i.e. "dd if=/dev/sda")?

If they are partitions then do a loop:
1. mount each image one-at-a-time on a loopback file
2. copy the contents from the loopback device to the physical drive
3. unmount the loopback
4. go back to #1 until all images are done

I'm not sure how you would handle a full disk image. You would likely need to use some mount trickery or some other utility.
Old 02-24-2012, 12:32 AM   #5
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian except for netbook still on Slackware 13.37 (and I have to support Ubuntu)
Posts: 8,572
Blog Entries: 30

Rep: Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182
How about
cat dump*.img | dd of=/dev/sda4 bs=512 conv=notrunc,noerror


dd, img

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
copying multiple files in multiple folders ?? stratotak Linux - Newbie 2 02-21-2009 09:41 AM
How to Convert Multiple CD ISO to One DVD ISO. UltraSoul Linux - Software 5 08-16-2008 11:35 PM
Install directly to HDD from iso on HDD/USB, with out burning cd vivinuthappa DamnSmallLinux 7 11-16-2004 10:03 AM
Copying Redhat ISO's Colossalboom Linux - Newbie 1 08-21-2003 07:29 AM
Copying from floppy to HDD futurist Linux - General 11 03-27-2003 03:23 PM

All times are GMT -5. The time now is 09:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration