LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-06-2011, 01:08 AM   #1
SARogers
LQ Newbie
 
Registered: Jan 2011
Posts: 5

Rep: Reputation: 0
Creating image of drive partitons


I have what I thought was a simple task of creating ISO images of my Windows 7 system partion and boot partiton (the C drive) on my physical hard drive that I could use to load Windows 7 onto a virtual machine. Anyway, I'm running Ubuntu off the CD drive and I can see my drive partions (checked using the fdisk -l command). I have tried many iterations of the mkisofs command, but no matter what I do I get the error message: unable to open disk image file ‘dev/sdb/win7sys.iso’. I don’t understand why it’s trying to open an ISO file it is supposed to be creating. The -o FILE option sets the output file name, so the message makes no sense to me. Below is an example of a simple and longer version with more options that I have tried to create an image of my sytem partiton (sda1) and save it on an external drive (sdb) with the file name: win7sys.iso (the next step I think would be to create or merge both partition images as one iso file for the VM). But I can't get past this error.

Can anybody tell me what I'm doing wrong?

sudo mkisofs -o dev/sdb/win7sys.iso /dev/sda1

sudo sudo mkisofs -input-charset iso8859-1 -V win7sys -o dev/sdb/win7sys.iso /dev/sda1


* Note that the output after the -o parameter is the desired destination /dev/sdb (my external drive) for the image file and /dev/sda1 is my Windows 7 system or boot partition (sda2 is what Windows sees as the C drive).

Last edited by SARogers; 01-06-2011 at 01:09 AM.
 
Old 01-06-2011, 03:49 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
There are two errors in your command.
At first, it is not possible to write a file to the device in the way you want it to do. You have to first mount your external drive, before you write to it. Therefore you get the errormessage that mkisofs can't open the file you specified (of course the command has to open the file to write to it).
Second, I would assume that your external device has at least one partition on it (not a must, but very, very common), so the device-name for that partition should be /dev/sdb1, not /dev/sdb.

But there seems to be also at least one logical error in your thoughts. At first, you will not be able to install Windows 7 from an ISO-image made from your harddisk into a VM. This will simply not work. Except that, in your mkisofs-command there is no mention of a bootloader that has to be integrated into the image to boot from it.
Second, you need a better understanding of your system's partitions. sda1 is only your boot partition, not the system partition, your whole system, except the bootloader, is on sda2. They can't be simply merged.

The simplest solution would be a fresh install from your Windows-install-disc. But be aware that there be legal implications with using a single Windows license on a physical and a virtual machine.

Last edited by TobiSGD; 01-06-2011 at 03:50 AM.
 
Old 01-06-2011, 09:29 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,951

Rep: Reputation: Disabled
Quote:
Originally Posted by SARogers View Post
...
sudo mkisofs -o /dev/sdb/win7sys.iso /dev/sda1

sudo sudo mkisofs -input-charset iso8859-1 -V win7sys -o /dev/sdb/win7sys.iso /dev/sda1
...
Typo? Else I'd suggest you heed TobiSGD's advice (I got good counsel from him, too ).

Last edited by JZL240I-U; 01-07-2011 at 01:51 AM.
 
Old 01-06-2011, 12:58 PM   #4
SARogers
LQ Newbie
 
Registered: Jan 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks guys. I suspected I was going down a road with a dead end. I had read a few things that hinted at this not working and the licensing problem. Probably why I could not find anything explaining how to do this. I have been told about a special migration utility on the VMWare web site to do this, but even if that works, there is the licensing issue. It is amazing to me why Microsoft with all the Windows problems over the years does not see the value in allowing users of a single machine to run Windows 7 on different VMs. This would prevent one user from screwing the whole machhine up for the other users. And what's the difference anyway. Each user of one machine (like in my household) is not going to each pay a fee to use the same bloody computer. Just one more frustration that will ultimately push me to Apple.
 
Old 01-06-2011, 01:32 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Quote:
Originally Posted by SARogers View Post
It is amazing to me why Microsoft with all the Windows problems over the years does not see the value in allowing users of a single machine to run Windows 7 on different VMs. This would prevent one user from screwing the whole machhine up for the other users.
Simple answer, they make money with it. By the way, as far as I know it is version dependent if you are allowed to use it in a VM and on a physical computer. I believe that from Professional upwards you are allowed to do it with exactly one VM.

Quote:
Just one more frustration that will ultimately push me to Apple.
That would not be better. As far as I understand you are only allowed to run MacOS X on an machine with Apple brand. So you would need a VM with Apple's logo.
 
Old 01-06-2011, 02:05 PM   #6
SARogers
LQ Newbie
 
Registered: Jan 2011
Posts: 5

Original Poster
Rep: Reputation: 0
With a MacOS I wouldn't need to set up VMs. MacOS is industructable from what every Mac user has told me.

If I can install or migrate Win7 (professional edition or other) on one VM, how would the OS be able to detect installation or migration onto other VMs?
 
Old 01-06-2011, 02:25 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Quote:
Originally Posted by SARogers View Post
With a MacOS I wouldn't need to set up VMs. MacOS is industructable from what every Mac user has told me.
To think you have an indestructible OS is the same as to think that your OS is to 100% secure against attacks. Just nonsense.

