Link to home
Start Free TrialLog in
Avatar of habcoservices
habcoservices

asked on

How do I create an ISO image of an entire hard drive operating under Linux (CENTOS)?

Hello.  I'm relatively new to Linux and know enough to be dangerous.  I'm trying to create an ISO image of an entire volume on a Linux (CentOS Linux 4.3) box such that I can then transfer that ISO image to a CD which will then be used to create an identical configuration on another box (with the exact same hardware config).   The hard drive I'm backing up has a capacity of 80gb and only has about 10gb being used.    

As I understand it (and I could be wrong) there are two processes here.  First is creating the ISO file.  Second is transferring that ISO file to a CD in such a way as to allow for restoring it to another hard drive to give me an identical setup on the second machine.    How do I do this?

With regard to creating the ISO image file of the entire volume, my limited understanding says I should be using the "mkisofs" command but I have been unable to get it to work.    The full command I'm issuing is:  

mkisofs -o image.iso -b boot/intrd-2.6.9-34.EL.img -c boot.cat -R -J -T

When I issue this command I get an error stating the .img file I specified "has not an allowable size".  Candidly I don't even know if the .img file I'm specifying is correct but it's the only .img file in the /BOOT/ directory.

With regard to the seond step in the process ... well, let's just say I haven't gotten that far yet.  

Thank you in advance for your assistance.

Brad .....
 
Avatar of DonConsolio
DonConsolio
Flag of Austria image

iso files are not the optimal way to transfer a complete system
- file name length
- max. directory depth
- permissions
- owners/groups
- device files (and other special files like named pipes)
- links/symlinks
- creation/access/modification dates
 etc.
can't be fuly represented in ISO images

so you better create a .tar or .cpio archive and restore that file on your target machine
or you might use a tool like partimage to create a "portable" image.
Avatar of habcoservices
habcoservices

ASKER

Thanks for your response.  How might I go about creating a portable image? I will need to send this CD portable image to our other offices.   I'm trying to make the process as idiot proof as possible for those receiving the CD image. Is partimage a utility like Ghost?
Hi,

I would create a bootable cd (dvd) and put a kickstart file on there...

That way you could send your customized version (with all your settings) to all of your offices and all they would have to do is to insert the cd/dvd and have a cup of coffee...

//jonas
partimage (http://www.partimage.org/Main_Page)

Description: Partition Image is a Linux/UNIX utility which saves partitions in many formats (see below) to an image file. The image file can be compressed in the GZIP/BZIP2 formats to save disk space, and split into multiple files to be copied on removable floppies (ZIP for example)

Kind of "Ghost for Linux"
Thanks.  Perhaps this is a stupid question but what is a "kickstart file" and how do I add it?  It sounds liike this option is what we need since the installation is automatic.

Get yourself a copy of knoppix, it has partimage on it already and is easy to use. The partition you want to create an image of shouldn't be mounted, and by using knoppix that would be ensured. If you have a CD or DVD writer and a CD or DVD drive inside the PC, you can write the files to an optical device using knoppix too.

http://knoppix.net
Thanks.  Ok ... let me make sure I have this correct ....

1.  I download a copy of Knoppix which includes partimage.
2.  I create a bootable CD Rom (with partimage on it?) that allows me to boot the Linux box without mounting the volume I want to copy (which is the only hard drive in the pc).
3.  I run partimage to copy the unmounted volume.

Is this correct?  And if so, where do I store the partimage copy if the only volume I have available isn't mounted?  Plus, what is the process for restoring?

Brad ....
ASKER CERTIFIED SOLUTION
Avatar of rindi
rindi
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks to both of you for your assistance.  I can see this is over-my-head for the time being given my rather narrow knowledge of Linux (limited mostly to Asterisk installations, DHCP and DNS servers). I need to spend more time getting a better understanding of Linux basics like I did a long time ago with DOS, Netware, OS2 and Windows.   I'll split the points between the two of you on this question.  In the meantime I have downloaded Knoppix 3.8 (yes, I see it it bootable) and am experimenting with it now to see if I can figure out how to clone hda1 and hda2 to one of my network computers.  One way or another I'll figure out.  Thanks again for your time and assistance.  Much appreciated.
your welcome
dito.