Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Fails to unmount after partitioning #44

Closed
akemper opened this issue Mar 25, 2019 · 5 comments
Closed

Fails to unmount after partitioning #44

akemper opened this issue Mar 25, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@akemper
Copy link

akemper commented Mar 25, 2019

I'm running Windows 10 with latest Cygwin and Virtualbox 6. Executing the script there is an error pretty early after partitioning, which lets the installation fail completely. Should I give it a trial with VB 5.2 or anything else to keep in mind?
unmount_fails

@myspaghetti
Copy link
Owner

Strange, ${disks[0]} and ${disks[1]} (the largest and second-largest disks) should not be mounted, they should be partition-less VDIs. Failure to partition them could happen if for some reason BaseSystem.vdi reported having a larger capacity than Install.vdi, causing the script to try to partition the active BaseSystem.vdi instead.

I could not reproduce the issue with VirtualBox 6.0.4 r128413 on Windows 10.

@akemper If you could boot into the faulty virtual machine (VBoxManage startvm Mojave) and run diskutil list | grep[012]$ in the terminal that should shed some light on the issue.

On newly-generated VDIs this should be the output the following, with the order and sizes of disk0, disk1, and disk2 possibly shuffled:

-bash-3.2# diskutil list | grep disk[012]$
   0:                                                   *8.4 GB     disk0
   0:      GUID_partition_scheme                        *2.1 GB     disk1
   0:                                                   *23.1 GB    disk2

In your case the 23.1 GB disk should be partitioned, and the second largest disk (8.4 GB) should still be blank.

@myspaghetti myspaghetti self-assigned this Mar 26, 2019
@wilber82
Copy link

What if you change "Install ${vmname}.vdi" to "Install_${vmname}.vdi"?
I faced similar issue. It fixed after change this.
But I still see other problem.
Windows 10 + vbox6.04 r128413

@akemper
Copy link
Author

akemper commented Mar 27, 2019

Removing the white space in the mentioned expression in lines #217 and #229 fixed this for me, while replacing it with "_" should have the same effect. The root cause was just command execution from VBoxMange failing, even though the argument was already quoted. What else is not working in your setup?

Meanwhile, I gave it a second iteration using WSL instead of Cygwin, which turned out to be the quicker / easier solution. In addition, there I just needed to change "cmd" to "cmd.exe" in #106, otherwise the command could not be executed.

@wilber82
Copy link

There are 3 or 4 places you need to remove the space.

My other issue was macOS throws error when validate source and target. It says 'invalid argument' on source. I ignored it but VM booted into EFUI screen after script shutdown VM.

@myspaghetti myspaghetti added the bug Something isn't working label Mar 29, 2019
@myspaghetti
Copy link
Owner

In order not to get into what Bash configuration makes VBoxManage not respect quoted variables, I'll just not use whitespace in the default variables.

@wilber82 the download fails because Apple released macOS 10.14.4 and the old URL doesn't point to anything. This will be solved by implementing enhancement #33

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants