On Tue, Feb 14, 2012 at 13:25, Ritesh Raj Sarraf <rrs@...> wrote:
> Is there a particular format of the root image that UML uses?
It's the "raw" image format.
Using the KVM tools, you can create one with "qemu-img create -f raw".
Otherwise just use "dd" as in:
# create a 2GB raw disk image
dd if=/dev/zero of=my_uml_disk.img bs=1m count=2048
> My intent is to have one single image and use it across all different
> virtualizations, i.e. use the same image with UML, VirtualBox, KVM etc.
Probably the simplest approach is to use KVM or VirtualBox to
install to partition the disk and install the OS on it. Then you just
pick a UML kernel compatible with the OS on the disk image and start
it. (I'm not sure VirtualBox can handle "raw" images, though.)
Use LABEL= or UUID= lines in /etc/fstab, or you'll run into troubles
as different virtualization systems use different device names for the
emulated disk (e.g., "/dev/ubda" vs. "/dev/xvda" vs. "/dev/sda" etc.)