LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-16-2010, 05:40 AM   #1
arty
Member
 
Registered: Nov 2008
Posts: 66

Rep: Reputation: 17
porting an entire linux installation


i was thinking
is it possible to port an entire linux installation onto another operating system using vmware for example?

what i mean is that is it possible to create an image of a hard drive and let it work through vmware as client from another OS?
 
Old 05-16-2010, 11:14 AM   #2
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: Kubuntu, Ubuntu, Debian, Proxmox.
Posts: 553

Rep: Reputation: 115Reputation: 115
This should be possible. There are a few configuration files that need to be changed if you 'move' a Linux installation. One is /etc/fstab, that details what drives and partitions are used. Another is /boot/grub/menu.lst, which details the drive used to boot. There are probably others, like you'll need to change networking and printing setup, but those two can stop boot if they're wrong. If the existing install is on the first drive you likely won't need to change the two I mentioned.

Linux tends to 'move' much more easily than Windows does. I've never moved a physical install to a virtual machine, but I've moved installs between physical machines.
 
Old 05-17-2010, 02:29 PM   #3
arty
Member
 
Registered: Nov 2008
Posts: 66

Original Poster
Rep: Reputation: 17
hello cantab and thank you for your help
after many hours of trying different things i managed to:
create an image of the "currently running" linux OS using vmware converter

vmware converter is an application designed for this job it can also convert images from windows apps such as norton ghost or acronis true image

what i'm trying to do now is to create an image of a physical drive that is mounted on another OS. is something like that possible?

meaning
i have a linux installation mounted on /hello of another linux installation
is it possible to create an image of that installation?

any help would be much appreciated
 
Old 05-17-2010, 03:06 PM   #4
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: Kubuntu, Ubuntu, Debian, Proxmox.
Posts: 553

Rep: Reputation: 115Reputation: 115
There are two basic approaches to disk copying.

To do a 'true' image, first unmount the partition, then copy the partition itself, as opposed to the files in it. dd will do the job, but Partimage offers better disk space usage at the cost of only supporting some filesystems. I'm not sure if VMWare converter will support these.

An alternative approach is to copy all the files into an archive of some sort. This works very well for Linux, but doesn't always work out right for Windows partitions. In your example, you'd do

Code:
tar -cvzf /path/to/archive /hello/
options: c means create an archive. v means be vverbose - list every file that's archived, optional but most people use it. z means use gzip compression. f means the loaction of the archive file.

Then create a new virtual machine with a new disk image, and boot it from a LiveCD. Access the archive file on the host from the LiveCD - how to do this depends on your virtual machine technology. Then in the virtual machine, use (g/qt)parted to create a Linux partition, mount that partition on say /media/sda1, and do
Code:
tar -xvzf /path/to/archive /mnt/sda1/
or use a gui archive extractor. Then you'll need to install Grub or Lilo on the VM.
 
Old 05-17-2010, 03:20 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,976

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
VMware already has an application to take Physical to Virtual. Go to VMware and use the software either in linux or windows.

http://www.vmware.com/products/converter/
 
Old 05-18-2010, 01:29 PM   #6
arty
Member
 
Registered: Nov 2008
Posts: 66

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by jefro View Post
VMware already has an application to take Physical to Virtual. Go to VMware and use the software either in linux or windows.

http://www.vmware.com/products/converter/
i have already tried that
but as i said before vmware converter in order to work has to run on the operating system that you're trying to create the image from

i want the drive that contains the OS to be imaged to be mounted as secondary on another OS
as far as i know vmware converter don't support something like this
 
Old 05-18-2010, 01:31 PM   #7
arty
Member
 
Registered: Nov 2008
Posts: 66

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by cantab View Post
There are two basic approaches to disk copying.

To do a 'true' image, first unmount the partition, then copy the partition itself, as opposed to the files in it. dd will do the job, but Partimage offers better disk space usage at the cost of only supporting some filesystems. I'm not sure if VMWare converter will support these.

An alternative approach is to copy all the files into an archive of some sort. This works very well for Linux, but doesn't always work out right for Windows partitions. In your example, you'd do

Code:
tar -cvzf /path/to/archive /hello/
options: c means create an archive. v means be vverbose - list every file that's archived, optional but most people use it. z means use gzip compression. f means the loaction of the archive file.

Then create a new virtual machine with a new disk image, and boot it from a LiveCD. Access the archive file on the host from the LiveCD - how to do this depends on your virtual machine technology. Then in the virtual machine, use (g/qt)parted to create a Linux partition, mount that partition on say /media/sda1, and do
Code:
tar -xvzf /path/to/archive /mnt/sda1/
or use a gui archive extractor. Then you'll need to install Grub or Lilo on the VM.

i will try this later on this week and i will let you know what happened and if it worked
thank you
 
Old 05-18-2010, 04:36 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,976

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
No it does not.
 
Old 05-19-2010, 01:42 AM   #9
arty
Member
 
Registered: Nov 2008
Posts: 66

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by jefro View Post
No it does not.
what do you mean?

you mean that it can actually be done via the converter?
any help would be much appreciated
 
  


Reply



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
HP-UX to linux porting arunprakash Other *NIX 2 03-01-2005 10:53 PM
Movin entire installation cabrilo Linux - Software 1 11-13-2004 06:33 PM
Moving an entire Linux installation ... dhave Linux - General 7 10-19-2004 02:52 PM
Porting Slack installation to a new hard-drive dizzi Slackware 4 08-26-2004 01:05 PM
Porting to Linux?? 00-00-00 Linux - General 1 05-27-2002 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:33 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration