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

Notices

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

Rep: Reputation: Disabled
Copying multiple iso to hdd


Hi,
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
corp769
Guru
 
Registered: Apr 2005
Posts: 5,807

Rep: Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996
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:
Code:
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
extr
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
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
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
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,541
Blog Entries: 28

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


Reply

Tags
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 03:38 PM.

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