Jump to content











Photo

Make a multi-install USB Flash drive using grub4dos and Windows ISO files


  • Please log in to reply
106 replies to this topic

#76 steve6375

steve6375

    Platinum Member

  • Developer
  • 7567 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 16 January 2014 - 12:05 PM

Which tutorial exactly?

What type of device are you booting from?

1. Removable USB FLash drive

2. Fixed-disk Flash drive (shown in Explorer as Local Disk)

3. USB Hard Disk



#77 doveman

doveman

    Frequent Member

  • Advanced user
  • 449 posts
  • Location:Surrey
  •  
    United Kingdom

Posted 25 March 2014 - 09:21 PM

I'm trying to run this from my HDD but although I've edited the ISO as per the Addendum, LOADISO.CMD fails saying "INSTALL.WIM not found".

 

In fact, looking in my Win8.1 AIO ISO, even the pre-edited one, it doesn't have a sources/Install.wim but a 4GB install.esd.

 

Saying Yes to "Do you want to try to repair Windows" throws an exception as well and examing the ISO it seems that's because the sources\recovery folder is absent!

 

I tried using this ISO with EasyBoot as well but that loads and then gives an error about not being able to find the Software Licence Agreement document or something.

 

I managed to install it by running setup.exe from a VHD the other week but I messed up and ended up with Windows on Y: I was going to live with it but today it's decided it's not going to boot any more, even to safe mode and I need to reinstall it so that I can give evidence in a hearing via Skype tomorrow morning so I wanted to do it properly this time but I might just have to do it from the VHD again for now, unless anyone comes along with some advice shortly.



#78 steve6375

steve6375

    Platinum Member

  • Developer
  • 7567 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 25 March 2014 - 09:25 PM

You can edit loadiso.cmd to look for install.* instead of install.wim 

OR

Easy2Boot will work (it has been modified for install.*) but you must use the correct product key or you will get an error message.



#79 doveman

doveman

    Frequent Member

  • Advanced user
  • 449 posts
  • Location:Surrey
  •  
    United Kingdom

Posted 25 March 2014 - 09:41 PM

Thanks. I'll try editing loadiso.cmd then. I'm pretty sure I'm using the right product key in Easy2Boot, the error seems to be more related to it not being able to find the licence agreement that it wants to display and have me agree to before proceeding.



#80 doveman

doveman

    Frequent Member

  • Advanced user
  • 449 posts
  • Location:Surrey
  •  
    United Kingdom

Posted 25 March 2014 - 09:52 PM

Hmm, I'm still getting

Looking for a drive containing \Firadisk\loadiso.cmd
Error - could not find install.win

I didn't edit the error messages, just the two checks for install.wim

#81 steve6375

steve6375

    Platinum Member

  • Developer
  • 7567 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 26 March 2014 - 06:47 PM

Suggest you use Easy2Boot and just copy the ISO to \_ISO\WINDOWS\Win8 folder...



#82 doveman

doveman

    Frequent Member

  • Advanced user
  • 449 posts
  • Location:Surrey
  •  
    United Kingdom

Posted 27 March 2014 - 05:19 PM

As I said "I tried using this ISO with EasyBoot as well but that loads and then gives an error about not being able to find the Software Licence Agreement document or something."

 

That was with the ISO before I tried editing it to work with this tutorial.



#83 steve6375

steve6375

    Platinum Member

  • Developer
  • 7567 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 27 March 2014 - 05:32 PM

That (I am pretty sure) is a product key issue. Whether you use the tutorial or E2B, they both use the same basic method and both will require a Product key specified in the AutoUnattend.xml.

 

If the ISO does not normally require a product key and you don't know what the 'embedded' one is, then install the ISO to a VM (load the ISO as a DVD drive and boot from it in the VM) and then install Windows to a virtual HDD. Then run a Key Finder program to find the actual Product Key. Then use that product key for your E2B (or whatever) install method.



#84 conan

conan

    Newbie

  • Members
  • 21 posts
  •  
    Romania

Posted 30 March 2014 - 10:22 PM

Hello,

Last year I built a bootable USB flash drive using FiraDisk, that installs Windows 8 (in page 3 of this thread you can see my posts). All went fine finally. Now, after a year, I've upgraded to RMPrepUSB_Full_v2.1.718 and after computer reboot, motherboard boot into flash drive instead into Windows 8 (to continue with installation, after the first restart).

I've tested with 2 different USB drives with the same result.

The problem is that I don't have the last year's RMPrepUSB version and I don't remember what build it was.

My settings in RMPrepUSB are:

WinPEv2/WinPEv3/Vista/Win7 bootable {BOOTMGR] (CC4)

NTFS + Boot as HDD (C: 2PTNS)

 

I've tested with both MBR and PBR and with MBR only, with the same results.

The drive have 64 GB.



#85 steve6375

steve6375

    Platinum Member

  • Developer
  • 7567 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 30 March 2014 - 11:28 PM

Isn't it just the case that your BIOS is set to boot from the USB drive first? Set the hard disk as first boot device.

To boot from the the USB drive, use the BIOS Boot Selection Menu.



#86 conan

conan

    Newbie

  • Members
  • 21 posts
  •  
    Romania

Posted 31 March 2014 - 06:35 PM

You're right! This occured, because I disconnect the SSD's (in RAID0) from SATA ports, so the Win8.1 setup will not interfere with Windows 8 installation from RAID0 array and I can test my new build of Win8.1, to HDD (it have drivers that can't be tested in virtual machine and many tweaks). In this case, the USB drive was moved up to first boot device in BIOS, because it was connected to the motherboard.

Thanks!

 

Any word about this error: get_cdinfo int13/4B01(FF), err=0, drive=255

I get this error with one Win8.1 iso. Despite it, I can install correctly the OS, if I press any key from keyboard to continue (in the begining of the setup).

I rebuild that iso several times and defragment the drive with Defragler, but the error still exist and it's the single iso with problems from that USB drive.

Thanks.



#87 steve6375

steve6375

    Platinum Member

  • Developer
  • 7567 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 31 March 2014 - 06:54 PM

4B01 is get cdrom status interrupt. Do you get the same error if booting it from QEMU or VBox? If not then it maybe points to a BIOS issue?

err=0 suggests no error. maybe it is just information (is debug set to 1 or 2 or 3?

 

Try adding

debug 0

before the last menu command.



#88 conan

conan

    Newbie

  • Members
  • 21 posts
  •  
    Romania

Posted 31 March 2014 - 08:17 PM

I added debug 0 before the last menu command in menu.lst.

Now the error is just: int13/4B01(FF), err=0, drive=FF

In QEMU i got this error on the same iso: Warning: PTN TABLE 4 IS ALREADY IN USE!

But, in VMware no errors occurs.



#89 conan

conan

    Newbie

  • Members
  • 21 posts
  •  
    Romania

Posted 01 April 2014 - 01:05 PM

I've tested in VirtualBox, without errors too.



#90 steve6375

steve6375

    Platinum Member

  • Developer
  • 7567 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 01 April 2014 - 02:04 PM

I added debug 0 before the last menu command in menu.lst.

Now the error is just: int13/4B01(FF), err=0, drive=FF

In QEMU i got this error on the same iso: Warning: PTN TABLE 4 IS ALREADY IN USE!

But, in VMware no errors occurs.

 

Did you use QEMU in RMPrepUSB - it enables writes under grub4dos which means that the partition 4 entry will be cleared.

If you just use plain QEMU (or QEMU Manager) then E2B cannot write to the partition table.

 

Anyway, if VMs are OK, it seems likely it is a BIOS issue. 

If you are using E2B 1.31, see if switching to grub4dos 0.4.6a helps + USB driver (in main menu)?



#91 conan

conan

    Newbie

  • Members
  • 21 posts
  •  
    Romania

Posted 01 April 2014 - 05:53 PM

Hi,

I use QEMU from RMPrepUSB v2.1.718.

Probably it's a USB drive issue, because, if I remember right, in the begining, another iso was the problem. Since than, I did many tests and only one iso was the problem, no matter if I defragment the drive before test or not.

I'll try with the latest Easy2Boot version and report here. Now, I use firawiniso.

 

Edit.


Edited by conan, 01 April 2014 - 06:01 PM.


#92 conan

conan

    Newbie

  • Members
  • 21 posts
  •  
    Romania

Posted 19 July 2014 - 10:26 PM

Hi,

Recently I've purchased a SanDisk SDCZ80-064G-G46 drive, that give an error on the beginning of Windows 8.1 installation regarding a missing driver. Also, Windows 7 USB - DVD Download Tool can't recognize it, but if I prepare the drive with the next command: "bootsect.exe /NT60 H" and then copy the ISO content to drive, the "missing driver" error will not appear, but my custom Autounattend.xml file will not be used by Windows 8.1 setup.

I also used RMPrepUSB v2.1.722 to prepare the drive like the other 64 GB drive and then copy firawiniso and the other files into it, but I got the same "missing driver" pop-up. Then, I formatted the drive with NTFS file system in low mode, used again RMPrepUSB v2.1.722, but I got the error again.

Please note that I can boot into Win8PESE from the drive, but the only problem appear on the begining of Windows 8 installation, before disk selection and the Autounattend.xml isn't seen by the setup.

Should I try other methods or return the drive and get a refund?

Thanks!



#93 steve6375

steve6375

    Platinum Member

  • Developer
  • 7567 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 19 July 2014 - 10:58 PM

It sounds like your USB drive is a 'Fixed-disk' type.

The Windows DVD tool will not install to a Fixed-disk type of drive.

Also, AutoUnattend.xml is only detected by Windows Setup\WinPE if the file is on a Removable drive (e.g. Removable USB f;ash drive or CD\DVD).

 

If you are following the Tutorial here you may see the text

Please note: Some new USB Flash drives are not the usual 'Removable' type but appear as 'Fixed Disk' in RMPrepUSB and 'Local Disk' in Windows Explorer - these flash drives will not work using this method as they will appear to Windows as a 'hard disk'. If you have this type of USB flash drive you will also need a USB 'Removable' Flash drive as well...

as well as lots of other text about USB hard disks, etc.

 

It has been rumoured that there are two versions of this drive, one is Removable and the other type is Fixed-disk (depending on it's age).

 

You can install multiple Windows versions using WinSetupFromUSB, or you can use Easy2Boot (make an .imgPTN file from each ISO). E2B will also allow you to boot from a UEFI system and install Windows using UEFI/GPT.

 

If you need a Removable USB drive, then you will need to return it (but it isn't faulty).



#94 conan

conan

    Newbie

  • Members
  • 21 posts
  •  
    Romania

Posted 20 July 2014 - 07:14 AM

Thanks for your help! I will return the drive since I got my hands on it on 10 july, or I'll keep it for data since is twice as fast than Kingston DTHX30/64GB on medium and small files and use E2B. Even defragmentation with defraggler finishes 2 times faster than using Kingston.


Edited by conan, 20 July 2014 - 07:18 AM.


#95 conan

conan

    Newbie

  • Members
  • 21 posts
  •  
    Romania

Posted 20 July 2014 - 09:36 AM

The disk is indeed "seen" as HDD, because it appears in Performance tab from Task Manager. Those rectangles from Performance tab items became circles when I plug-in the drive.

d79356340019868.jpg c7cbe1340019869.jpg


Edited by conan, 20 July 2014 - 09:43 AM.


#96 conan

conan

    Newbie

  • Members
  • 21 posts
  •  
    Romania

Posted 30 July 2014 - 11:17 AM

Just for the record.

 

I sent a question to SanDisk support about fixed disk issue and I got the next answer:

"In mid-2013 SanDisk changed production of its USB Drives configured as fixed disk to meet a perceived certification requirement. SanDisk USB Drives with either removable or fixed disk configuration will work the same when used for data storage on Windows PC and Mac computers. SanDisk is in the process of reverting back to producing USB Drives configured as removable disk."



#97 steve6375

steve6375

    Platinum Member

  • Developer
  • 7567 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 03 January 2019 - 11:22 PM

It is possible, by using wimboot from the iPXE project, to boot directly from an unmodified Windows Install ISO using grub4dos and then cause a batch file to run which can then load the ISO as virtual drive Y: using ImDisk.

 

Below is a sample of a grub4dos menu using wimboot with a Windows 10 ISO.

title Install Windows10x64UK_Oct_2018 using wimboot method
map /Windows10x64UK_Oct_2018.iso (0xff)
map --hook
root (0xff)
# the root path now points to the files inside the ISO file
# hd0,0 is the USB drive that we booted from (index=2 can be omitted to boot default image)
kernel (hd0,0)/wimboot index=2
initrd @startup.bat=(hd0,0)/startup.bat @winpeshl.ini=(hd0,0)/winpeshl.ini @bcd=/boot/bcd @boot.sdi=/boot/boot.sdi @boot.wim=/sources/boot.wim
boot

When image 2 of the boot.wim file boots, the startup.bat and winpeshl.ini files will be 'injected' into the X:\Windows\System32 folder automatically!

 

Thus when WinPE starts, it will execute the startup.bat command that we have placed in winpeshl.ini which, in turn, will cause it to run the startup.bat file.

 

The startup.bat file should contain lines of code which will load the Windows ISO file as a virtual DVD using ImDisk so that Windows Setup can access the \sources\install.wim file (or .esd file) inside the ISO. It can then run setup.exe (with an XML file specified if required).

 

The startup.bat code will need to obtain the full path of the ISO file so that it can be loaded using ImDisk.

You can use grub4dos to write the path of the ISO to a file on the USB drive which can then be later used by startup.bat.

 

The new Beta version of Easy2Boot  (v1.A8 Beta) now uses this method.

 

This means the ISO is completely unmodified and there is no requirement for an \AutoUnattend.XML file to be on 'Removable' USB flash drive.

 

The only issue is that more RAM is required. On a normal flat-file boot, the boot.wim image may occupy say 300MB and the free RAM may be up to 512MB. However, for a wimboot boot, 300MB is wasted by the wimboot process, so when WinPE boots, it sees only 'Total RAM - 300MB' are available. This means that >1GB of RAM is required for WinPE to run reliably (depending on the size of the boot.wim loaded). The wim image must also contain \Windows\Boot\PXE\bootmgr.exe.


Edited by steve6375, 11 January 2019 - 12:41 PM.

  • wimb and devdevadev like this

#98 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 08 January 2019 - 09:55 AM

It is possible, by using wimboot from the iPXE project, to boot directly from an unmodified Windows Install ISO using grub4dos and then cause a batch file to run which can then load the ISO as virtual drive Y: using ImDisk.

 

Below is a sample of a grub4dos menu using wimboot with a Windows 10 ISO.

title Install Windows10x64UK_Oct_2018 using wimboot method
map /Windows10x64UK_Oct_2018.iso (0xff)
map --hook
root (0xff)
# the root path now points to the files inside the ISO file
# hd0,0 is the USB drive that we booted from
kernel (hd0,0)/wimboot image=2
initrd @startup.bat=(hd0,0)/startup.bat @winpeshl.ini=(hd0,0)/winpeshl.ini @bcd=/boot/bcd @boot.sdi=/boot/boot.sdi @boot.wim=/sources/boot.wim
boot

When image 2 of the boot.wim file boots, the startup.bat and winpeshl.ini files will be 'injected' into the X:\Windows\System32 folder automatically!

 

Thus when WinPE starts, it will execute the startup.bat command that we have placed in winpeshl.ini which, in turn, will cause it to run the startup.bat file.

 

The startup.bat file should contain lines of code which will load the Windows ISO file as a virtual DVD using ImDisk so that Windows Setup can access the \sources\install.wim file (or .esd file) inside the ISO. It can then run setup.exe (with an XML file specified if required).

 

The startup.bat code will need to obtain the full path of the ISO file so that it can be loaded using ImDisk.

You can use grub4dos to write the path of the ISO to a file on the USB drive which can then be later used by startup.bat.

 

The new Beta version of Easy2Boot  (v1.A8 Beta) now uses this method.

 

This means the ISO is completely unmodified and there is no requirement for an \AutoUnattend.XML file to be on 'Removable' USB flash drive.

 

The only issue is that more RAM is required. On a normal flat-file boot, the boot.wim image may occupy say 300MB and the free RAM may be up to 512MB. However, for a wimboot boot, 300MB is wasted by the wimboot process, so when WinPE boots, it sees only 'Total RAM - 300MB' are available. This means that >1GB of RAM is required for WinPE to run reliably (depending on the size of the boot.wim loaded). The wim image must also contain \Windows\Boot\PXE\bootmgr.exe.

 

Thanks for your detailed description for using wimboot in grub4dos menu for Install using Win 10 ISO file.

 

I have tried the new Beta version of Easy2Boot and dropped my Win 10 ISO in folder _ISO\WINDOWS\WIN10

After booting from USB I can do Windows Setup, but I think wimboot was not used and there is no sign of injected startup.bat or winpeshl.ini

How to use wimboot in case of Easy2Boot ? How can I use the above given sample of grub4dos menu ?

 

Then I decided to do it manually without Easy2Boot and following your detailed instructions.

This time I got wimboot working and can see that files startup.bat and winpeshl.ini that I made were indeed injected in X:\Windows\system32

Also I used grub4dos to write the path of the ISO to a file on USB so that it later could be used by startup.bat

 

So I can say the wimboot method in grub4dos is working OK, but not yet in Easy2Boot.

Also a real disadvantage is that the method is not suitable for Install of Windows 10 on GPT partition, since that is refused by Setup.

Booting with grub4dos in BIOS mode allows only to Install in MBR partitions, which is not occurring as usual case nowadays ....



#99 steve6375

steve6375

    Platinum Member

  • Developer
  • 7567 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 08 January 2019 - 10:10 AM

Hi,

 

E2B v1.A8 is still in Beta. If you have the NOHELPER variable set in MyE2B.cfg then E2B knows that you are using a Removable USB drive and so it does not use the wimboot process (because there is a RAM size limitation when using wimboot).

You need to delete the NOHELPER variable.

The easiest way to test wimboot in E2B is just to place the Windows ISO in \_ISO\MAINMENU folder.

 

Apparently wimboot does support UEFI, so you can UEFI-boot to grub2 and inject and boot in that way.

However, since the normal E2B process does not use grub2, I did not try it.

I may try it from the E2B grub2 menu system, but I am not sure how to get grub2 to write/change file contents in order to write the full path of the ISO into a file somewhere...



#100 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 08 January 2019 - 10:27 AM

Hi,

 

E2B v1.A8 is still in Beta. If you have the NOHELPER variable set in MyE2B.cfg then E2B knows that you are using a Removable USB drive and so it does not use the wimboot process (because there is a RAM size limitation when using wimboot).

You need to delete the NOHELPER variable.

The easiest way to test wimboot in E2B is just to place the Windows ISO in \_ISO\MAINMENU folder.

 

Apparently wimboot does support UEFI, so you can UEFI-boot to grub2 and inject and boot in that way.

However, since the normal E2B process does not use grub2, I did not try it.

I may try it from the E2B grub2 menu system, but I am not sure how to get grub2 to write/change file contents in order to write the full path of the ISO into a file somewhere...

 

Aha, deleting the NOHELPER variable Or putting the ISO in MAINMENU folder makes it working.

Now wimboot  with grub4dos menu is working OK in Easy2Boot for Install of Windows 10.

 

How can we edit grub4dos menu in Easy2Boot ? Or is it all automated ?

 

P.S. The need to delete NOHELPER variable was not known to me and works OK when ISO is placed in _ISO\WINDOWS\WIN10 folder.

The issue is that for wimboot easiest is to place the ISO in the _ISO\MAINMENU folder allthough there is a warning NOT FOR WINDOWS INSTALLER ISOs

 

May be in grub2 we can use save_env to write the path of the ISO to a file.






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users