Whonix on Mac M1 (ARM) - Development Discussion

A post was merged into an existing topic: Whonix on Mac M1 (ARM) - User Support (still unsupported at time of writing)

Okay reporting my progress on this…

Currently, have derivative maker successfully installed and running in a docker container. I have a draft PR here

I have come to a crossroads

There is no arm64 virtualbox available for linux, only apple. So I must choose a path…

  1. Build arm64 image via x86_64 machine, export, and try to run on vbox mac (i think this is very slow for iteration)
  2. Try to convert vbox mac dmg file to linux img file, see what happens and if possible to run the CLI on arm64 linux (seems hacky, slightly unhinged, and potential waste of time lol)
  3. Abandon vbox and repurpose build script for UTM (known possible)
  4. Abandon docker and rework derivative maker to run locally on mac…this is likely a large undertaking, given the apt dependencies, systemctl services, etc.

Opinions @Patrick? There may be other clever options i am not considering

Edit: i see now there are two threads, and this should be in the development one…apologies

In the meanwhile, i am proceeding with option 3 since I am making progress

1 Like

@Patrick here are the logs from my failure building UTM image via docker with mac m chip

logs
+ grep -q done /etc/debootstrap/stages/default_locales
+ echo '   Executing stage default_locales'
   Executing stage default_locales
+ return 0
+ default_locales
+ '[' -n en_US.UTF-8 ']'
+ '[' -x /usr/sbin/update-locale ']'
+ echo 'Warning: update-locale executable not available (no locales package installed?)'
Warning: update-locale executable not available (no locales package installed?)
+ echo 'Ignoring request to run update-locale for en_US.UTF-8 therefore'
Ignoring request to run update-locale for en_US.UTF-8 therefore
+ return 0
+ stage default_locales done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage timezone
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/timezone
+ echo '   Executing stage timezone'
   Executing stage timezone
+ return 0
+ timezone
+ '[' -n UTC ']'
+ echo 'Adjusting /etc/localtime'
Adjusting /etc/localtime
+ ln -sf /usr/share/zoneinfo/UTC /etc/localtime
+ '[' -e /etc/timezone ']'
+ echo 'Setting /etc/timezone to UTC'
Setting /etc/timezone to UTC
+ printf '%s\n' UTC
+ stage timezone done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage fstab
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/fstab
+ echo '   Executing stage fstab'
   Executing stage fstab
+ return 0
+ fstab
+ grep -q UNCONFIGURED /etc/fstab
+ createfstab
+ echo 'Setting up /etc/fstab'
Setting up /etc/fstab
+ cat
++ date
+ '[' -n 26ada0c0-1165-4098-884d-aafd2220c2c6 ']'
+ local rootfs_mount_options=
+ '[' -z ext4 ']'
+ case "${FILESYSTEM}" in
+ rootfs_mount_options=,errors=remount-ro
+ echo '/dev/disk/by-uuid/26ada0c0-1165-4098-884d-aafd2220c2c6 /  auto    defaults,errors=remount-ro 0   1'
+ '[' -n '' ']'
+ cat
+ stage fstab done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage install_fs_tools
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/install_fs_tools
+ echo '   Executing stage install_fs_tools'
   Executing stage install_fs_tools
+ return 0
+ install_fs_tools
+ local pkg=
+ case "${FILESYSTEM}" in
+ '[' -n '' ']'
+ stage install_fs_tools done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage hostname
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/hostname
+ echo '   Executing stage hostname'
   Executing stage hostname
+ return 0
+ hostname
+ '[' -n localhost ']'
+ echo 'Setting hostname to localhost.'
Setting hostname to localhost.
+ echo localhost
+ '[' -r /etc/postfix/main.cf ']'
+ '[' -r /etc/mailname ']'
+ stage hostname done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage initrd
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/initrd
+ echo '   Executing stage initrd'
   Executing stage initrd
+ return 0
+ initrd
++ ls -1 /boot/vmlinuz-6.1.0-31-arm64
++ head -1
+ KERNELIMG=/boot/vmlinuz-6.1.0-31-arm64
+ '[' -z /boot/vmlinuz-6.1.0-31-arm64 ']'
+ KERNELVER=6.1.0-31-arm64
+ '[' -n yes ']'
+ echo 'Generating initrd.'
Generating initrd.
+ '[' dracut = dracut ']'
+ dracut --no-hostonly --kver 6.1.0-31-arm64 --fstab --add-fstab /etc/fstab --force --reproducible --add dmsquash-live --add overlayfs --add bash
dracut: Executing: /usr/bin/dracut --no-hostonly --kver 6.1.0-31-arm64 --fstab --add-fstab /etc/fstab --force --reproducible --add dmsquash-live --add overlayfs --add bash
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'systemd-coredump' will not be installed, because command 'coredumpctl' could not be found!
dracut: dracut module 'systemd-coredump' will not be installed, because command '/usr/lib/systemd/systemd-coredump' could not be found!
dracut: dracut module 'systemd-portabled' will not be installed, because command 'portablectl' could not be found!
dracut: dracut module 'systemd-portabled' will not be installed, because command '/usr/lib/systemd/systemd-portabled' could not be found!
dracut: dracut module 'systemd-resolved' will not be installed, because command 'resolvectl' could not be found!
dracut: dracut module 'systemd-resolved' will not be installed, because command '/usr/lib/systemd/systemd-resolved' could not be found!
dracut: dracut module 'systemd-timesyncd' will not be installed, because command '/usr/lib/systemd/systemd-timesyncd' could not be found!
dracut: dracut module 'caps' will not be installed, because command 'capsh' could not be found!
dracut: dracut module 'modsign' will not be installed, because command 'keyctl' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'i18n' will not be installed, because command 'setfont' could not be found!
dracut: dracut module 'i18n' will not be installed, because command 'loadkeys' could not be found!
dracut: dracut module 'i18n' will not be installed, because command 'kbd_mode' could not be found!
dracut: 62bluetooth: Could not find any command of '/usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd'!
dracut: dracut module 'lvmmerge' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'lvmthinpool-monitor' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'btrfs' will not be installed, because command 'btrfs' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'lvm' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'mdraid' will not be installed, because command 'mdadm' could not be found!
dracut: dracut module 'multipath' will not be installed, because command 'multipath' could not be found!
dracut: dracut module 'pcsc' will not be installed, because command 'pcscd' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'pgrep' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'pkill' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'systemd-coredump' will not be installed, because command 'coredumpctl' could not be found!
dracut: dracut module 'systemd-coredump' will not be installed, because command '/usr/lib/systemd/systemd-coredump' could not be found!
dracut: dracut module 'systemd-portabled' will not be installed, because command 'portablectl' could not be found!
dracut: dracut module 'systemd-portabled' will not be installed, because command '/usr/lib/systemd/systemd-portabled' could not be found!
dracut: dracut module 'systemd-resolved' will not be installed, because command 'resolvectl' could not be found!
dracut: dracut module 'systemd-resolved' will not be installed, because command '/usr/lib/systemd/systemd-resolved' could not be found!
dracut: dracut module 'systemd-timesyncd' will not be installed, because command '/usr/lib/systemd/systemd-timesyncd' could not be found!
dracut: dracut module 'caps' will not be installed, because command 'capsh' could not be found!
dracut: dracut module 'modsign' will not be installed, because command 'keyctl' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: 62bluetooth: Could not find any command of '/usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd'!
dracut: dracut module 'lvmmerge' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'lvmthinpool-monitor' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'btrfs' will not be installed, because command 'btrfs' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'lvm' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'mdraid' will not be installed, because command 'mdadm' could not be found!
dracut: dracut module 'pcsc' will not be installed, because command 'pcscd' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'pgrep' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'pkill' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: *** Including module: bash ***
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: crypt ***
dracut: *** Including module: dm ***
dracut: Skipping udev rule: 10-dm.rules
dracut: Skipping udev rule: 13-dm-disk.rules
dracut: Skipping udev rule: 64-device-mapper.rules
dracut: *** Including module: dmsquash-live ***
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: nvdimm ***
dracut: *** Including module: overlay-root ***
dracut: *** Including module: overlayfs ***
dracut: *** Including module: qemu ***
dracut: *** Including module: fstab-sys ***
dracut: *** Including module: lunmask ***
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: *** Including module: virtiofs ***
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: img-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: Mode:                     real
dracut: Method:                   sha256
dracut: Files:                    1370
dracut: Linked:                   1 files
dracut: Compared:                 0 xattrs
dracut: Compared:                 150 files
dracut: Saved:                    690 B
dracut: Duration:                 0.009284 seconds
dracut: *** Hardlinking files done ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/boot/initrd.img-6.1.0-31-arm64' ***
dracut: Using auto-determined compression method 'gzip'
dracut: *** Creating initramfs image file '/boot/initrd.img-6.1.0-31-arm64' done ***
+ stage initrd done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage grub_install
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/grub_install
+ echo '   Executing stage grub_install'
   Executing stage grub_install
+ return 0
+ grub_install
+ '[' -z '' ']'
+ echo 'Notice: $GRUB not defined, will not install grub inside chroot at this stage.'
Notice: $GRUB not defined, will not install grub inside chroot at this stage.
+ return 0
+ stage grub_install done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage passwords
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/passwords
+ echo '   Executing stage passwords'
   Executing stage passwords
+ return 0
+ passwords
+ '[' -n '' ']'
+ CHPASSWD_OPTION=
+ chpasswd --help
+ grep -q -- -m,
+ CHPASSWD_OPTION=-m
+ '[' -n changeme ']'
+ chpasswd -m
+ echo root:changeme
+ export ROOTPASSWORD=
+ ROOTPASSWORD=
+ stage passwords done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage custom_scripts
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/custom_scripts
+ echo '   Executing stage custom_scripts'
   Executing stage custom_scripts
+ return 0
+ custom_scripts
+ '[' -d /etc/debootstrap/chroot-scripts/ ']'
+ return 0
+ stage custom_scripts done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage upgrade_system
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/upgrade_system
+ echo '   Executing stage upgrade_system'
   Executing stage upgrade_system
+ return 0
+ upgrade_system
+ '[' no = yes ']'
+ echo 'Not running update + upgrade as $UPDATE_AND_UPGRADE is not set to '\''yes'\''.'
Not running update + upgrade as $UPDATE_AND_UPGRADE is not set to 'yes'.
+ stage upgrade_system done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage remove_apt_cache
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/remove_apt_cache
+ echo '   Executing stage remove_apt_cache'
   Executing stage remove_apt_cache
+ return 0
+ remove_apt_cache
+ '[' no = yes ']'
+ echo 'Not cleaning apt cache as $RM_APTCACHE is unset.'
Not cleaning apt cache as $RM_APTCACHE is unset.
+ stage remove_apt_cache done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage services
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/services
+ echo '   Executing stage services'
   Executing stage services
+ return 0
+ services
+ for service in ssh mdadm mdadm-raid
+ '[' -x /etc/init.d/ssh ']'
+ for service in ssh mdadm mdadm-raid
+ '[' -x /etc/init.d/mdadm ']'
+ for service in ssh mdadm mdadm-raid
+ '[' -x /etc/init.d/mdadm-raid ']'
+ stage services done
+ '[' -n done ']'
+ echo done
+ return 0
+ for i in markauto chrootmirror grmlrepos backportrepos kernelimg_conf kernel packages extrapackages reconfigure hosts default_locales timezone fstab install_fs_tools hostname initrd grub_install passwords custom_scripts upgrade_system remove_apt_cache services remove_chrootmirror
+ stage remove_chrootmirror
+ '[' -n '' ']'
+ grep -q done /etc/debootstrap/stages/remove_chrootmirror
+ echo '   Executing stage remove_chrootmirror'
   Executing stage remove_chrootmirror
+ return 0
+ remove_chrootmirror
+ '[' yes = yes ']'
+ echo 'KEEP_SRC_LIST has been enabled, skipping remove_chrootmirror stage.'
KEEP_SRC_LIST has been enabled, skipping remove_chrootmirror stage.
+ return
+ stage remove_chrootmirror done
+ '[' -n done ']'
+ echo done
+ return 0
+ finalize
+ rm -f /etc/debootstrap/variables
+ '[' -n 1 ']'
+ rm -f /usr/sbin/policy-rc.d
+ umount /sys/firmware/efi/efivars
+ true
+ umount /sys
+ umount /proc
+ echo 'Finished chroot installation, exiting.'
Finished chroot installation, exiting.
+ exit 0
+ try_umount 3 /mnt/derivative-maker-grml-debootstrap.22819/dev/pts
+ local tries=3
+ local mountpoint=/mnt/derivative-maker-grml-debootstrap.22819/dev/pts
+ mountpoint /mnt/derivative-maker-grml-debootstrap.22819/dev/pts
+ (( try=1 ))
+ (( try<=tries ))
+ [[ 1 -eq 3 ]]
+ umount /mnt/derivative-maker-grml-debootstrap.22819/dev/pts
+ return 0
+ try_umount 3 /mnt/derivative-maker-grml-debootstrap.22819/dev
+ local tries=3
+ local mountpoint=/mnt/derivative-maker-grml-debootstrap.22819/dev
+ mountpoint /mnt/derivative-maker-grml-debootstrap.22819/dev
+ (( try=1 ))
+ (( try<=tries ))
+ [[ 1 -eq 3 ]]
+ umount /mnt/derivative-maker-grml-debootstrap.22819/dev
+ return 0
+ grep -q GRML_CHROOT_SCRIPT_MARKER /mnt/derivative-maker-grml-debootstrap.22819/bin/chroot-script
+ einfo 'Removing chroot-script again'
+ einfon 'Removing chroot-script again\n'
+ '[' '' '!=' yes ']'
+ '[' einfon = ebegin ']'
+ printf ' %s*%s Removing chroot-script again\n' '' ''
 * Removing chroot-script again
+ LAST_E_CMD=einfon
+ return 0
+ return 0
+ rm -f /mnt/derivative-maker-grml-debootstrap.22819/bin/chroot-script
+ stage chrootscript done
+ '[' -n done ']'
+ echo done
+ return 0
+ rm -f /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw/chrootscript
+ for i in format_efi_partition prepare_vm mkfs tunefs mount_target mountpoint_to_blockdevice debootstrap_system preparechroot execute_pre_scripts chrootscript execute_post_scripts remove_configs umount_chroot grub_install umount_target fscktool
+ stage execute_post_scripts
+ '[' -n '' ']'
+ grep -q done /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw/execute_post_scripts
+ execute_post_scripts
+ export MNTPOINT
+ export TARGET_HOSTNAME=localhost
+ TARGET_HOSTNAME=localhost
+ '[' -d '' ']'
+ '[' no = yes ']'
+ '[' -d '' ']'
+ '[' yes = yes ']'
+ '[' -d '' ']'
+ post_scripts=/etc/debootstrap/post-scripts/
+ '[' -n /etc/debootstrap/post-scripts/ ']'
+ for script in "${post_scripts}"/*
+ '[' -x '/etc/debootstrap/post-scripts//*' ']'
+ stage execute_post_scripts done
+ '[' -n done ']'
+ echo done
+ return 0
+ rm -f /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw/execute_post_scripts
+ for i in format_efi_partition prepare_vm mkfs tunefs mount_target mountpoint_to_blockdevice debootstrap_system preparechroot execute_pre_scripts chrootscript execute_post_scripts remove_configs umount_chroot grub_install umount_target fscktool
+ stage remove_configs
+ '[' -n '' ']'
+ grep -q done /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw/remove_configs
+ remove_configs
+ '[' '' '!=' yes ']'
+ return 0
+ stage remove_configs done
+ '[' -n done ']'
+ echo done
+ return 0
+ rm -f /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw/remove_configs
+ for i in format_efi_partition prepare_vm mkfs tunefs mount_target mountpoint_to_blockdevice debootstrap_system preparechroot execute_pre_scripts chrootscript execute_post_scripts remove_configs umount_chroot grub_install umount_target fscktool
+ stage umount_chroot
+ '[' -n '' ']'
+ grep -q done /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw/umount_chroot
+ umount_chroot
+ '[' -n /etc/debootstrap/install_notes ']'
+ '[' -r /mnt/derivative-maker-grml-debootstrap.22819//etc/debootstrap/install_notes ']'
+ try_umount 3 /mnt/derivative-maker-grml-debootstrap.22819/run/udev
+ local tries=3
+ local mountpoint=/mnt/derivative-maker-grml-debootstrap.22819/run/udev
+ mountpoint /mnt/derivative-maker-grml-debootstrap.22819/run/udev
+ return 0
+ '[' -n 1 ']'
+ try_umount 3 /mnt/derivative-maker-grml-debootstrap.22819
+ local tries=3
+ local mountpoint=/mnt/derivative-maker-grml-debootstrap.22819
+ mountpoint /mnt/derivative-maker-grml-debootstrap.22819
+ (( try=1 ))
+ (( try<=tries ))
+ [[ 1 -eq 3 ]]
+ umount /mnt/derivative-maker-grml-debootstrap.22819
+ return 0
+ stage umount_chroot done
+ '[' -n done ']'
+ echo done
+ return 0
+ rm -f /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw/umount_chroot
+ for i in format_efi_partition prepare_vm mkfs tunefs mount_target mountpoint_to_blockdevice debootstrap_system preparechroot execute_pre_scripts chrootscript execute_post_scripts remove_configs umount_chroot grub_install umount_target fscktool
+ stage grub_install
+ '[' -n '' ']'
+ grep -q done /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw/grub_install
+ grub_install
+ '[' -z 1 ']'
+ '[' yes '!=' yes ']'
+ mount /dev/mapper/loop7p2 /mnt/derivative-maker-grml-debootstrap.22819
+ '[' -n /dev/mapper/loop7p1 ']'
+ mkdir -p /mnt/derivative-maker-grml-debootstrap.22819/boot/efi
+ mount /dev/mapper/loop7p1 /mnt/derivative-maker-grml-debootstrap.22819/boot/efi
+ mount -t proc none /mnt/derivative-maker-grml-debootstrap.22819/proc
+ mount -t sysfs none /mnt/derivative-maker-grml-debootstrap.22819/sys
+ mount -t devtmpfs udev /mnt/derivative-maker-grml-debootstrap.22819/dev
+ mount -t devpts devpts /mnt/derivative-maker-grml-debootstrap.22819/dev/pts
+ '[' -n /dev/mapper/loop7p1 ']'
+ einfo 'Installing Grub as bootloader into EFI.'
+ einfon 'Installing Grub as bootloader into EFI.\n'
+ '[' '' '!=' yes ']'
+ '[' einfon = ebegin ']'
+ printf ' %s*%s Installing Grub as bootloader into EFI.\n' '' ''
 * Installing Grub as bootloader into EFI.
+ LAST_E_CMD=einfon
+ return 0
+ return 0
+ clean_chroot /mnt/derivative-maker-grml-debootstrap.22819 grub-install --target=arm64-efi --efi-directory=/boot/efi --bootloader-id=debian --recheck --no-nvram --removable
+ env_vars=('LANG=C' 'LC_ALL=C' 'LANGUAGE=C' 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin')
+ local -a env_vars
+ additional_vars=('http_proxy' 'https_proxy' 'ALL_PROXY')
+ local -a additional_vars
+ for var in "${additional_vars[@]}"
+ [[ -n http://127.0.0.1:3142 ]]
+ env_vars+=("$var=${!var}")
+ for var in "${additional_vars[@]}"
+ [[ -n http://127.0.0.1:3142 ]]
+ env_vars+=("$var=${!var}")
+ for var in "${additional_vars[@]}"
+ [[ -n http://127.0.0.1:3142 ]]
+ env_vars+=("$var=${!var}")
+ for var in "$@"
+ [[ /mnt/derivative-maker-grml-debootstrap.22819 == *=* ]]
+ break
+ local chroot_dir=/mnt/derivative-maker-grml-debootstrap.22819
+ chroot_command=('grub-install' '--target=arm64-efi' '--efi-directory=/boot/efi' '--bootloader-id=debian' '--recheck' '--no-nvram' '--removable')
+ local chroot_command
+ chroot /mnt/derivative-maker-grml-debootstrap.22819 env -i LANG=C LC_ALL=C LANGUAGE=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin http_proxy=http://127.0.0.1:3142 https_proxy=http://127.0.0.1:3142 ALL_PROXY=http://127.0.0.1:3142 grub-install --target=arm64-efi --efi-directory=/boot/efi --bootloader-id=debian --recheck --no-nvram --removable
grub-install: error: /usr/lib/grub/arm64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
++ error_handler
++ last_exit_code=1
++ last_bash_command='chroot "$chroot_dir" env -i "${env_vars[@]}" "${chroot_command[@]}"'
++ echo 'Unexpected non-zero exit code 1 in /usr/sbin/grml-debootstrap /usr/sbin/grml-debootstrap /usr/sbin/grml-debootstrap /usr/sbin/grml-debootstrap at line 1713 1525 2075 0 detected!
last bash command: chroot "$chroot_dir" env -i "${env_vars[@]}" "${chroot_command[@]}"'
Unexpected non-zero exit code 1 in /usr/sbin/grml-debootstrap /usr/sbin/grml-debootstrap /usr/sbin/grml-debootstrap /usr/sbin/grml-debootstrap at line 1713 1525 2075 0 detected!
last bash command: chroot "$chroot_dir" env -i "${env_vars[@]}" "${chroot_command[@]}"
++ '[' -r /mnt/derivative-maker-grml-debootstrap.22819/debootstrap/debootstrap.log ']'
++ command -v bailout
++ bailout 1
++ eend 1
++ local retval=1
++ shift
++ '[' 1 -gt 0 ']'
++ printf ' %s-> Failed (rc=%s)%s\n' '' 1 ''
 -> Failed (rc=1)
++ return 1
++ true
++ cleanup
++ '[' -n /var/cache/grml-debootstrap/variables_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw ']'
++ einfo 'Removing /var/cache/grml-debootstrap/variables_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw'
++ einfon 'Removing /var/cache/grml-debootstrap/variables_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw\n'
++ '[' '' '!=' yes ']'
++ '[' einfon = ebegin ']'
++ printf ' %s*%s Removing /var/cache/grml-debootstrap/variables_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw\n' '' ''
 * Removing /var/cache/grml-debootstrap/variables_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw
++ LAST_E_CMD=einfon
++ return 0
++ return 0
++ rm /var/cache/grml-debootstrap/variables_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw
++ '[' -n /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw ']'
++ einfo 'Removing /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw'
++ einfon 'Removing /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw\n'
++ '[' '' '!=' yes ']'
++ '[' einfon = ebegin ']'
++ printf ' %s*%s Removing /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw\n' '' ''
 * Removing /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw
++ LAST_E_CMD=einfon
++ return 0
++ return 0
++ rmdir /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw
++ try_umount 3 /mnt/derivative-maker-grml-debootstrap.22819/boot/efi
++ local tries=3
++ local mountpoint=/mnt/derivative-maker-grml-debootstrap.22819/boot/efi
++ mountpoint /mnt/derivative-maker-grml-debootstrap.22819/boot/efi
++ (( try=1 ))
++ (( try<=tries ))
++ [[ 1 -eq 3 ]]
++ umount /mnt/derivative-maker-grml-debootstrap.22819/boot/efi
++ return 0
++ echo /mnt/derivative-maker-grml-debootstrap.22819
++ grep -q '/mnt/debootstrap\.'
++ '[' -n /mnt/derivative-maker-grml-debootstrap.22819 ']'
++ grep -q /mnt/derivative-maker-grml-debootstrap.22819 /proc/mounts
++ for service in ssh mdadm
++ '[' -x /mnt/derivative-maker-grml-debootstrap.22819/etc/init.d/ssh ']'
++ for service in ssh mdadm
++ '[' -x /mnt/derivative-maker-grml-debootstrap.22819/etc/init.d/mdadm ']'
++ '[' -x /mnt/derivative-maker-grml-debootstrap.22819/bin/umount ']'
++ clean_chroot /mnt/derivative-maker-grml-debootstrap.22819 umount -a
++ true
++ for ARG in /run/udev /sys /proc /proc /dev/pts /dev/pts /dev /dev
++ '[' -x /mnt/derivative-maker-grml-debootstrap.22819/bin/umount ']'
++ clean_chroot /mnt/derivative-maker-grml-debootstrap.22819 umount /run/udev
++ true
++ umount /mnt/derivative-maker-grml-debootstrap.22819//run/udev
++ true
++ for ARG in /run/udev /sys /proc /proc /dev/pts /dev/pts /dev /dev
++ '[' -x /mnt/derivative-maker-grml-debootstrap.22819/bin/umount ']'
++ clean_chroot /mnt/derivative-maker-grml-debootstrap.22819 umount /sys
++ umount /mnt/derivative-maker-grml-debootstrap.22819//sys
++ true
++ for ARG in /run/udev /sys /proc /proc /dev/pts /dev/pts /dev /dev
++ '[' -x /mnt/derivative-maker-grml-debootstrap.22819/bin/umount ']'
++ clean_chroot /mnt/derivative-maker-grml-debootstrap.22819 umount /proc
++ umount /mnt/derivative-maker-grml-debootstrap.22819//proc
++ true
++ for ARG in /run/udev /sys /proc /proc /dev/pts /dev/pts /dev /dev
++ '[' -x /mnt/derivative-maker-grml-debootstrap.22819/bin/umount ']'
++ clean_chroot /mnt/derivative-maker-grml-debootstrap.22819 umount /proc
++ true
++ umount /mnt/derivative-maker-grml-debootstrap.22819//proc
++ true
++ for ARG in /run/udev /sys /proc /proc /dev/pts /dev/pts /dev /dev
++ '[' -x /mnt/derivative-maker-grml-debootstrap.22819/bin/umount ']'
++ clean_chroot /mnt/derivative-maker-grml-debootstrap.22819 umount /dev/pts
++ umount /mnt/derivative-maker-grml-debootstrap.22819//dev/pts
++ true
++ for ARG in /run/udev /sys /proc /proc /dev/pts /dev/pts /dev /dev
++ '[' -x /mnt/derivative-maker-grml-debootstrap.22819/bin/umount ']'
++ clean_chroot /mnt/derivative-maker-grml-debootstrap.22819 umount /dev/pts
++ true
++ umount /mnt/derivative-maker-grml-debootstrap.22819//dev/pts
++ true
++ for ARG in /run/udev /sys /proc /proc /dev/pts /dev/pts /dev /dev
++ '[' -x /mnt/derivative-maker-grml-debootstrap.22819/bin/umount ']'
++ clean_chroot /mnt/derivative-maker-grml-debootstrap.22819 umount /dev
++ umount /mnt/derivative-maker-grml-debootstrap.22819//dev
++ true
++ for ARG in /run/udev /sys /proc /proc /dev/pts /dev/pts /dev /dev
++ '[' -x /mnt/derivative-maker-grml-debootstrap.22819/bin/umount ']'
++ clean_chroot /mnt/derivative-maker-grml-debootstrap.22819 umount /dev
++ true
++ umount /mnt/derivative-maker-grml-debootstrap.22819//dev
++ true
++ '[' -n '' ']'
++ einfo 'Unmounting /mnt/derivative-maker-grml-debootstrap.22819'
++ einfon 'Unmounting /mnt/derivative-maker-grml-debootstrap.22819\n'
++ '[' '' '!=' yes ']'
++ '[' einfon = ebegin ']'
++ printf ' %s*%s Unmounting /mnt/derivative-maker-grml-debootstrap.22819\n' '' ''
 * Unmounting /mnt/derivative-maker-grml-debootstrap.22819
++ LAST_E_CMD=einfon
++ return 0
++ return 0
++ try_umount 3 /mnt/derivative-maker-grml-debootstrap.22819
++ local tries=3
++ local mountpoint=/mnt/derivative-maker-grml-debootstrap.22819
++ mountpoint /mnt/derivative-maker-grml-debootstrap.22819
++ (( try=1 ))
++ (( try<=tries ))
++ [[ 1 -eq 3 ]]
++ umount /mnt/derivative-maker-grml-debootstrap.22819
++ return 0
++ '[' -n /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw ']'
++ echo -n 'Removing stages directory /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw: '
Removing stages directory /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw: ++ rm -rf /var/cache/grml-debootstrap/stages_Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw
++ echo done
done
++ echo /mnt/derivative-maker-grml-debootstrap.22819
++ grep -q '/mnt/debootstrap\.'
++ '[' -n /home/builder/derivative-binary/17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546/Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw ']'
++ einfo 'Removing loopback mount of file /home/builder/derivative-binary/17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546/Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw.'
++ einfon 'Removing loopback mount of file /home/builder/derivative-binary/17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546/Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw.\n'
++ '[' '' '!=' yes ']'
++ '[' einfon = ebegin ']'
++ printf ' %s*%s Removing loopback mount of file /home/builder/derivative-binary/17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546/Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw.\n' '' ''
 * Removing loopback mount of file /home/builder/derivative-binary/17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546/Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw.
++ LAST_E_CMD=einfon
++ return 0
++ return 0
++ kpartx -d /home/builder/derivative-binary/17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546/Whonix-Gateway-Xfce-17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546.arm64.raw
++ dmsetup ls
++ grep -q '^loop7p2 '
++ '[' -n 1 ']'
++ EXIT=1
++ '[' -n '' ']'
++ exit 1
++ exception_handler_general ERR
++ last_failed_exit_code=1
++ last_failed_bash_command='$SUDO_TO_ROOT --preserve-env PATH="${new_path}" $DEBOOTSTRAP_PREFIX dist_build_multiarch_package_item="$dist_build_target_arch" bash -x -e "$dist_build_grml_bin" --arch "$dist_build_target_arch" --filesystem "$dist_build_file_system" $use_vmefi_maybe --force --hostname "$dist_build_hostname" --password "changeme" --release "$dist_build_apt_stable_release" --keep_src_list --verbose --vmfile --vmsize "$VMSIZE" --packages "$grml_packages_file" --mntpoint "$dist_grml_mount_point" --target "$binary_image_raw_file"'
++ output_cmd_set
++ '[' -o xtrace ']'
++ output_cmd=true
++ true 'INFO: Middle of function exception_handler_general of ././build-steps.d/3200_create-raw-image.'
++ exception_handler_process_shared ERR
++ last_script=././build-steps.d/3200_create-raw-image
++ trap_signal_type_previous=
++ '[' '' = '' ']'
++ trap_signal_type_previous=unset
++ trap_signal_type_last=ERR
++ dist_build_error_counter=1
+++ benchmarktimeend 1740086665
++++ date +%s
+++ benchmarktimeend=1740086808
+++ benchmark_took_seconds=143
++++ convertsecs 143
++++ local h m s
++++ (( h=143/3600 ))
++++ true
++++ (( m=(143%3600)/60 ))
++++ (( s=143%60 ))
++++ printf '%02d:%02d:%02d\n' 0 2 23
+++ echo 00:02:23
++ benchmark_took_time=00:02:23
++ local first
++ read -r first _
++ process_backtrace_function
++ true 'INFO: BEGIN: process_backtrace_function'
++ '[' -o xtrace ']'
++ set +x
++ true 'INFO: END  : process_backtrace_function'
++ function_trace_function
++ true 'INFO: BEGIN: function_trace_function'
++ '[' -o xtrace ']'
++ set +x
++ true 'INFO: END  : function_trace_function'
++ output_cmd_set
++ '[' -o xtrace ']'
++ output_cmd=true
++ true '
############################################################
ERROR detected in script!: ././build-steps.d/3200_create-raw-image

#####
User Help Message 2/2:

Please READ this message carefully.

Copying/pasting/screenshotting this box alone will not be insightful, and no help can be provided with it alone as it may not contain sufficient information by itself.

In many instances, providing a longer segment above this box or the entire log may be necessary for an effective diagnosis.
#####

dist_build_version: 17.3.2.5-11-g6f534b4d435e0158b8f9ec933c2efbd814ff7546
dist_build_error_counter: 1
benchmark: 00:02:23
last_failed_exit_code: 1
trap_signal_type_previous: unset
trap_signal_type_last    : ERR

process_backtrace_result:
1: : init
2: : /bin/bash /usr/local/bin/entrypoint.sh
3: : /bin/bash /home/builder/derivative-maker/derivative-maker --flavor whonix-gateway-xfce --target utm --arch arm64 --repo false --tb open --vmsize 15g --allow-untagged true --debug
4: : /bin/bash ././build-steps.d/3200_create-raw-image --flavor whonix-gateway-xfce --target utm --arch arm64 --repo false --tb open --vmsize 15g --allow-untagged true --debug

function_trace_result:
main (line number: 264)
main (line number: 258)
create-debian-raw-image (line number: 208)
exception_handler_general (line number: 208)
exception_handler_process_shared (line number: 208)

last_failed_bash_command: $SUDO_TO_ROOT --preserve-env PATH="${new_path}" $DEBOOTSTRAP_PREFIX dist_build_multiarch_package_item="$dist_build_target_arch" bash -x -e "$dist_build_grml_bin" --arch "$dist_build_target_arch" --filesystem "$dist_build_file_system" $use_vmefi_maybe --force --hostname "$dist_build_hostname" --password "changeme" --release "$dist_build_apt_stable_release" --keep_src_list --verbose --vmfile --vmsize "$VMSIZE" --packages "$grml_packages_file" --mntpoint "$dist_grml_mount_point" --target "$binary_image_raw_file"
############################################################
'
++ unset error_reason
++ '[' ERR = INT ']'
++ '[' ERR = TERM ']'
++ '[' ERR = ERR ']'
++ '[' '!' 0 = 0 ']'
++ true 'INFO: dist_build_auto_retry set to 0 (--retry-max). No auto retry.'
++ unset dist_build_auto_retry_counter
++ true
++ ignore_error=false
++ answer=
++ '[' ERR = ERR ']'
++ '[' '' = true ']'
++ '[' -t 0 ']'
++ true 'INFO: stdin connected to terminal, using interactive error handler.'
++ true 'ERROR: An issue in ././build-steps.d/3200_create-raw-image has been detected!

#####
User Help Message 1/2:

Please READ this message carefully.

Copying/pasting/screenshotting this error message alone will not be insightful, and no help can be provided with it alone as it does not contain comprehensive information by itself. Instead, please scroll up and review the block encapsulated within ### for more detailed information.

For support queries, it is essential to, at minimum, provide the portion of the log located above this message containing the actual error details. In many instances, providing a longer segment or the entire log may be necessary for an effective diagnosis.

Regrettably, assistance cannot be provided without the aforementioned details.

Options:

Choose either option A), B), C) or D).

 - A) Press c and press enter to bypass this error and continue with the build. (For Developers Only!) (Strongly discouraged for regular users as it may lead to unstable builds! Please refrain from reporting any issues encountered subsequently!)
 - B) Press r and enter to retry.
 - C) Press s and enter to initiate a chroot interactive shell. (For Developers Only!)
 - D) Press a and enter to abort.
#####'

1 Like

Fast iteration is important. If possible and reasonable somehow, native builds should be supported.

That might be very difficult.

VirtualBox is preferable. That’s where most of my development experience and focus is.

Dunno if this is possible at all.

Possible to run a Debian chroot on Mac?

For posterity, new plan (thanks to Patrick’s help):

Build raw image (--target raw) via container. Then convert image to vbox on apple host

Just gotta get the grub script stuff sorted out

1 Like

GRUB issues should be resolved.

Updates on this…

I was able to build raw ARM64 whonix CLI images successfuly on ARM64 debian. I moved these images to an apple silicon mac

I was able to manually get vbox whonix working on apple, but it required a good bit of tweaking with virtualbox

Currently, i am working on getting derivative maker to run on mac, to reuse buildstep 4600_create_vbox_vm but it is quite unpleasant due to lots of unset variables, terminal incongruencies (mac uses bsd utils not gnu), and other stuff.

I might make a standalone script, for iteration purposes. Repurposing dm on mac is laborious

1 Like

If I want to hack on gettiing M1 working should I start at head? Last changelog bump? Last posted point version? The last ā€œstableā€ is far enough back that it does not seem useful.

I’m starting to get a sense of where M1 development is. I’m new here so I can’t DM. @Mycobee Is there a branch you’re working on? How can I help?

I wouldn’t mind getting something running on UTM so I can at least see what it looks like but if it’s possible to get it running on VirtualBox and that’s where development is goiing I’m fine with that too.

High level instructions of what I did for apple silicon build

  1. Download Debian arm64 iso netinstall from Debian
  2. Launch a debian VM on virtualbox
  3. Run derivative maker for --target raw in said VM
  4. SCP raw images from debian VM to macbook
  5. Convert raw images to ova with VBoxManage
  6. Do shenanigans to get the ova to run properly (storage settings, efi boot, vram, etc)

Im working on automating this with a script. Should be done in a week or so…

cc @LoftyGoals

1 Like

Just use the latest point release tag to build your arm64 raw images its fine

Its not a particularly complicated process, but it is a bit laborious. Certain things like sata connector in vbox are not good for arm…best bet is to use VBoxManage to show info for your arm64 debian build. Then try to apply similar settings to your derivative build

I recommend starting with kicksecure, then doing whonix after you got that dialed. Please document your findings so we can all move this along more quickly

1 Like

Am I going to end up duplicating your work or is there value to doing it in parallel?

The main VBox settings i remember be annoying to figure out

  • using the virtualized storage adapter instead of sata. Emulate what debian uses
  • getting efi boot order correct, from hard disk
  • not enough vram
  • some stuff with graphics acceleration

But im not on my laptop at the moment and might be forgetting some things. And of course with whonix the networking will be a thing

1 Like

I dont have a working build script yet to turn raw builds in to working apple silicon vbox vms

Theres value to working in parallel if you can get clear documentation of what you did manually. Theres also value if you can get the steps laid out for the whonix settings between the workstation and gateway

I dont see much value in creating a script…that would be duplication, but for me having the framework of steps would be nice…in case i miss things or am doing unnecessary things

1 Like

Running some builds to see what happens.

1 Like

Make sure to allocate enough storage. I did --size 5G on a 20gb debian cli vm…if your raw images are too big the build will crash during grml debootstrap

1 Like

Dont bother trying to get derivative maker to run in a mac shell. Its a pain. Just focus on getting the raw images from a debian build and move those raw images to the mac.

Too much bsd / gnu stuff…apt things, etc. Its annoying, a waste of time, and unnecessary since vbox is installed anyway

1 Like

Yeah… it seems generally saner to keep as much of the toolchain inside Debian as possible since that’s where most of the work is done. I feel less sure about VirtualBox vs UTM because UTM is cleaner on macOS but if VirtualBox works that’s better.