Quote:
If I can install or migrate Win7 (professional edition or other) on one VM, how would the OS be able to detect installation or migration onto other VMs?
If you just clone your VMs, I think it wouldn't notice. But that wouldn't change anything about the license, and simply would be illegal.
 
Old 01-06-2011, 02:44 PM   #8
SARogers
LQ Newbie
 
Registered: Jan 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Well, I would just say the the MacOS has a reputation that can't be denied. Maybe not perfect, but damn close.

Yes the licensing issue must be addressed and I'm looking into that. Maybe there is some soultion from Microsoft that is not as ridiculous as buying multiple full versions of Win7.

As for your comment on version dependence and running one VM, I think you are referring to XP VM capability that comes with Win7 professional and above. But you can add this XP capability using a VM to Win7 home edition for free (download and install Virtual PC 2007), but I donít want XP on a VM, I want Win7 on multiple VMs.
 
Old 01-06-2011, 02:56 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Quote:
Originally Posted by SARogers View Post
As for your comment on version dependence and running one VM, I think you are referring to XP VM capability that comes with Win7 professional and above.
You are right, I have confused that, from the Windows 7 Ultimate EULA:
Quote:
d. Use with Virtualization Technologies. Instead of using the software directly on the licensed computer, you may install and use the software within only one virtual (or otherwise emulated) hardware system on the licensed computer.
 
Old 01-06-2011, 03:09 PM   #10
silvyus_06
Member
 
Registered: Oct 2010
Distribution: Ubuntu 10.04 , Linux Mint Debian Edition , Microsoft Windows 7
Posts: 390

Rep: Reputation: 50
i read all the posts that say it's a bad thing and you can't install it .
but no one ever mentioned dd.

try something like ... dd of=/dev/sda if=dev/sdbX/myiso.iso
 
Old 01-06-2011, 03:47 PM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Quote:
Originally Posted by silvyus_06 View Post
i read all the posts that say it's a bad thing and you can't install it .
but no one ever mentioned dd.

try something like ... dd of=/dev/sda if=dev/sdbX/myiso.iso
If you have read all the posts, you should know that if=dev/sdbX/myiso.iso is 1. the wrong path (/dev instead of dev) 2. not mounted, what means that you can't simply put a file on it. But that may work, but will not solve the legal issues. Besides that, this type of migration will be noticed by the Windows-system, and it has to be activated again. Easiest and best way to run Windows in a VM is to just install it.
 
Old 01-06-2011, 06:11 PM   #12
silvyus_06
Member
 
Registered: Oct 2010
Distribution: Ubuntu 10.04 , Linux Mint Debian Edition , Microsoft Windows 7
Posts: 390

Rep: Reputation: 50
1.i guess that is what they call "oopss ... that was a little typo on my part "
2 . since i read all the responses , i was already assuming he had mounted it
 
Old 01-06-2011, 06:50 PM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Quote:
Originally Posted by silvyus_06 View Post
2 . since i read all the responses , i was already assuming he had mounted it
That wouldn't make a filecopy to /dev/sdbX working.
 
Old 01-06-2011, 08:07 PM   #14
SARogers
LQ Newbie
 
Registered: Jan 2011
Posts: 5

Original Poster
Rep: Reputation: 0
The issue for me at this point really isn't about creating an image of sda1 or sda2 as that can be done once correcting for my many errors. The issue is that even with the ISO image, there is no way to use the image to install Win7 on the VM. Only way as mentioned here and on the ubuntu forum is to install Win7 from install disks on the VM. Something like Parallels Desktop 4 for Windows would work well to do that. I have looked at the special migration utility on the VMWare web site, but that looks like it's for migrating Windows XP to Win7 and for use at the enterprise level. So my question now is if I install Win7 on multiple VMs from install disks, setting aside the licensing issue for a moment which I will address with Microsoft, will this work? I see now reason why one can't run Win7 on multiple VMs on the same machine. Certainly this is being done all the time and done simultaneously from a server. In may case only one VM at a time will be used. Again, for me, it's all about isolating one user from another on the same machine.

Last edited by SARogers; 01-06-2011 at 08:13 PM.
 
Old 01-07-2011, 05:33 AM   #15
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
It should be no problem to run many instances of Windows 7 in virtual machines. May I ask why you want to run them on Windows as host? Why not a bare-bones Linux system, with a minimal WM as host, and then your virtual machines in Virtualbox? It is free and should do the job fine. At least the trial version of Windows 7 Enterprise runs fine in them. If you use the PUEL version of Virtualbox (free for personal use), you should get all what you need.
 
  


Reply


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
Creating a hard drive image binarybob0001 Linux - Software 4 06-08-2006 07:39 AM
creating drive image capnp72 SUSE / openSUSE 3 02-09-2006 02:36 AM
Creating/restoring drive image on USB drive OneSeventeen Linux - Newbie 9 07-06-2005 06:08 AM
Creating a Drive image Earl_UK Linux - Newbie 1 02-16-2005 09:49 PM
Question on creating partitons nafsnipe685 Linux - Software 2 01-21-2004 01:37 PM


All times are GMT -5. The time now is 05:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration