Whonix Linux Installer - Development Discussion

Major Changes in git:

  • The installer got support for Debian unstable (sid).
  • Debian testing (trixie) support was fixed by installing VirtualBox from Debian unstable (sid) repository.
  • Error out when attempting to use --oracle-repo on Debian testing (trixie) / unstable (sid) because Oracle does not provide such a repository.
  • Use adduser instead of useradd on Debian.
  • Fix launch VirtualBox Manager (GUI). (Do not only start the VMs.)
  • Try to start VMs before trying to start VirtualBox Manager because if it fails, it is less confusing to avoid starting VirtualBox Manager
  • view VirtualBox dkmks make.log on Debian if installation of VirtualBox failed
  • if using --dev and if enabling Kicksecure repository, use Kicksecure developers repository instead of Kicksecure stable repository if Kicksecure repository is needed
  • No longer use mirror by default. Use direct downloads.

New installer uploaded and updated wiki to reflect the name change.

now has a logo:

bug:
user.log is empty.

vboxmanage showvminfo exit code might be unreliable to check if a VM exists. Here is an example of a VM that was deleted by deleting the VM data folder in ~/user/VirtualBox VMs/ but not removed from VirtualBox settings folder, which is different (~/. VirtualBox).

vboxmanage showvminfo 2808974a-a2be-4c66-a035-798ffc82b2ad 

Name: <inaccessible!>
UUID: 2808974a-a2be-4c66-a035-798ffc82b2ad
Config file: /home/user/VirtualBox VMs/Whonix-Custom-Workstation/Whonix-Custom-Workstation.vbox
Encryption: disabled
Access error details:
VBoxManage: error: Machine UUID {5b47f67d-b72a-4d04-8f46-b1ab012fb877} in ‘/home/user/VirtualBox VMs/Whonix-Custom-Workstation/Whonix-Custom-Workstation.vbox’ doesn’t match its UUID {2808974a-a2be-4c66-a035-798ffc82b2ad} in the registry file ‘/home/user/.config/VirtualBox/VirtualBox.xml’
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

Problem is that exit code is 0.

Why did we use sudo --non-interactive -- test -d /usr instead of sudo --validate?

sh compatibility is currently broken.

Not sure if you wish to maintain sh comparability.

./usr/bin/dist-installer-cli: 3515: Syntax error: redirection unexpected

(Line number might be incorrect due to my local development changes.)

It is caused because of this command:

exec > >(tee -a "${log_file_user}") 2> >(tee -a "${log_file_debug}" >&2) &

The command is not even run. sh complains and aborts beforehand.

To demonstrate, just running sh -n which is similar to bash -n which is a simple syntax check without executing the script.

sh -n usr/bin/dist-installer-cli 

usr/bin/dist-installer-cli: 3515: Syntax error: redirection unexpected

By commenting out that command, no more syntax check errors.

Design draft on how the upcoming dist-installer-gui should handle sudo authorization:
Kicksecure Linux Installer - Design Documentation chapter Root in Kicksecure wiki

In function check_vm_exists_virtualbox:

      ## If either one of the Guests exists, proceed.
      if test "${workstation_exists}" = "1" ||
        test "${gateway_exists}" = "1"
      then

This does not have an “else”.

What should happen if either only workstation_exists or only gateway_exists? Any potential bug there in that corner case?

Fixed in git.

Some shellcheck issues on CI.
The CI has probably a newer shellcheck version so it does not happen on Debian bookworm.

Users only know about the problems, they haven’t a vast experience with support requests besides the ones they made.

I noticed an huge decrease in support requests for install of Whonix, although the problem has shifted to installer bugs, which have also decreased over time.

1 Like

@HulaHoop Can you?

1 Like

Do you know of any alternative command that would fail besides grepping for the string ^Name: <inaccessible!>?

1 Like

Because just know I learned about this option. No technical reason.

1 Like

That is exactly what it does. If either one exists, proceed. If none exist skip.
That section is to detect machines in case of the reimport command.

If none exists, see what comes after check_vm_exists call: import_virtualbox.

1 Like

This was fixed, please take a look and test.
I could not encounter this error locally but I understood why it happened.

1 Like