The officially official Devuan Forum!

You are not logged in.

#1 Installation » Virtualize/install Devuan on Mac (part 2 to my first post) » 2023-11-08 00:17:58

systemnaut
Replies: 0

This is a part 2 post to the one I posted earlier in the Hardware and System Configuration section of the forum.

And since this is relevant to the Installation section as well, I'll quickly mention and link to my first post helping other Mac users through installing a live Devuan on an Intel Mac; for a 'full' or traditional installation of Devuan, please see the last step there (create a third partition at least 32 GB in Disk Utility for Devuan /boot and / volumes to reside, then run "Install Devuan" or do a Refracta installation as root with refractainstaller to those).

https://dev1galaxy.org/viewtopic.php?id=6121

However, this isn't just a mindless repost. The second part of this post adds in what's missing from that last guide, which is how to install  Devuan in a virtual environment on a Mac. If you aren't quite ready to install Devuan on an Intel-based Mac, or if you have an Apple Silicon Mac, this post will be useful (since on M1-M3 processors, you'll need to virtualize to run Devuan, or otherwise run Asahi Linux instead -- but for here, we'll focus on Devuan).

You'll first want to download a disc image of Devuan before getting started, ideally to Downloads (since that's what I'll be mentioning here). You'll also want to download UTM for the Mac from https://docs.getutm.app/installation/macos/ or Oracle VirtualBox from virtualbox.org. I'll cover setting up both for anyone new to it.

UTM

This is the fastest method I've used and it works well! From Applications (if you downloaded it from the App Store or got the free GitHub version and copied it there), allow the app to run for the first time if macOS happens to ask you.

Click 'Create a new virtual machine' and then 'Virtualize'. If you're on Apple Silicon, I'd suggest going with 'Emulate' for the amd64/x64 edition of Devuan. Choose Linux. Under 'Boot ISO image', attach your Devuan ISO. Give it at least 2048 MB (2 GB) and the drive on the next page at least 32 GB (I think the default is 64). It'll expand as you use it, so you won't use all the space. Both of these really depend on how much you want to allocate and how much memory and disk space you have available to share with the guest. It's up to you whether to set a shared path; I haven't done this yet in UTM so I can't say if it works right or not.

On the last page, name the VM and choose to open VM settings, then click Save. Under Display, you can choose your display scaling options, and under QEMU, you can choose to leave UEFI Boot on or not (which should be on by default).

Once you have the VM settings the way you like them like adjusting the machine type, cores, network and sound, or drive configuration (or leave them as is, it's up to you depending on your VM experience), go ahead and save your settings. Start Devuan and open the Refracta Installer (Install Devuan) to install it normally.

VirtualBox 7 (experimental on Silicon)

For VirtualBox, beware that while Intel Macs have a stable version, Apple Silicon Macs don't; you can find an arm64 beta build in the 7.x and development snapshot sections of https://www.virtualbox.org/wiki/Testbuilds. Whatever your architecture (x86_64 or arm64), open the disk image and install it. If prompted to allow the kexts to install, open System Preferences/Settings and in Security and Privacy, allow them. Restart your Mac after installation so the new extensions and services are enabled.

Open VirtualBox.app (in /Applications) and choose New in the toolbar. Then name the new virtual machine. It should auto-select Linux and Debian (64-bit) for you, but if not, that's what we'll want to choose. If it offers unattended setup, turn it off; you'll want to install Devuan with the built-in Devuan/Refracta Installer. Give the machine at least 2 GB (2048 MB) of system memory and 2 CPU cores. I'd also suggest on the next page to give Devuan 32 GB of disk space.

Your basic VM should be ready. I'll add a bonus part in here to optimize things by opening Settings from the toolbar for your virtual Devuan workstation.

- Under Display, if you have a Mac with a Retina display, set the scaling to 200% which will auto-scale and look a lot nicer than 100%. You can also set the resolution when you're in Devuan. For me, I have both macOS and Devuan set to a scaled 1920x1080 but on your Mac, it depends on what you have your display set or scaled to.
- If you're wanting to enable EFI (which I'd suggest for a modern install), under System, enable EFI (if Devuan fails to boot, which VirtualBox sometimes has done to me, you can navigate to the EFI files (\boot\efi\grub for example on FS0:) in the EFI shell, then reset the 'boot' and 'efi' flags for the ESP in parted/GParted once you've booted into Devuan).
- Under Storage, VirtualBox should've given you a SATA device controller with your new virtual hard disk and virtual optical drive for Devuan; if not, go ahead and attach a modern disk and Devuan ISO to it by using the controller + button to add a NVM.e and/or SATA controller, then attach the two disk types (NVM.e or solid state SATA disk, and optical). The reason I always go with solid state is because almost all recent Macs have SSDs or PCIe flash storage, (although tbh I have no idea if there's a performance difference between choosing SSD over hard disk modes in VirtualBox; it may just be how it appears to the guest).

