2

I'm using Linux (Ubuntu Zasty 17.04).

The 10+ "solutions" I found on various places don't work.

What I've done:

  • Create and MBR partition table on the USB drive
  • Create a single, active partiton across the whole drive
  • Set type to 0xb "W95 FAT32"
  • Format the partition "mkfs.vfat /dev/sdb1"
  • Mount the installer iso and USB drive, copy all files, umount.

What works: - Booting with EFI works perfectly

What does not: - Booting with BIOS.

Obviously. No MBR was set up at this point so BIOS does not know how to boot.

Tried:

  • Installing MBR with LILO (How the MBR code should know what to boot anyway?)
  • Tried installing syslinux MBR (kinda the same)
  • Booting the iso with "kvm -m 2048 -cdrom [path to iso] -hda /dev/sdb" and:

  • ...trying to fix the boot record automatically on the USB drive

  • trying to fix it manually with bootrec.exe
  • (Found out bootrec /ScanOs can't even see bootable windows systems)
  • manually creating a new BCD, adding bootmgr and osloader

Could not figure out what root and path to use so this is obviously wrong, but I hope it can be fixed somehow.

At this point the windows bootloader starts just fine, but it - of course - can't start the system, because there isn't a \Windows directory on the drive, so the default path and root does not work.

So the question is:

  • Can the windows boot loader be made to start the windows installer this way?
  • If not, how can I make this drive bootable with BIOS?

Thank you for the answers in advance.

3 Answers 3

2

@netom,

What you have done so far (formatting, partitioning, copying) is OK.

What you need:

Windows MBR(Master boot record) and Windows PBR (partition boot record).

Windows boot sequence:

BIOS loads MBR, MBR loads PBR of active, PBR loads Windows boot manager from active (file \bootmgr) and so on.

Distributions BCD's(for UEFI and BIOS) have already default boot entries which are "universal" (e.g. they expect all necessary boot executables to be on "boot device" in standard folders/directories).

You need a Linux tool to write Windows 7/8/10 boot sectors.

https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader

see also Fix Windows boot - last paragraph - Manual Windows boot repair.

4
  • Thank you, it sound promising, I'll try to do this soon.
    – netom
    Commented Jun 1, 2017 at 8:49
  • BANG! It works. :) The only information missing from your answer is that I'm trying to boot Windows PE (preinstallation environment) and what I need is to set up the BCD to create a ramdisk and boot from that. This article was helpful too: technet.microsoft.com/en-us/library/cc721886(v=ws.10).aspx If you could edit your answer to include the information in the first sentece then I could totally accept it. Thank you!
    – netom
    Commented Jun 1, 2017 at 9:56
  • 1
    You can write a complete answer with your findings and accept it! You have done much work and know exactly what is needed for a complete solution. Your experience can help other people solve similar problems quickly then.
    – snayob
    Commented Jun 1, 2017 at 10:16
  • Sir, you are a true gentleman. :) Thank you again for your help.
    – netom
    Commented Jun 4, 2017 at 5:22
1

I have found a tool called Rufus(Official Site). It is used to make bootable USB drive for Windows installer.
I'll update this answer later after I try it on my virtual machine.
EDIT: I failed to create a bootable ISO with Rufus. I don't know if Rufus is unable to do so, or if the virtual machine prevents bootable USB disk from booting. I don't know why you need a BIOS bootable USB drive as EFI is bootable.
EDIT: I don't know if you know some Chinese, but there are a lot of bootable USB tools in China. The most famous ones are Dabaicai (big Chinese cabbage), Laomaotao (old furry peach), and so on. They have no English versions yet, but they can really create bootable USB drives capable of booting from both BIOS and EFI.
I have also noticed there are boot CDs like Hiren's BootCD. It's an English PE system. It can be burnt into a USB drive. Maybe you can boot from PE systems first, then run Windows 10 installer from it. At least most Chinese install OS in this way.

5
  • Answering the edit: I can confirm that Rufus can create an EFI exclusive-or BIOS bootable drive, but not both. Thank you for trying Aurus.
    – netom
    Commented Jun 1, 2017 at 8:49
  • Don't forget to upvote or (hopefully) accept my answer. Thank you. Hope you have a better answer elsewhere. Commented Jun 1, 2017 at 8:53
  • Hello Aurus, your answer deserves an upvote that's sure, Rufus is a popular tool and I clearly missed trying it. But at the end it didn't work for me, as I needed to create an USB stick with BOTH EFI AND BIOS boot capabilities. Rufus can wery vell do either of these, but not both with a single stick. Thank you for your reply and time, and have my upvote. :)
    – netom
    Commented Jun 4, 2017 at 5:25
  • I've edited my answer again. Perhaps this can help you. @netom Commented Jun 9, 2017 at 2:21
  • Rufus author here. If you use Alt-E, Rufus will happily create a dual BIOS+UEFI bootable drive. As to the reason why this is not enabled by default, but instead has to be activated with a cheat mode, please see this FAQ entry.
    – Akeo
    Commented Nov 12, 2018 at 21:41
1

Another site stated that the FAT partition should be type 0xc rather than 0xb. And Rufus has a hidden-and-not-enabled-by-default feature of creating BOTH UEFI+BIOS bootable usb by pressing Alt-E.

However, the method used by Rufus can also be done manually.

  1. Create two partitions on the USB drive, in which:
    • First partition: NTFS
    • Second/last partition: FAT32
  2. Copy *.efi boot files for UEFI to the FAT32 partition (Explanation: UEFI firmware doesn't need a MBR, but will scan the drive for a FAT32 partition that contains *.efi files)
  3. Install boot files for BIOS and copy all content of the installation media disc to the NTFS partition (Explanation: BIOS will read the MBR on first sector of the drive which in turn will run the boot loader on 1st active partition which is the NTFS partition).
  4. The important secret here is to copy the boot folder and efi folder from media disc to both partitions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .