<br><br><div class="gmail_quote">On Fri, Feb 27, 2009 at 10:18 AM, John-Thomas Richards <span dir="ltr"><<a href="mailto:jtr@jrichards.org" target="_blank">jtr@jrichards.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div>On Fri, Feb 27, 2009 at 10:06:27AM -0500, Bill Littlejohn wrote:<br>
> On Fri, Feb 27, 2009 at 8:58 AM, John-Thomas Richards <<a href="mailto:jtr@jrichards.org" target="_blank">jtr@jrichards.org</a>>wrote:<br>
><br>
> > On Thu, Feb 26, 2009 at 02:43:11PM -0500, Bill Littlejohn wrote:<br>
> > > On Thu, Feb 26, 2009 at 2:30 PM, John-Thomas Richards <<a href="mailto:jtr@jrichards.org" target="_blank">jtr@jrichards.org</a><br>
> > >wrote:<br>
> > ><br>
> > > > My laptop came with a restore partition for another OS. I would like<br>
> > to<br>
> > > > install this operating system in a virtual machine with VirtualBox. My<br>
> > > > Google-fu is failing me because all I can find is references to<br>
> > > > installing a virtual machine *into* a physical partition, not<br>
> > installing<br>
> > > > a virtual machine *from* a physical partition. Anyone here have a clue<br>
> > > > if this is possible?<br>
> > ><br>
> > > Sure - just copy the partition to a different drive.<br>
> > > There are a couple of ways I can think of.<br>
> > > What I would do requires an external USB hard drive of equivalent (or<br>
> > > larger) capacity to your laptop hard drive.<br>
> > > Boot from a live-cd, then dd your laptop drive to the USB drive. This<br>
> > will<br>
> > > overwrite anything on the USB drive with the copy.<br>
> > > Setup your VM and connect the USB drive to it. You should be able to boot<br>
> > > the restore partition from there.<br>
> > > I assume the drivers would be somewhat borked since it's likely preloaded<br>
> > > with your laptop hardware drivers. You'll want to install the virtual<br>
> > > hardware drivers as soon as possible to straighten things out.<br>
> > > Bill<br>
> ><br>
> > My drive is partitioned thusly:<br>
> ><br>
> > /dev/sda1 /media/restore_partition<br>
> > /dev/sda2 swap<br>
> > /dev/sda3 /<br>
> > /dev/sda4 /home<br>
> ><br>
> > Is booting from a live CD necessary?<br>
> > --<br>
> > john-thomas<br>
> ><br>
><br>
</div></div><div>> No, booting from a live cd isn't necessary. That's just a simple way to get<br>
> the bootloader and the restore partition onto the second drive without<br>
> worrying too much about partition tables and boot loaders.<br>
> When I did this, I setup the disk more or less how I thought the restore<br>
> expected the disk to look like.<br>
> I copied the bootloader and the restore partition to the target drive, and<br>
> had a a second partition there just so the number of partitions was right.<br>
> The restore isn't likely to ask anything and will put everything on the<br>
> second partition. That worked out fine in my case.<br>
> Can you tell me how big those partitions are, how much space is available,<br>
> and where you want to put your new VM?<br>
> Bill<br>
<br>
</div>me@rondo:~$ df -h<br>
Filesystem Size Used Avail Use% Mounted on<br>
/dev/sda3 28G 9.8G 17G 38% /<br>
/dev/sda4 108G 65G 38G 64% /home<br>
<br>
The VM would go into /home/me.<br>
<br>
Would it work to make an .iso out of the partition? I can install from<br>
an .iso in VB.<br>
<font color="#888888">--<br>
john-thomas<br>
------<br>
As a well spent day brings happy sleep, so life well used brings happy<br>
death.<br>
Leonardo da Vinci (1452-1519)<br>
</font><div><div></div><div>_______________________________________________<br>
grlug mailing list<br>
<a href="mailto:grlug@grlug.org" target="_blank">grlug@grlug.org</a><br>
<a href="http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug" target="_blank">http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug</a><br>
</div></div></blockquote></div><br>I have no idea about the ISO, I would not think that would work.<br>Virtualbox can boot a raw partition, so it's possible to do something like this<br><a href="http://mesbalivernes.blogspot.com/2008/01/virtual-box-booting-from-existing.html">http://mesbalivernes.blogspot.com/2008/01/virtual-box-booting-from-existing.html</a><br>
but that kind of thing seems kludgy and dangerous to me. <br>What you really need to do is get the restore partition and bootloader on to a second drive, be it virtual or physical, and boot that in the VM. 38GB of free space doesn't leave much room for playing around though. <br>
If you have a spare drive large enough to copy your existing drive into, then you can attach that to the VM and boot the VM using a live CD ISO, repartition the drive to turn sda2,sda3,sda4 into one ntfs partition, reboot the VM without the live cd and run the restore, then when it's all done and youv'e successfully booted the restored OS, shrink the OS partition as small as practical (and obviously somewhat <38GB).<br>
After all that you'll have a working VM, and all you have to do is convert the physical drive into a virtual one and change the VM config to use the new virtual disk.<br>I may be wrong, but other methods seems to get rather complicated rather quickly.<br>
This of course all hinges on having another 130GB+ drive laying around.<br><br>