Bonus: qemu on macOS

If you're like me, you also have qemu installed on macOS. I won't go through how to do that here, but from the folder/directory where you've installed qemu, you can simply run from Terminal:

./qemu-system-x86_64 -m 2G -cdrom ~/Downloads/devuan_daedalus_5.0.0_amd64_desktop-live.iso

If you're hoping to install Devuan inside QEMU, you can create a disk with:

./qemu-img create ~/devuan-hd.img 32G

Then, start Devuan with the disk attached (but beware without acceleration, it'll be slower than the other options):

./qemu-system-x86_64 -m 2G -cdrom ~/Downloads/devuan_daedalus_5.0.0_amd64_desktop-live.iso -hda ~/devuan-hd.img

Once Devuan is installed, remove the -cdrom part and boot from the disk.

Anyways, hope these 2 guides have helped the Devuan community, especially anyone with a Mac! smile

#2 Hardware & System Configuration » Do live install on Intel Mac (MacBook, Mac mini, iMac) » 2023-11-07 20:47:23

systemnaut
Replies: 0

I'll start by saying for anyone using an Apple Silicon (M1-M3) Mac, unforunately, you'll need to run Devuan inside a virtual machine; (https://getutm.app UTM is the best for this) and there's also VirtualBox builds available, or you'll need to run Asahi Linux to run it on the actual hardware.

But for those that have Macs with Intel processors in them, here's a quick way to install Devuan, and have it recognized natively by your Mac without needing anything other than macOS. When macOS prompts you, allow Terminal to have folder and volume access, or steps needing these permissions will fail.

1. First, if you haven't already (after backing up your stuff), you'll need to turn off Secure Boot if you have a T security chip in your model; you can do this from the recoveryOS in the SSU (Startup Security Utility) and allow it to boot non-Apple operating systems; if you're planning on booting from a flash drive, also choose to allow external devices. (I'd suggest this anyway in case you need to create your own unsigned macOS startup disk if something goes wrong). Just in case anyone is unfamiliar with doing this, as an extra, the command (for /Applications/Install macOS Ventura as an example would look like this):

/Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled

This example would be for a disk prepped to run the macOS installer, in this case a GUID + Mac OS Extended flash drive mounted as 'Untitled'.

2. Second, partition an available disk in Disk Utility (in /Applications/Utilities). Click Partition in the toolbar and click + to split it with about 8 GB of space (you could do like 4 GB instead, but this gives room for extra files), then when Disk Utility asks, Add Partition. 'Add Volume' will add a new containerized volume to the set, so definitely go for a partition smile Once that's done, format the new partition as FAT32. And once that's done, close Disk Utility.

3. In your Downloads folder, extract the files from the Devuan ISO. (Keka or the Unarchiver are free/open apps on the App Store, and should work for this). Then copy the contents (boot, efi, isolinux, live) to the partition made earlier.

4. Open Terminal (/Applications/Utilities), and elevate to root:

sudo -s

Type your password (which won't be visible for security) and press return. Type:

diskutil list

Or for an easier way, you could open Disk Utility and see what device your partition is in the info table (like /dev/disk0s4 for example). Once you've found it (and we'll say it's disk0s4, your Mac could have it in a different place so beware, we'd do something like:

bless --device /dev/disk0s4

If macOS can't find your device for whatever reason, check you've mounted it and typed it properly, or alternatively try blessing the Volumes folder/mount point or --setBoot manually. This method should work for making single partition FAT32 flash drives into EFI startup disks as well.

5. Restart your Mac, and right after the chime, hold down the option key to bring up the Startup Chooser. You should see your partition either as 'EFIBOOT' or 'Windows'. Use your trackpad, mouse, or arrow keys then click or press return to boot into Devuan. If you're just aiming for a live filesystem, congrats! You've now got Linux installed on the side.

Extra step: If you want a properly installed Devuan on your Mac, you can, of course, also create a third partition (I'd suggest 32 GB at least) in Disk Utility back in step 2. Once you restart into Devuan in step 5, you can create separate EFI and ext4 partitions from the space given to your third partition using GParted (or parted from the Terminal in Devuan). Then run refractainstaller as root from the Terminal as usual to be guided through installing the new system. Be careful to assign / and /boot (and grub-efi) to the right partitions if you do this, so you don't mess up macOS (unless you want to erase it and install only Devuan from an external disk).

Either way, you've got Devuan running on your Mac! Hope this is helpful to anyone else out there who are fans of the Mac and Devuan!

Board footer

Forum Software