1

I have searched for this quite a lot, yet all I could find was VLite. By the way, I'm talking about an equivalent for Windows native VHD boot and not virtualization.

2

Grub can map pretty much any disk image files and boot from that

  • grub4dos and grub1 support the map command for booting from read-only images. I'm not sure about their capabilities to boot read-write images. There are 2 types of mapping

    • Memory map: The image is loaded onto memory before mapping as disk, usually used with floppy disk images. When memory mapping is used the disk image file can be non-contiguous. For example:

      map (hd0,0)/win98.ima (fd0)
      
    • Direct map: map the file using int13, requires the file to be contiguous

      map (device)/path/file.iso (hd32)
      

      After all mappings were done you'll need to commit them with map --hook

      These types of mapping allow you to easily boot any live Linux distros. If necessary you can use a casper rw persistent disk image for non-volatile data. For more information read LiveCD/Persistence

  • In grub2 you'll have to use the loopback command which can be used to boot both read-only and read-write images

    5.2 Loopback booting

    GRUB is able to read from an image (be it one of CD or HDD) stored on any of its accessible storages (refer to see loopback command). However the OS itself should be able to find its root.

    This usually involves running a userspace program running before the real root is discovered. This is achieved by GRUB loading a specially made small image and passing it as ramdisk to the kernel. This is achieved by commands kfreebsd_module, knetbsd_module_elf, kopenbsd_ramdisk, initrd (see initrd), initrd16 (see initrd), multiboot_module, multiboot2_module or xnu_ramdisk depending on the loader.

In the past wubi used the same technique to boot Ubuntu from an image without an ext4 root partition


If you're using syslinux then there's an equivalent feature called MEMDISK

MEMDISK is meant to allow booting legacy operating systems. MEMDISK can boot floppy images, hard disk images and some ISO images.

MEMDISK simulates a disk by claiming a chunk of high memory for the disk and a (very small - typically, 2K) chunk of low (DOS) memory for the driver itself, then hooking the INT 13h (disk driver) and INT 15h (memory query) BIOS interrupts.

See

  • I thought so - might help to add some information on the specifics on how to do that - for posterity's sake. – Journeyman Geek Oct 7 '13 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.