Why I cannot copy install.wim from Windows 7 ISO to USB (in linux env)

9

3

I need to make a USB bootable disk of Windows 7 ISO.

My USB is formatted to NTFS, ISO is not corrupt. I can copy install.wim elsewhere but I cannot copy it to USB. I even tried rsync.

rsync error

sources/install.wim
rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32)
rsync: write failed on "/media/52E866F5450158A4/sources/install.wim": Input/output error (5)
rsync error: error in file IO (code 11) at receiver.c(322) [receiver=3.0.8]

Stat for windows.vim

  File: `X15-65732 (2)/sources/install.wim'
  Size: 2188587580  Blocks: 4274600    IO Block: 4096   regular file
Device: 801h/2049d  Inode: 671984      Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/    umur)   Gid: ( 1000/    umur)
Access: 2011-10-17 22:59:54.754619736 +0300
Modify: 2009-07-14 12:26:40.000000000 +0300
Change: 2011-10-17 22:55:47.327358410 +0300

fdisk -l

Disk /dev/sdd: 8103 MB, 8103395328 bytes
196 heads, 32 sectors/track, 2523 cylinders, total 15826944 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *          32    15826943     7913456    7  HPFS/NTFS/exFAT

hdparm -I

/dev/sdd:
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

ATA device, with non-removable media
    Model Number:       UF�F�A����U]r���U   u��tF�f�`~
    Serial Number:      �@~|
    Firmware Revision:  ����V�
    Media Serial Num:   $I�vnladip raititnot baelErrrol aoidgn
    Media Manufacturer: o eparitgns syetmiM
Standards:
    Used: unknown (minor revision code 0x0c75) 
    Supported: 12 8 6 
    Likely used: 12
Configuration:
    Logical     max current
    cylinders   17218   0
    heads       0   0
    sectors/track   128 0
    --
    Logical/Physical Sector size:           512 bytes
    device size with M = 1024*1024:           0 MBytes
    device size with M = 1000*1000:           0 MBytes 
    cache/buffer size  = unknown
Capabilities:
    IORDY(may be)(cannot be disabled)
    Queue depth: 11
    Standby timer values: spec'd by Vendor
    R/W multiple sector transfer: Max = 0   Current = ?
    Recommended acoustic management value: 254, current value: 62
    DMA: not supported
    PIO: unknown
       *    reserved 69[0]
       *    reserved 69[1]
       *    reserved 69[3]
       *    reserved 69[4]
       *    reserved 69[7]
Security: 
    Master password revision code = 60253
    not supported
    not enabled
    not locked
    not frozen
    not expired: security count
    not supported: enhanced erase
    71112min for SECURITY ERASE UNIT. 172min for ENHANCED SECURITY ERASE UNIT.
Integrity word not set (found 0xaa55, expected 0x80a5)

Umur Kontacı

Posted 2011-10-17T20:35:12.940

Reputation: 363

1Have you got another USB device to try? – Ƭᴇcʜιᴇ007 – 2011-10-17T20:44:35.503

all the others are less than 4gb. yet, i've seen that many people had experienced this problem, so it should be irrelevant from the usb device; yet hdparm results are little confusing – Umur Kontacı – 2011-10-17T20:46:41.997

According to what you've posted, the install.wim is 2.1GB (2188587580), so that should fit on a USB that's <4GB (but >2.1GB)? The hsparm info under "Model", "Media Serial" and such is pretty sketchy looking, hence why I suggest trying another USB device :) – Ƭᴇcʜιᴇ007 – 2011-10-17T20:49:45.573

all the flashdrives i have are 2 gb right now, except the one that i am using =( – Umur Kontacı – 2011-10-17T20:53:08.163

possible duplicate of Creating a Windows XP installation flash drive in linux

– Ƭᴇcʜιᴇ007 – 2011-10-17T21:11:03.817

Why bother with NTFS? Windows Setup can boot perfectly fine from FAT32. You'd have to apply the appropriate boot sector, of course. – Daniel B – 2014-02-18T11:49:17.253

Answers

6

Well, the reason for this problem is because the file is >4.0 GB in size and the USB is formatted in FAT32 format. The max file size for FAT32 is 4GB. The max file size for FAT16 is only 2GB.

So how do you fix this problem? Well there are two ways you can go about it. You can either split the file into smaller pieces and then copy it to your external hard drive or you can convert the file system to NTFS, where there is no limit on file sizes.

Bill Dinon

Posted 2011-10-17T20:35:12.940

Reputation: 61

5Too bad you can't boot off of a USB that is NTFS-formatted. :( – Kon – 2018-07-27T02:32:02.217

5

I had the same problem copying install.wim to USB flash drive (I tried several), so I changed the cluster size.

Right Click the drive, under USB, select Format, then change cluster size from 4096 (default) to 16 Kilobytes, and try to copy install.wim again.

Gretys

Posted 2011-10-17T20:35:12.940

Reputation: 51

You, sir, are a life saver! – Kon – 2018-07-27T02:31:01.387

1@gretys unfortunately this will not work since the new install.wim is > 4GB, which cannot be put into FAT32. We need to use dism tool to split the wim image. – Wang – 2019-10-27T18:35:08.677

1

This doesn't address the specifics, but when creating bootable USBs from ISOs I have never run into a manual copying process. I usually use something like unetbootn as described in Create bootable windows 7 usb drive have you tried something like this?

Dennis

Posted 2011-10-17T20:35:12.940

Reputation: 5 768

Of course I did=) I do use unetbootin for creating bootable usbs for linux, but for windows, the process is a little bit complicated. You have to copy the files and write a MBR for your windows version yourself. – Umur Kontacı – 2011-10-17T21:00:21.050

