packer build fails due to BGinfo.exe being too big for a 1.44MB floppy
Bginfo.exe (downloaded today from the site linked in README using the Download BgInfo link) is 2.9MB, twice more than 1.44MB floppy max size:
$ ls -lh floppy/bginfo/Bginfo.exe
-rwxr-xr-x@ 1 user staff 2.9M Jan 17 2018 floppy/bginfo/Bginfo.exe
I will try a workaround by commenting out anything relating to setting background and do a build then, but thought you must have run into the issue yourself and that I should report it.
Full output of running packer build (some paths redacted for privacy):
$ packer build -only=virtualbox-iso -force -on-error=ask template-output/MSEdge-Win10.json
virtualbox-iso output will be in this color.
==> virtualbox-iso: Downloading or copying Guest additions
virtualbox-iso: Downloading or copying: file:///path/to/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Downloading or copying: file:///path/to/dev.microsoftedge.com-vms/scripts/iso/15063.0.170317-1834.RS2_RELEASE_CLIENTENTERPRISEEVAL_OEMRET_X64FRE_EN-US.iso
==> virtualbox-iso: Deleting previous output directory...
==> virtualbox-iso: Creating floppy disk...
virtualbox-iso: Copying files flatly from floppy_files
virtualbox-iso: Copying file: floppy/common/setautologon.ps1
virtualbox-iso: Copying file: floppy/build.cfg
virtualbox-iso: Copying file: floppy/openssh/openssh.ps1
virtualbox-iso: Copying file: floppy/updates/win-updates.ps1
virtualbox-iso: Copying file: floppy/common/post-win-updates.ps1
virtualbox-iso: Copying file: floppy/common/finish-actions.ps1
virtualbox-iso: Copying file: floppy/updates/microsoft-updates.bat
virtualbox-iso: Copying file: floppy/common/preprovisioner.ps1
virtualbox-iso: Copying file: floppy/bginfo/Bginfo.exe
==> virtualbox-iso: Error adding file from floppy_files : floppy/bginfo/Bginfo.exe : FAT FULL
==> virtualbox-iso: Step "StepCreateFloppy" failed
==> virtualbox-iso: [c] Clean up and exit, [a] abort without cleanup, or [r] retry step (build may fail even if retry succeeds)? c
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error adding file from floppy_files : floppy/bginfo/Bginfo.exe : FAT FULL
==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error adding file from floppy_files : floppy/bginfo/Bginfo.exe : FAT FULL
==> Builds finished but no artifacts were created.
Configuration:
- packer: 1.2.5
- Build host: macOS 10.3.6
For the record, the full MSEdge-Win10.json (which I merged from template-parts by hand (and adding one line to the vagrant post-processor to test a fix for #21) to avoid building packermerge since I am on a Mac):
{
"variables": {
"iso_url": "iso/15063.0.170317-1834.RS2_RELEASE_CLIENTENTERPRISEEVAL_OEMRET_X64FRE_EN-US.iso",
"iso_checksum": "cf812813211add8fe7c53b07b7caff8c",
"iso_checksum_type": "md5",
"version": "0.1.0",
"shutdown_command": "cscript c:/windows/system32/slmgr.vbs /rearm & shutdown /s /f /d p:4:1",
"ssh_user" : "IEUser",
"ssh_pwd" : "Passw0rd!",
"update": "true"
},
"builders": [
{
"type": "hyperv-iso",
"vm_name": "MSEdge - Win10",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"ssh_username": "{{ user `ssh_user` }}",
"ssh_password": "{{ user `ssh_pwd` }}",
"ssh_timeout": "16h",
"ram_size": 2048,
"disk_size": 40960,
"switch_name": "",
"shutdown_command": "{{ user `shutdown_command`}}",
"output_directory" : "..\\vms\\output\\MSEdge-Win10-HyperV",
"floppy_files": [
"floppy/common/setautologon.ps1",
"floppy/build.cfg",
"floppy/openssh/openssh.ps1",
"floppy/updates/win-updates.ps1",
"floppy/common/post-win-updates.ps1",
"floppy/common/finish-actions.ps1",
"floppy/updates/microsoft-updates.bat",
"floppy/common/preprovisioner.ps1",
"floppy/bginfo/Bginfo.exe",
"floppy/bginfo/install.vbs",
"floppy/bginfo/background.jpg",
"floppy/homepage/browser-homepage.ps1",
"floppy/winrm/start-winrm.ps1",
"floppy/winrm/config-winrm.cmd",
"floppy/common/setautologon.ps1",
"answer_files/10/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/win10/bgconfig.bgi",
"floppy/eula/win10/eula.txt"
]
},
{
"type": "virtualbox-iso",
"vm_name": "MSEdge - Win10",
"communicator": "ssh",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"ssh_wait_timeout": "16h",
"ssh_username": "{{ user `ssh_user` }}",
"ssh_password": "{{ user `ssh_pwd` }}",
"guest_os_type": "Windows10_64",
"format" : "ova",
"guest_additions_mode" : "attach",
"output_directory" : "..\\vms\\output\\MSEdge-Win10-VirtualBox",
"headless": "{{ user `headless` }}",
"disk_size": 40960,
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"4096"
]
],
"shutdown_command": "{{ user `shutdown_command`}}",
"floppy_files": [
"floppy/common/setautologon.ps1",
"floppy/build.cfg",
"floppy/openssh/openssh.ps1",
"floppy/updates/win-updates.ps1",
"floppy/common/post-win-updates.ps1",
"floppy/common/finish-actions.ps1",
"floppy/updates/microsoft-updates.bat",
"floppy/common/preprovisioner.ps1",
"floppy/bginfo/install.vbs",
"floppy/bginfo/background.jpg",
"floppy/homepage/browser-homepage.ps1",
"floppy/winrm/start-winrm.ps1",
"floppy/winrm/config-winrm.cmd",
"floppy/common/setautologon.ps1",
"answer_files/10/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/win10/bgconfig.bgi",
"floppy/eula/win10/eula.txt"
]
},
{
"type": "vmware-iso",
"vm_name": "MSEdge - Win10",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"headless": true,
"ssh_username": "{{ user `ssh_user` }}",
"ssh_password": "{{ user `ssh_pwd` }}",
"ssh_wait_timeout": "16h",
"shutdown_command": "{{ user `shutdown_command`}}",
"guest_os_type": "windows9-64",
"boot_wait": "2m",
"tools_upload_flavor": "windows",
"output_directory" : "..\\vms\\output\\MSEdge-Win10-VMware-vmx",
"disk_size": 40960,
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"vmx_data": {
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900",
"memsize": "4096",
"numvcpus": "2",
"scsi0.virtualDev": "lsisas1068",
"virtualHW.version": "12"
},
"floppy_files": [
"floppy/common/setautologon.ps1",
"floppy/build.cfg",
"floppy/openssh/openssh.ps1",
"floppy/updates/win-updates.ps1",
"floppy/common/post-win-updates.ps1",
"floppy/common/finish-actions.ps1",
"floppy/updates/microsoft-updates.bat",
"floppy/common/preprovisioner.ps1",
"floppy/bginfo/Bginfo.exe",
"floppy/bginfo/install.vbs",
"floppy/bginfo/background.jpg",
"floppy/homepage/browser-homepage.ps1",
"floppy/winrm/start-winrm.ps1",
"floppy/winrm/config-winrm.cmd",
"floppy/common/setautologon.ps1",
"answer_files/10/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/win10/bgconfig.bgi",
"floppy/eula/win10/eula.txt"
]
},
{
"type": "parallels-iso",
"vm_name": "MSEdge - Win10",
"communicator": "ssh",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"parallels_tools_flavor": "win",
"parallels_tools_mode": "upload",
"ssh_username": "{{ user `ssh_user` }}",
"ssh_password": "{{ user `ssh_pwd` }}",
"ssh_wait_timeout": "16h",
"shutdown_command": "{{ user `shutdown_command`}}",
"output_directory" : "MSEdge-Win10-Parallels",
"guest_os_type": "win-10",
"prlctl": [
["set", "{{.Name}}", "--memsize", "2048"],
["set", "{{.Name}}", "--cpus", "2"]
],
"floppy_files": [
"floppy/common/setautologon.ps1",
"floppy/build.cfg",
"floppy/openssh/openssh.ps1",
"floppy/updates/win-updates.ps1",
"floppy/common/post-win-updates.ps1",
"floppy/common/finish-actions.ps1",
"floppy/updates/microsoft-updates.bat",
"floppy/common/preprovisioner.ps1",
"floppy/bginfo/Bginfo.exe",
"floppy/bginfo/install.vbs",
"floppy/bginfo/background.jpg",
"floppy/homepage/browser-homepage.ps1",
"floppy/winrm/start-winrm.ps1",
"floppy/winrm/config-winrm.cmd",
"floppy/common/setautologon.ps1",
"answer_files/10/autounattend.xml",
"floppy/common/preprovisioner.cmd",
"floppy/bginfo/win10/bgconfig.bgi",
"floppy/eula/win10/eula.txt"
]
}
],
"provisioners": [
{
"type": "shell",
"remote_path": "/tmp/script.bat",
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
"scripts": [
"./provisioners/vm-guest-tools.bat",
"./provisioners/compact.bat",
"./provisioners/restore-uac.bat",
"./provisioners/disable-autologon.bat"
]
}
],
"post-processors": [
{
"type": "vagrant",
"compression_level": 6,
"keep_input_artifact": true,
"vagrantfile_template": "template-parts/Vagrantfile",
"output": "..\\vms\\output\\Vagrant\\edgems.box",
"only": ["virtualbox-iso"]
}
]
}
@dusek I switched to using a cdrom and EFI for windows 10. I haven't uploaded the code yet because there are some parts that arent fully automated. Another option is to dig an older version of that file that's smaller.
@molant Thanks for the tips. In the end, I managed to work around this by removing BGinfo.exe from the floppy and commenting out copying and execution of BGinfo.exe in install.vbs.
Technically there were 2.88MB floppies in the past and as a virtual floppy the size shouldn't matter unless it is hardcoded to a certain size somewhere.