wimapply with raw disk file (file.img)

Comments, questions, bug reports, etc.
Post Reply
AnErrupTion
Posts: 2
Joined: Wed May 04, 2022 7:08 pm

wimapply with raw disk file (file.img)

Post by AnErrupTion »

It would be nice if I could use wimapply directly on a raw disk image, instead of mounting it (which is actually a pain).

For example:

Code: Select all

wimapply install.wim 1 file.img
Right now, it's displaying this error:

Code: Select all

[ERROR] Failed to mount "file.img" with NTFS-3G: Invalid argument
ERROR: Exiting with error code 46:
       NTFS-3G encountered an error (check errno).
ERROR: errno: Invalid argument
The raw disk image has already been partitioned and formatted with NTFS:

Code: Select all

parted file.img mklabel msdos
parted file.img mkpart primary ntfs 2048s 100%
synchronicity
Site Admin
Posts: 363
Joined: Sun Aug 02, 2015 10:31 pm

Re: wimapply with raw disk file (file.img)

Post by synchronicity »

The NTFS-3G image application mode actually works *only* on raw partitions, not on mounted filesystems. The commands you gave only partitioned the disk, and didn't create an NTFS filesystem on it. Are you sure that you created an NTFS filesystem on it? That would require using the mkntfs program from ntfsprogs.
AnErrupTion
Posts: 2
Joined: Wed May 04, 2022 7:08 pm

Re: wimapply with raw disk file (file.img)

Post by AnErrupTion »

Yes, I know it created the file system because GRUB successfully installed on the raw disk image.
chungy
Posts: 28
Joined: Mon Feb 15, 2016 3:40 am

Re: wimapply with raw disk file (file.img)

Post by chungy »

You might want to use

Code: Select all

losetup -fP file.img
so that wimcapture can actually capture the partition itself rather than the whole disk (which includes the partition label)
Post Reply