Grub4dos Win 10
I'm attempting to create a multipurpose AIO USB stick for everyday use. So far I've been able to get Mint, Tails, And Hiren's boot cd all successfully working off of one device similar to the tutorial found here:
However, I'm running into trouble adding Windows 10 to this list. I've done some research but have yet to find a suitable solution for Windows 10.
Is there anyway to add a menuentry to the grub.cfg in order to make this work, or is there a more detailed solution.
Thanks for any help in advance.
EDIT:
I've managed to get the iso to boot using the following menu entry:
The only problem is once I choose install the following error occurs:
So somehow it can't properly read the files after it starts the setup process.
EDIT 2:
I was able to get the entire thing working with YUMI.
Browse other questions tagged bootwindows-10multi-bootgrubgrub2 or ask your own question.
How can I boot into an ISO file in GRUB? The ISO file is on a reiserfs partition and GRUB can access it (already tested that).
2 Answers
The biggest problem with booting an ISO file is that ISOs that are designed to be booted are almost always designed to be booted from a CD. As explained on Marco's blog regarding Grub 2 (emphasis mine):
GRUB can read ISO9660 (”iso”) images. It can for example load the first few sectors and boot it. But most people do not realize is “what then?”. What would the loaded operating system do? It will most likely look for a CDROM, which it won’t find, and fail.
So the dead-simple-est way to boot from some random ISO file is to load it into a virtual machine (VirtualBox, VMware, or Virtual PC) as a virtual CD and boot it there. That should almost always work, because to the VM, it's not an ISO file -- it's a real CD on real CD hardware.
Booting from an ISO file on bare metal is much harder. How you do this depends on which version of Grub you're using, and results can differ depending on what ISO you're using and how it was configured to boot. This is why most boot-ISO-from-USB tools (Unetbootin, WinToFlash, etc) usually extract the ISO contents to the drive -- because that way they can be accessed directly, without confusing the OS being booted.
Grub 1
... not sure. If possible, menu entries will probably look a lot like Grub4DOS, though I think the 'map --hook' command is a Grub4DOS enhancement. On the plus side, Grub has wider filesystem support than Grub4DOS.
A note on Grub with reiserfs (unconfirmed) indicates you 'have to mount your partition with notail
for it to work'.
Memdisk is an option; see below.
Grub4DOS
Grub4DOS offers some experimental 'CD emulation' that works with some ISOs. Unfortunately, Grub4DOS only reads FAT32/NTFS filesystems. Download Grub4DOS.
Here's a sample entry (source):
Supposedly the Win7 ISO can be booted with this entry:
Other ISOs can be booted with Memdisk:
You can also use a menu configurator like MultiBootISOs.exe from PenDriveLinux. Place ISOs on the flash drive, and run the utility to install the bootloader and configure the boot menu.
Here's a Hak5 episode on installing Grub4DOS.
Grub 2
Here's a couple of example Grub2 entries. chainloader doesn't work to boot an ISO at present, so these entries must (1) use loopback to 'mount' the ISO, and (2) add something like iso-scan or findiso to the linux line that specifies the ISO file.
Unfortunately, there's no generic way to do this. Each different boot entry must be customized to the target ISO's contents. Most Linux LiveCDs use ISOLINUX as a bootloader; find the isolinux.cfg and examine that boot entry to see what it usually boots.
Example entries (source):
If you're trying to boot a non-Linux LiveCD, you may be out of luck. Again, Memdisk may help:
You can use dd from the terminal to write an iso file to a partition. Just be careful, if you use dd wrong you can wipe everything. It should look something like this:dd if=Desktop/LinuxCDFile.iso of=/Path/To/Partition