Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to do it because I want to install Windows 7 and my BIOS menu doesn't appear; it skips to grub2 menu at start, but that's another story... Is there a way to boot the Windows 7 installation iso directly from grub2?

share|improve this question
1  
" my BIOS menu doesn't appear" But have you tried to get into the BIOS? –  Mitch Oct 28 '13 at 7:12

2 Answers 2

Yeah, you'd think something like this would work:


menuentry "Boot Windoze" {
  search -f "--set-root /Winblows.iso"
  drivemap "/Winblows.iso" '(hd32)'
  drivemap '--hook' ''
  set root='(hd32)'
  chainloader +1
}

But Windows will just balk at that.

If you happen to have at least 4GB RAM, you can opt to load the whole DVD iso in memdisk and boot off that. To do that, download SysLinux and extract the memdisk file into your boot directory. Then you need to add code to Grub2 something like this


menuentry "Boot Windoze" {
  search -f "--set-root /Winblows.iso"
  insmod memdisk
  linux16 /boot/memdisk iso
  initrd16 /Winblows.iso
}

However, I'm not going to even test the code, as putting 3+ GB of data into RAM is just plain wrong (from an idealogical standpoint). No, I really wanted what you want, but in the end I put the Windows install on a partition on a USB using the Windows 7 USB/DVD download tool and chainloaded to that. Sorry there doesn't seem to be any other way that I can see.

share|improve this answer
    
First code will boot windows but fail after sometime as windows don't know where the iso is mounted –  totti Feb 18 at 9:26
    
Second code may not work, as it will not work with iso of Ubuntu –  totti Feb 18 at 9:28
    
The OP is referring specifically to Windows 7. Been able to test that? –  Warpspace Mar 14 at 5:28
    
thank you for taking care to make direct answers. –  naxa Jun 12 at 10:06

Technically installing from windows's .iso file can't be possible. You can boot from the .iso using grub but after that Windows will loss contanct with the mounted location or it is not capable of it. So both grub & Windows should aware of mount and boot. Currently Windows doesn't support.

So you neeed to extract/copy the content of .iso to root of a partition and then chainload into it using grub.

share|improve this answer
    
good idea to share knowledge, but you could add directly answering the question in technical manner. namely reuse the current text as a disclaimer but then you could expand the "you can boot from the .iso" into menuentries or something. that way you'd make exact which method(s) you imagined to achieve what was asked, although which you know not to work for the assumed purpose. this would also disambiguate the count of solutions that you did consider. –  naxa Jun 12 at 9:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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