[GRLUG] VirtualBox question

John-Thomas Richards jtr at jrichards.org
Fri Feb 27 11:40:44 EST 2009


On Fri, Feb 27, 2009 at 10:57:48AM -0500, Bill Littlejohn wrote:
> On Fri, Feb 27, 2009 at 10:18 AM, John-Thomas Richards <jtr at jrichards.org>wrote:
> 
[snip]
> > > No, booting from a live cd isn't necessary. That's just a simple way to
> > get
> > > the bootloader and the restore partition onto the second drive without
> > > worrying too much about partition tables and boot loaders.
> > > When I did this, I setup the disk more or less how I thought the restore
> > > expected the disk to look like.
> > > I copied the bootloader and the restore partition to the target drive,
> > and
> > > had a a second partition there just so the number of partitions was
> > right.
> > > The restore isn't likely to ask anything and will put everything on the
> > > second partition. That worked out fine in my case.
> > > Can you tell me how big those partitions are, how much space is
> > available,
> > > and where you want to put your new VM?
> > > Bill
> >
> > me at rondo:~$ df -h
> > Filesystem            Size  Used Avail Use% Mounted on
> > /dev/sda3              28G  9.8G   17G  38% /
> > /dev/sda4             108G   65G   38G  64% /home

I forgot to include:

/dev/sda1              11G  6.0G  4.6G  57% /media/vista

> > The VM would go into /home/me.
> >
> > Would it work to make an .iso out of the partition?  I can install from
> > an .iso in VB.
> > --
> > john-thomas
> >
> 
> I have no idea about the ISO, I would not think that would work.
> Virtualbox can boot a raw partition, so it's possible to do something like
> this
> http://mesbalivernes.blogspot.com/2008/01/virtual-box-booting-from-existing.html

This seems to be for creating a VM out of an existing installation -
creating a VM out of a partition used in dual-booting.  That is not what
I want to do.  I do not have my system set up for dual-booting (nor do I
want to do so).

> but that kind of thing seems kludgy and dangerous to me.
> 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.

I'm confused about why I need to move the partition into another
partition (on a USB drive).  Is it so it has a bootloader?  Can I not
install a bootloader into the restore partition and accomplish the same
thing?  (Perhaps my ignorance is showing here...)  The restore partition
would only be used to install the VM and then it could be removed (at
the least unmounted).

> 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).
> 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.
> I may be wrong, but other methods seems to get rather complicated rather
> quickly.
> This of course all hinges on having another 130GB+ drive laying around.

Why would I repartition sda2-4 into one ntfs partition?  I don't want to
get rid of my Linux install.  I just want to boot the restore partition
via VirtualBox to create a VM of the factory install of my laptop, after
which I can delete the restore partition and continue running Debian as
my operating system, booting <gulp> the Vista VM as needed.
-- 
john-thomas
------
All restraints upon man's natural liberty, not necessary for the simple
maintenance of justice, are of the nature of slavery, and differ from each
other only in degree.
Lysander Spooner, lawyer (1808-1887)


More information about the grlug mailing list