It says that unetbootin can also prepare bootable usb's for windows but in my case it failed and it throw me to the boot console. – Umur Kontacı – 2011-10-17T21:06:06.030

1

What is the error message when you try simply copying the file? Can you copy other things to the flash drive or simply touch a file on it? It's possible that one of three things is happening here:

  1. Your flash drive's filesystem is in a bad state, and you can't read/write to it. In this case, a reformat may help you out.
  2. It's possible that, because the install.wim is so large, that your filesystem can't handle the size of the file. Again, a re-format with the appropriate block size may help you out.
  3. The flash drive itself is dead. If a re-format doesn't fix the drive, you're better off finding something else.

You should be able to pick up a cheap 4GB for as little as $4 USD, so it shouldn't be the end of the world if it is indeed dead.

Vishal Kotcherlakota

Posted 2011-10-17T20:35:12.940

Reputation: 494

1

I know this thread is a bit old, but in case anybody has this issue. My ISB flash drive is 130gb and formated ntfs and boots to Win PE 4.0. I still had the Error that install.wim was too large to move over. so I simply copied the .iso over to the flash drive and used 7Zip to extract to a folder booted to WinPE dropped to D Drive and went into teh Win7x64 folder and ran setup. OS installed

SmellyKat

Posted 2011-10-17T20:35:12.940

Reputation: 11

1

Also came across this old thread and thought I'd share my answer...

Check if the USB set to fat32. If so, I think the max file size is 2gb and install.wim is around 2.57gb. Try formatting the USB to ntfs and try again. This worked for me.

Interpro

Posted 2011-10-17T20:35:12.940

Reputation: 11

1UEFI system cannot boot from NTFS, so this is not the solution. – Wang – 2019-10-27T18:35:34.400

0

I'm sorry to revive an old thread but I didn't find a good answer on here. I'd like to share how I achieved this.

From the command line:

cd /dev/iso-location
sudo apt update && sudo apt install wimtools
wimlib-imagex split install.wim ~/Documents/install.swm 2000

Then, instead of copying install.wim onto the USB, copy all of the install.swm files. For me, as mine is a little over 4GB, I had 3 of them. Make sure there is no install.wim remaining on the USB drive (only the .swm files) and voila.

The 2000 at the end of the final command above limits the output .swm files to 2000MB. You can make this smaller / larger if you want; I used 2000 because of no particular reason.

This is for Windows 10, by the way. My install.wim was located in iso/sources/install.wim so I moved the .swm files to /usb/sources/install.swm & /usb/sources/install2.swm

What we have done here is split the .wim file in to smaller .swm files, so that the FAT32 USB can hold the files and thus we can create a bootable USB at last.

Chris Evans

Posted 2011-10-17T20:35:12.940

Reputation: 101

0

You cannot copy install.wim to a FAT32 partition, because FAT32 partitions do not allow files larger than 4 GB and the install.wim file is (slightly) larger than 4 GB. You can recompress the install.wim with "wimlib-imagex" with compression level "solid" using the following command:

wimlib-imagex optimize install.wim --solid

You may have to install WimLib:

sudo apt install wimtools

On Windows the tool is called "dism" and the compression level "recovery".

Source: tqdev.com

mevdschee

Posted 2011-10-17T20:35:12.940

Reputation: 101

0

If unetbootin doesn't work, as @Dennis suggested, try YUMI (similar to unetbootin/universal USB installer). I can give it a .iso of a windows installer and a thumb drive, and it works like a charm. If it can't, it usually gives informative error messages.

Zac B

Posted 2011-10-17T20:35:12.940

Reputation: 2 653

0

I've come across that problem myself while creating a bootable USB.

  • On my first try, the copying process just stopped/froze.

  • The second try, with Total Commander - same thing 99% and that's it.

  • Third try (success), just regular copy/paste from Win7 CD/DVD -> USB and the same story, but this time I just let it be.

That third try, the time remaining started increasing but after 5 min progress bar moved again and the copying process was completed successfully.

algahaim

Posted 2011-10-17T20:35:12.940

Reputation: 11

0

I just had this problem. I copied all other files seperately and left the install.wim until last. When I did this I walked away. It took about 5-10mins but copied successfully.

SighFye

Posted 2011-10-17T20:35:12.940

Reputation: 1

0

Right Click the drive, select Format, then change cluster size from 4096 megabytes (the default) to 16 Kilobytes and filesystem to exFAT and now try to copy install.wim again.

rohit kumar

Posted 2011-10-17T20:35:12.940

Reputation: 1