BSOD on Windows 7/10 when creating/using USB stick of FreeNAS-11.2-U6.iso
Description
Problem/Justification
Impact
SmartDraw Connector
Katalon Manual Tests (BETA)
Activity
There are reports that this was fixed my something in 11.3.
I've set up a VM with new FreeBSD 11.3 and used [this guide|https://github.com/freenas/build]
I'm close to getting clean build, but still 3 ports have build failures : node-11.14.0 gcc48-4.8.5_11 gcc9-9.2.0
For example:
[01:08:19] [01] [01:07:26] Finished www/node | node-11.14.0: Failed: build
I'm looking into how to fix these, any advice is appreciated.
@Anthony Takata (Tsaukpaetra) wrote:
You might not need to fully build the whole thing to replicate this problematic image. If our hunches are correct, the data content of the install image is probably not important: rather the partition layout information and EFI psuedo-partition/disk image being pointed at by said layout.
I was hoping to get full build working to obtain a loader and FreeNAS images, then try [this make_iso_image.sh|https://github.com/freenas/build/blob/ca87383278e702842249704a0842f5299c343abe/build/tools/make_iso_image.sh] to see if it also fixes the Windows 7 compatibility issues.
At this point, I see 3 options:
1) Wait for pull request to be applied in next FreeNAS release and then verify Win 7 compatibility (maybe this is already on the development team's radar todo??)
2) Obtain images (loader.efi and FreeNAS image) somehow ??? and use them with modified make_iso_image.sh
3) Get build to complete and use with modified make_iso_image.sh
Any suggestions?
interesting...found this:
Use makefs to make the installer EFI system partition
https://jira.ixsystems.com/browse/NAS-103232
https://github.com/freenas/build/pull/206
I'm in the process of establishing build environment and getting a clean build – once that's done, I'll apply this and see if it results in the desired compatible ISO.
I'm optimistic that this will fix it.
You might not need to fully build the whole thing to replicate this problematic image. If our hunches are correct, the data content of the install image is probably not important: rather the partition layout information and EFI psuedo-partition/disk image being pointed at by said layout.
Reading the EFI spec, it's totally cromulent for the boot partition to be FAT12, however it should be hidden in the OS entirely (by dint of having a partition type specifically for that purpose), and thus any broken-ness in the FS driver should never come into play...
Funny thing is, the "How to make an EFI-booting image ISO" page https://wiki.freebsd.org/UEFI looks mostly identical, with exception to the EFI partition being formatted as FAT32 and the extra bits of making a disk image to overlay onto the beginning of the ISO.
Thanks for looking into it. Very much appreciate courtesy verification. I agree, this problem is a pain in the butt to troubleshoot. The strange behavior of various Windows versions, seems to point to the GPT. I've worked with quite a few boot-able USBs and none have behaved like this.
I didn't mean to be offensive, sorry about that ... just pointing out there are still a large number of Windows 7 users (myself included) and it'd be good to fix this.
bsod without warning is surprising and disturbing — especially since this problem isn't mentioned at all in the installation instructions.
If I can get FreeNAS to build, I can try some things with the image creation process to see if can produce Windows compatible images.
I'm planning on following this guide:
https://github.com/freenas/build
Any advice on building FreeNAS is appreciated. I know I have to get a FreeBSD environment set up to build on.
FreeBSD produces both iso and img files. It seems plausible to do the same.
I'm trying to setup my first FreeNAS and I'm having the same problem with Windows 7 Professional and Windows 10 (on my laptop) blue screening just after completing the write of FreeNAS-11.2-U6.iso to a USB stick using Rufus. I've tried 3 sticks by 2 different manufacturers. Always same result - bsod. If a put such infected USB stick back in a running Windows 7 machine, it immediately will bsod, making it a sort of a nasty poison pill and dangerous to have around.
I use Rufus on a regular basis to create bootable USB sticks for other iso's (clonezilla, etc.) and never had any such issues.
Using windbg.exe on Windows 7 to extract info from .dmp file produced by one of the blue screens. It shows an Integer division by zero exception in Windows Partition Management Driver:
1 1: kd> !analyze -v
*******************************************************************************
*
Bugcheck Analysis *
*
*******************************************************************************
KMODE_EXCEPTION_NOT_HANDLED (1e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Arguments:
Arg1: ffffffffc0000094, The exception code that was not handled
Arg2: fffff8801c7a8e60, The address that the exception occurred at
Arg3: 0000000000000000, Parameter 0 of the exception
Arg4: 0000000000000000, Parameter 1 of the exception
Debugging Details:
------------------
EXCEPTION_CODE: (NTSTATUS) 0xc0000094 - {EXCEPTION} Integer division by zero.
<removed for brevity>
11: kd> lmvm partmgr
start end module name
fffff880`00e66000 fffff880`00e7b000 partmgr (pdb symbols) c:\symcache\partmgr.pdb\7E391DC4AAAC45C4A8D0FA49903564362\partmgr.pdb
Loaded symbol image file: partmgr.sys
Mapped memory image file: c:\symcache\partmgr.sys\4F641BC115000\partmgr.sys
Image path: \SystemRoot\System32\drivers\partmgr.sys
Image name: partmgr.sys
Timestamp: Sat Mar 17 00:06:09 2012 (4F641BC1)
CheckSum: 0001DFC8
ImageSize: 00015000
File version: 6.1.7601.17796
Product version: 6.1.7601.17796
File flags: 0 (Mask 3F)
File OS: 40004 NT Win32
File type: 3.7 Driver
File date: 00000000.00000000
Translations: 0000.04b0
CompanyName: Microsoft Corporation
ProductName: Microsoft® Windows® Operating System
InternalName: partmgr.sys
OriginalFilename: partmgr.sys
ProductVersion: 6.1.7601.17796
FileVersion: 6.1.7601.17796 (win7sp1_gdr.120316-1742)
FileDescription: Partition Management Driver
LegalCopyright: © Microsoft Corporation. All rights reserved.
Full dump analysis is attached.
While the Windows driver should not bsod under any circumstance (technically it's a Microsoft driver unhandled exception), however it would be great if FreeNAS iso images could be compatible and not do this. It seems unreasonable to require that FreeNAS users can't / shouldn't / won't use Windows 7 / 10.
However, a USB stick can be created with the old FreeNAS-11.1-U7.iso using Rufus without bsod and also boots the installation app just fine.
I figured that sometime ago the .iso builds changed somewhere – so I downloaded all .iso files for FreeNAS 11.1.U7 through 11.2-U6 and copied them to a linux machine and used fdisk to view partions and discovered the partition format indeed changed after 11.1-U7.
[root@sysresccd /mnt]# fdisk -l FreeNAS-11.1-U7.iso
Disk FreeNAS-11.1-U7.iso: 546.8 MiB, 573380608 bytes, 1119884 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
Disklabel type: gpt
Disk identifier: 6A228FBC-98B8-40DF-84EE-60D9AFD8D0AC
Device Start End Sectors Size Type
FreeNAS-11.1-U7.iso1 64 315 252 126K Microsoft basic data
FreeNAS-11.1-U7.iso2 316 6075 5760 2.8M EFI System
FreeNAS-11.1-U7.iso3 6076 1119819 1113744 543.8M Microsoft basic data
versus FreeNAS-11.2-RELEASE-U1 (note also the GPT table is corrupt warning appears):
[root@sysresccd /mnt]# fdisk -l FreeNAS-11.2-RELEASE-U1.iso
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
Disk FreeNAS-11.2-RELEASE-U1.iso: 575.5 MiB, 603412480 bytes, 1178540 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
Disklabel type: gpt
Disk identifier: CEA87E34-04A8-11E9-A590-0025905AD1AE
Device Start End Sectors Size Type
FreeNAS-11.2-RELEASE-U1.iso1 80 1679 1600 800K EFI System
FreeNAS-11.2-RELEASE-U1.iso2 3 31 29 14.5K FreeBSD boot
All versions subsequently have same partition format (fdisk-log.txt attached). I can do some further testing to verify all versions after 11.1-U7 cause bsod. It's rather time consuming, and it bricks the USB stick, requiring some work with dd and fdisk to clear and repartition and restore stick back to being usable again.
This link on freebsd forum of similar issue and possible remedy.
Blue Screen Of Death when insert FreeBSD usb stick
Can the .iso images for FreeNAS be created in the old format that is compatible with Windows 7/10 ? or is there another way to solve this?