even other Linux distros as long as GParted and GRUB are installed.
Install GParted and GRUB on Ubuntu with:
sudo apt-get install gparted grub-pc-bin p7zip-full ntfs-3g
For BIOS: MBR partition scheme
- Rewrite the partition table as msdos and format your USB drive as NTFS using GParted (and then "Manage flags" and add the
bootflag). - In GParted, right click the USB partition and select Information. Copy the UUID somewhere as you will need it.
- Copy all files from mounted Windows ISO or DVD to USB drive using your favorite file manager.
- Go to USB drive and if the folder named
boothas uppercase characters, make them all lowercase by renaming it. - Install GRUB on USB:
sudo grub-install --target=i386-pc --boot-directory="/<USB_mount_folder>/boot" /dev/sdX - Create a GRUB config file in the USB drive folder
boot/grubwith the namegrub.cfg.Write this into the file:echo "If you see this, you have successfully booted from USB :) <or whatever you want>" insmod ntfs insmod search_fs_uuid search --no-floppy --fs-uuid <UUID_from_step_2> --set root ntldr /bootmgr boot - Unmount the USB drive and restart your PC. Choose the USB as the first boot device in BIOS and start booting from it.
For UEFI: GPT partition scheme *
* Older Windows versions / editions may not be properly supported or not supported at all. I suggest reading the Microsoft UEFI Firmware page.
- Using GParted rewrite the partition table of the USB drive as GPT.
- Create a new primary partition and format it as FAT32.
- Copy all Windows files (from mounted ISO or DVD) to the USB drive.
- Look on USB in the
efi/bootfolder. If there's a filebootx64.efi(bootia32.efi) then you're done. The USB is bootable. Skip to step 7. - Otherwise, open
sources/install.wimwith the Archive Manager (you must have7zinstalled) and browse to./1/Windows/Boot/EFI. From here extractbootmgfw.efisomewhere, rename it tobootx64.efi(orbootia32.efifor supported 32 bits OS [?]) and put it on USB inefi/bootfolder. - If you're making a Windows 7 USB, copy the
bootfolder fromefi/microsofttoefifolder. - Don't forget to unmount (safely remove) the USB drive. Select the proper EFI loader from your BIOS.
评论
发表评论