PDA

View Full Version : [all variants] Install OS to image file



Neds Moar Salt
May 9th, 2010, 11:19 PM
Can I install ubuntu to an image file? I am using GRUB to boot my live cd, so is there a way to trick the installer into picking up an image file as another hard disk, like it is in wubi? (I am using mac)

Really what I am looking for is a way to use an image file as a hard disk.

Bachstelze
May 9th, 2010, 11:40 PM
You can mount the image file and do a debootstrap to it.

Neds Moar Salt
May 9th, 2010, 11:57 PM
You can mount the image file and do a debootstrap to it.

Hmmm... I don't know what that means. Could you explain please?

Bachstelze
May 10th, 2010, 12:00 AM
In a nutshell, boot your Live CD, mount your image file like this


sudo mount -o loop /path/to/image.img /mnt

Then install the base system like this:


sudo debootstrap lucid /mnt http://archive.ubuntu.com/ubuntu

However, I don't really know how you could boot such a system...

Jay Car
May 10th, 2010, 12:05 AM
Really what I am looking for is a way to use an image file as a hard disk.

I think this is something that Virtualbox can do...could that be what you're looking for?