Is it possible to boot from a file?

Associate
Joined
29 Mar 2010
Posts
831
I have a system image in a file on an external hard drive. Is it possible to boot from that image? If so, how would I go about doing this...
 
It's an image of the first partition of my hard drive with a windows installation. Copied over with dd from a linux live cd.

dd if=/dev/sda1 of=/media/BKP_HDD/C.iso bs=4096 conv=notrunc
(if that helps at all)

I was actually just curious as to whether it could be done, if the answer is 'no', that is fine too.
 
As you didn't pass it through gzip it'll be trivial to mount -o loop under linux, so you don't need to copy it onto a disk to read data from it. Virtualbox / vmware can probably be forced to boot a virtual machine from the image; I've done that with a real partition and linux thinks everything is a file so it should be possible.

If it was a linux install, then modifying the initrd to mount the image somewhere then hand control over to a kernel found on that image will be possible but irritating to implement.

Booting an image of a windows install from a file is unlikely to be possible. Or at least, not without silly amounts of work. If you manage it then all the people who would like to boot windows in a ramdisk would love to hear from you.
 
You are right, mounting in linux is trivial, although it doesn't work with loop.... am I right in thinking that this means the fs is corrupted?
 
You should be able to boot it in a virtual machine (not as the main OS) depending on how sucessfully the install can convert to the virtual hardware). Most VMs can convert or boot from common ISO, etc. formats aslong as the original image creation stored enough low level info.
 
Back
Top Bottom