LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   creating windows 7 bootable usb from linux (http://www.linuxquestions.org/questions/linux-software-2/creating-windows-7-bootable-usb-from-linux-762229/)

endertux 10-15-2009 06:54 PM

creating windows 7 bootable usb from linux
 
I only have linux machines in my home right now and was wondering if it is possible to create a bootable Windows 7 USB flash drive from within linux using only a .ISO file.
Is there some utility that can do that, or am I stuck without WoW until I can get to a windows machine and use that to make the disk? (^.o)

repo 10-17-2009 03:59 AM

AFAIK windows doesn't boot from USB
You can however install windows in a virtual machine in linux.

piratesmack 04-24-2010 03:25 AM

I know this is an old thread, but I was also wondering how to do this and figured it out.

Format your USB drive as NTFS (also make sure the partition is marked bootable)

Mount your Windows 7 ISO and copy the files to the USB drive

Download ms-sys

Install it
Code:

tar xvf ms-sys-2.1.5.tar.gz
cd ms-sys
make
make install #as root

Write a Windows 7 MBR to your USB drive (as root)
Code:

ms-sys -7 /dev/sdX
Replace 'X' with your USB drive letter

You now have a bootable USB Windows 7 installer

oobe 05-26-2010 09:21 AM

Thanks heaps for this i dont have any windows installs and been looking for a guide as i need to do this exactly I havent tried it yet will edit this Thanks post to confirm it works


EDIT: works well I tried FAT32 at first but it didnt work

jefro 05-26-2010 05:47 PM

All you have to do is make it active and copy the files to it. See here for exact ms page. http://technet.microsoft.com/en-us/m.../dd535816.aspx

Follow steps in page using linux commands.


Follow this.

format in fat32 if not already.
mark as active. (may have to use hp tools or syslinux to get it to be active some usb devices are real stinkers)
copy dvd to flash and reboot.

oobe 05-27-2010 01:06 AM

Jefro i saw that guide and many others as you can see its for people who already have a working windows install which of course I proudly do not.

all that guide really tells you is to format the stick and copy the files over I already knew that before researching the subject the problem was installing a reliable boot sector.

jefro 05-27-2010 04:35 PM

(may have to use hp tools or syslinux to get it to be active some usb devices are real stinkers)

soreau 05-12-2012 09:23 PM

Quote:

Originally Posted by piratesmack (Post 3946086)
I know this is an old thread, but I was also wondering how to do this and figured it out.

Format your USB drive as NTFS (also make sure the partition is marked bootable)

Mount your Windows 7 ISO and copy the files to the USB drive

Download ms-sys

Install it
Code:

tar xvf ms-sys-2.1.5.tar.gz
cd ms-sys
make
make install #as root

Write a Windows 7 MBR to your USB drive (as root)
Code:

ms-sys -7 /dev/sdX
Replace 'X' with your USB drive letter

You now have a bootable USB Windows 7 installer

I also found this to be helpful, but I could not get it working at first. The comment "mark as active." was misleading. Instead, I just set the boot flag in gparted after formatting to ntfs. Copied the files over, installed the boot loader and it boots now.

m4nu 08-18-2012 05:27 PM

Works nicely as described. The same trick can be used on regular Windows 7 installs after cloning them with partclone.ntfs.

rastoboy 09-01-2012 04:01 PM

almost
 
This worked for me, except I needed to run the ms-sys program *before* formatting the usb stick NTFS, and then copying the iso data to it.

Otherwise it seemd to wipe out the data.

jefro 09-01-2012 05:07 PM

You copied the iso as a file and not as mounted iso to get the files off of it maybe.

rastoboy 09-01-2012 06:21 PM

Nope. *shrug*. Just putting it out there in case anyone else has trouble.

I did have trouble with some files being corrupted on the USB. But presumeably that is an issue with my USB stick.

rodrigoeblanco 10-05-2013 06:10 AM

Problem with ms-sys
 
What worked for me was:
1. Formatting the USB with NTFS (marked it as bootable)
2. Copying the CD or iso to the USB
3. Used the following command
Code:

# ms-sys -n /dev/sdbx
It worked beautifully.

I had problems with:
Code:

# ms-sys -7 /dev/sdbx
It asked me to use -f to force the writing, I did used -f but it didn't boot. After I changed -7 for -n it worked perfectly, didn't need to use -f.

Thanks for the help!

frieza 10-05-2013 11:32 AM

http://www.webupd8.org/2010/10/creat...usb-drive.html
this one worked for me, using unetbootin

fpemud 12-01-2013 12:31 AM

no doc needed, one single command to do it all:

Code:

winiso2usb iso-file dev-name
winiso2usb homepage: https://github.com/fpemud/winiso2usb
gentoo ebuild:https://github.com/fpemud/fpemud-ove...min/winiso2usb


All times are GMT -5. The time now is 06:07 PM.