All we need is an easy explanation of the problem, so here it is.
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.
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
Grub can map pretty much any disk image files and boot from that
grub4dos and grub1 support the
mapcommand 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
grub2you’ll have to use the
loopbackcommand which can be used to boot both read-only and read-write images
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
xnu_ramdiskdepending 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.
- Booting an EXT4 image file from GRUB2
- grub: boot from ISO
- How to boot Fedora Live CD iso from a Hard Drive?
- How to boot Linux from image on disk or "Poor Man's Install"?
- Can I boot Linux from a VHD?
- Install Ubuntu from ISO image directly from hard disk of a system running Linux?
- Deploy Linux into, and boot from, VHD
- How to Boot Linux ISO Images Directly From Your Hard Drive
- Is it possible to native boot Linux from raw disk image?
- booting linux from a loop file system
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