Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build: windows installer doesn't allow installing on removable media #70317

Open
Joebugg opened this issue Nov 13, 2024 · 5 comments
Open

x/build: windows installer doesn't allow installing on removable media #70317

Joebugg opened this issue Nov 13, 2024 · 5 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Milestone

Comments

@Joebugg
Copy link

Joebugg commented Nov 13, 2024

Go version

go version go1.23.3 windows/amd64

Output of go env in your module/workspace:

N/A (Not installed)

What did you do?

Downloaded Windows AMD64 installer package (MSI) on both my laptop and a VPS.
Installing on laptop to HDD or SSD works fine while hitting a snag on the virtual machine.
Tried installing it to any of the drives, including C: which is the system partition on a VirtIO instance (SCSI/SAS), and just for laughs to see if they would work, network storage slabs (also run through VirtIO).
Looked up permissions issues which it seems to not be.

What did you see happen?

Error saying it needs to be installed on a HDD, which of course a Virtio instance is not.

What did you expect to see?

It to install as if it's on a physical machine.
Is this a bogus error message from the installer, or is it actually hard coded not to work on any partition hanging off of a non-SATA (i.e. USB or network) drive? There should be an option to bypass this if it's the boot drive if it's intentional. It's a strange requirement in this age. I assume that using the ZIP version and just manually adding the paths would work fine, as a workaround. Editing the MSI file's scripts would also fix it but that's more of an intermediate level of skill to do.

@seankhliao
Copy link
Member

please show the actual error.

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 13, 2024
@Joebugg
Copy link
Author

Joebugg commented Nov 13, 2024

"Installation directory must be on a local hard drive."
To be honest the error message should be updated, but I think that's Microsoft's problem. It should be saying something like non-removable storage?

@seankhliao seankhliao changed the title Installer conflicts with VirtIO? x/build: windows installer doesn't allow installing on removable media Nov 13, 2024
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Nov 13, 2024
@gopherbot gopherbot added this to the Unreleased milestone Nov 13, 2024
@seankhliao seankhliao added OS-Windows NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed Builders x/build issues (builders, bots, dashboards) WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Nov 13, 2024
@seankhliao
Copy link
Member

looking at the common solutions on the internet, I wonder if it's valid to drop these lines in the msi config?

https://go.googlesource.com/build/+/b109b5473f1bc62f6bf632f18acb69f280f08ff4/internal/installer/windowsmsi/windowsmsi.go#529

    <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
    <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>

cc @golang/windows

@Joebugg
Copy link
Author

Joebugg commented Nov 13, 2024

Well, there had to be a reason that removable media was blocked... Yes, VirtIO and other solutions of that kind tend to skirt the line of 'removable'. The virtual drive the OS is housed on is not going to be 'removed' without 'issues'. ;) The others are easily reconfigurable and moved between machines. I guess it isn't just VirtIO but that is a special case. Is there a legit reason to stop someone from installing it to a USB drive? Wouldn't the issues that would cause be cured by just plugging it back in?

Is it possible that someone put in that restriction because of boilerplating/copying existing installer configurations? In other words "Well it's always been done that way." or "Well, everyone else was doing it."

@alexbrainman
Copy link
Member

looking at the common solutions on the internet, I wonder if it's valid to drop these lines in the msi config?

I don't know. I am not a WIX expert.

Well, there had to be a reason that removable media was blocked... Yes, VirtIO and other solutions of that kind tend to skirt the line of 'removable'. The virtual drive the OS is housed on is not going to be 'removed' without 'issues'. ;) The others are easily reconfigurable and moved between machines. I guess it isn't just VirtIO but that is a special case. Is there a legit reason to stop someone from installing it to a USB drive? Wouldn't the issues that would cause be cured by just plugging it back in?

You don't really need a Go installer. You can just copy all prebuilt Go files into a directory and add bin directory under that directory to your PATH, and everything should work.

Is it possible that someone put in that restriction because of boilerplating/copying existing installer configurations? In other words "Well it's always been done that way." or "Well, everyone else was doing it."

You can look at git history, if you are interested.

Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Projects
None yet
Development

No branches or pull requests

4 participants