Installing Yunohost on an old Intel Mac Pro (tower computer from ~2008~2010)

I spent my Christmas vacation working on a project. A friend donated their old Intel Mac Pro (the big sturdy ones from around 2008-2010?) and I want to use it to run a Yunohost server at home. I already have a Yunohost server on a Raspberry Pi so I thought this would be easy. I was wrong! But many hours later, I got it working. So I want to report back on how I did it. I also have some questions for y’all.

Following all this, I intend to help improve the yunohost documentation based on my experience.

My YunoHost server

  • Hardware: Old Intel Mac Pro tower (from 2008-2010?), at home
  • YunoHost version: x.x.x (latest at the time of writing)

Overview

A summary of what the steps are:

  1. Attempting to install Yunohost (which will probably fail)
  2. Installing Debian 11
  3. Installing Refind to be able to boot Debian
  4. Installing Yunohost on top of Debian 11

Before you start

You’ll need:

  • A Mac Pro with an Intel CPU
  • Good knowledge of Linux. This isn’t a beginner project. Apple makes it difficult, but not impossible, to run Linux and Yunohost.
  • An empty drive to install Yunohost on. (It’ll be easier and less error prone if you format it before you start installing Yunohost)
    • If you have other drives with other OS (ex: Mac OS), I recommend unplugging them during the install. This will reduce the risk of mistakes. Of course, if you really know what your doing or if you want to use an existing EFI boot partition then you can keep 'em plugged.
  • A wired keyboard
  • A wired internet connection will make your life easier
  • Another computer or device to read these instructions and search online in case of problem.

Known limitations

Why it’s a bad idea to use a Mac Pro as a server:

  • As far as I know, Mac Pro running Linux cannot automatically power on after a power failure. That feature only work if you boot MacOS.
  • I’ve been told that Mac Pros consume a lot of electricity. You might want to verify that before leaving one running 24/7 (unless you live in a cold country where you can use it as a heater!:sweat_smile:)

Choosing which image to download

Choose the 64bit image. As far as I know, there are no Mac Pro running 32 bits processors.

Booting the image

I couldn’t get the image to boot after flashing it to a USB stick using Etcher. So I used Ventoy. Ventoy is a nice tool that makes it really easy to put multiple linux images on a USB stick. When the computer refuses to boot from an image on a usb stick, Ventoy will usually be able to boot it anyway!

  1. Install Ventoy on the USB stick. This will create 2 partitions on the stick.
  2. Copy the Yunohost image file on the big partition using your file explorer/Finder (don’t use Balena Etcher for this!)
  3. Reboot, holding the Alt key on your keyboard until you see the boot menu (use a wired keyboard). Select the Ventoy usb stick to boot it.
  4. In Ventoy, select the Yunohost image
  5. Select GRUB2 launch option (the default didn’t work for me). If that doesn’t work, try the other ones?

Installing Yunohost / Boot partition (part 1)

At this point, if you manage to launch the Yunohost installer, install it and boot Yunohost successfully, you can end here.

Unfortunately for me, the install failed when creating the EFI Boot Partition. To troubleshoot, I tried to install other distributions of Linux. Only Ubuntu could install. (Fedora, Pop OS, Debian all failed when trying to install the Boot Partition.) The logs showed a lot of “EFI variables are not supported on this system.”
From what I could understand, this is because the Mac Pro doesn’t expose its EFI variables (or doesn’t use them?), so GRUB fails to install. There’s a way to install GRUB using the --removable flag (grub-install --removable) but it didn’t work for me. (You can try it and report back here about your attemps.)

My solution so far was to install Debian 11 and use the option to wipe the whole disk. This of course deleted MacOS and all data on the disk, so be careful if you don’t want that.

Installing Debian

I used the Debian 11 net-install, 64bits. There is a “Mac” version but it didn’t boot for me so I used the regular one. Do not install Debian 12, because Yunohost doesn’t support it at the time of writing.

Again, I had to use Ventoy to put it on the USB stick and be able to boot. Just copy the file using your file manager / Finder (not Balena Etcher). In Ventoy, select Debian and then select the “GRUB2” launch option.

Debian installer will ask for a hostname and a domain name. I used “debian” and “debian.local”. It’s not important since the Yunohost Installer will replace those.

Debian will ask for a root password. Make sure you pick a really long and complex one and save it to your password manager of choice (Bitwarden, Firefox, etc…) or write it somewhere safe. Remember that this is a server that will be available on the internet, making it vulnerable to possible attacks so you should be extra safe here!

The installer will also ask for a user account and another password. Important: name it something that won’t be used by your Yunohost server. I used debian and another long complex password.

The installer might complain about “legacy BIOS compatibility mode”. I selected Yes to force UEFI installation, because all Macs with Intel CPU are known to use UEFI.

When the install asks about where to install and how to create disk partitions, select the option to use the whole disk.

  • As I wrote earlier, you should have formatted the whole disk before starting the install. If you didn’t, do this now. It’ll avoid problems. (Unless you know what you’re doing and you want to use an existing EFI partition)
  • Don’t separate the /home, /var or /tmp partitions. Use the option to “keep all files in one partition”.
  • Make sure the EFI partition is formatted as FAT (or vfat). In my case it was the default.
  • Don’t encrypt any partitions, as recommended by YNH)

The installer will ask about mirrors. I used the default options.

The installer will ask about which desktop environment you want. You should not install a desktop environment on a server so unselect them all. Keep only “standard system utilities”.

The Debian installer will complain that it couldn’t install GRUB. We’ll fix that later with Refind so select Continue without bootloader, then Finish installation.
It might complain again about the missing GRUB bootloader. If it does, just select Abort installation. We’ll fix it in the next step.

Installing rEFInd

If Debian installed successfully without complaining about GRUB or the bootloader, and you can launch it properly, you can skip this step.

At this point, Debian is installed, but cannot boot because GRUB fails to install, again because it can’t access EFI variables. There’s a way to install it anyway, using a live-usb stick and the grub-install --removable command, if you really want to, but in my experience, GRUB is buggy on a Mac Pro: the screen stays black when GRUB runs, so you can’t see what you’re selecting. So instead, I installed “rEFInd”.

Refind is a EFI boot manager similar to GRUB or the default Apple one (that appear when you boot your Mac holding the Alt key).

To install Refind:

  1. Boot the Mac Pro using either an existing macOS partition or a Linux live-USB stick (I used Ubuntu)
  2. The live-usb will ask if you want to install Ubuntu. Decline using the “try Linux” option.
  3. Open Firefox, go to the Refind website
  4. Download the binary zip file (Don’t use the debian/deb/rpm packages because they try to automate installing and that won’t work.)
  5. Extract the zip
  6. Open a terminal, and unmount ventoy: umount /boot/efi (it might be already unmounted)
  7. Mount your EFI partition sudo mount /dev/sdXY /boot/efi (replace X and Y with the letter and number of your actual partition. You can use the Disks app to get this information. In my case it was “sda1” so my command was sudo mount /dev/sda1 /boot/efi. Be careful about this!)
  8. Navigate to the refind-1.2.3 folder and run sudo ./refind-install --usedefault /dev/sdXY again, replacing X and Y with the ones of your actual partition
  9. If you don’t see any big “Alert!” you should be good. If not:
    1. It might complain about missing “sgdisk”. Install it by entering sudo apt install gdisk then try installing refind again.
    2. The installer might suggest to copy/rename a file into another directory. Try that maybe?
    3. If you see some alerts about EFI variables, go read the Refind documentation about --usedefault and try those?
    4. If it looks like the installer cannot find your EFI partition and tries to install into your Ventoy USB key, it’s probably because your EFI partition isn’t formatted as FAT/VFAT. Reinstall Debian following my instructions above.
  10. Reboot your Mac (unplug your USB stick with the installer first :wink:)

At this point, you should see Refind when you reboot your computer, and you should see Debian in the list of options. Select it using the keyboard and press Enter.

Installing Yunohost (finally!!)

Finally, Debian is running! You should see a login prompt.

Login using root and the root/admin password you created earlier. Don’t use the user account, as recommended in the Yunohost documentation.

At this point, you can refer to the official Yunohost instructions: Installer YunoHost | Yunohost Documentation

  • type: curl https://install.yunohost.org | bash
  • It will proceed to installing Yunohost. If it works, you can now continue using the regular YNH installation instructions.
  • It might ask about overwriting some configuration files. I selected Yes.
  • If you see an error about missing command curl, the official YNH instructions has more guidance for you.

That’s it! Congratulation!

Possible future improvement of this guide

  • There’s probably a way to install Refind without using a Ubuntu live-usb stick, either before installing Debian or during the install using a shell, but I didn’t try it yet.
  • How to make refind boot faster (change the default 20 sec wait period)
  • How to make the Mac reboot after a power failure
  • A note about power consumption
  • Using btrfs with rEFInd is tricky but possible

Questions for you all:

  1. What’s the recommended format for the Yunohost partition? I used ext4. Would it be easier/better to use btrfs instead?
  2. If Yunohost is installed on an SSD, which mount options are recommended? noatime and nodiratime? Anything else?
  3. Which options should we use when installing Debian?
    1. Should we be careful not to use a username that will later be a yunohost account? For example, if I use “narf”, will I be able to have a “narf” account on Yunohost?
    2. It asks for a root password. Will this be the same as the admin account password?
    3. Which Desktop Environment should I choose?
  4. If I installed a DE, should I get rid of it after installing YNH? How would I do that?
7 Likes

I updated the guide to simplify/remove some of the steps that weren’t necessary.

Is there a good place to archive guides like these? I’m afraid of what will happen when the forum topic will lock in a month…

Support threads are locked after a month, not Discussions or Tutorials. Even though you have some remaining questions, I moved to Tutorials. Thank you for the write-up! :green_heart:

2 Likes

Thanks for the tutorial !
I had (still have) the same Mac Pro and loved it !
However, using it as a server, I’m not very convinced - are you aware of how much wattages these beasts with dual old Xeons are sucking ? It’s around 600W idle and can go to 850W very easily… Be careful for your electricity bill !

1 Like

Damn! I should have verified that first! If your numbers are correct, that would be 435kWh per month. Even here in Quebec, where electricity is cheap and somewhat “green”, it would still cost me 50$/month. :scream:
Though, according to Apple, the consumption is lower than what you’re saying: Mac Pro power consumption and thermal output (BTU/h) information - Apple Support around 150kWh. I guess I would need to borrow a gizmo to measure the actual consumption…

I still see the warning that this thread will be locked in a month. Maybe because I was originally in the Support section?

Fixed :slight_smile:

1 Like

Hi narF,

You must have a special sense of self-flagellation to choose this as a project over the holidays! :rofl:

The Mac Pro’s all run Xeon (and, as such, 64 bit), but the earliest models (Mac Pro 1,1 ; also ‘2006’, and the identical 2,1; also ‘2007’) boot a 64-bit OS from a 32-bit EFI.

As of the 3,1 (‘Early 2008’) model, the bittiness of EFI and OS are synced.

The 2006, 2007 and 2008 models use DDR2 FB-DIMMs; modules greater than 2 GB are quite hard to find.

From 2009 almost all Mac Pro’s use DDR3, where the options for upgrading RAM are much better.

An easy way to distinguish the DDR2 models from the DDR3 models, is looking at the Firewire ports in front: if it has two differently shaped ports (400 and 800), while the 2009-and-later similar looking models have two identical Firewire-800 ports.

Anyone starting to get interested in looking for the still nice (qutie powerfull, often offered at a low price) machines, make sure to have it display a boot prompt. Part of …

is that the machines are extremely picky as far as graphics cards are concerned. Chances are good that you won’t be able to see the Apple-equivalent of a POST-screen, GRUB, Linux booting, and your installation screens, until X starts (if the graphics card is moderately compatible, else you won’t even have a display later on).

Don’t ask me how I got to know all these useless facts :stuck_out_tongue:

Indeed! I contemplated installing Home Assistant and selling mine as “Smart heating”, but it has not yet been cold enough this winter.

1 Like

Well now I really want to know!

I saw online some people are updating the firmware of the macpro from 4,1 to 5,1. Do you happen to know if that would be useful for my project? Would it make it easier to boot linux? I couldn’t find much info about it.

Well… yes. :sweat_smile: But I now learned a lot about boot partitions, bootloader, the vocabulary, etc! So that’s fun!

1 Like

We’re still in the tutorials section, this is more for off-topic ramblings as I am not so good at summaries :wink:

I found an few somewhat old IBM xServers with ‘lots’ of RAM that I thought might replace my desktop/NAS (from 2010). My desktop was fine for almost anything, only the limit of 16 GB RAM gave problems at times.

The IBM’s were really loud though, and heated the room fast enough that I did not dare to measure power consumtion let alone start installing software on it. So they sat in a corner of my room, much to the chagrin of my wife.

I looked for alternative motherboards that would accept all that DDR2 RAM in those servers, and after first buying a random Supermicro board with DDR2, found out that a thing such as FB-DIMM exists. It turned that the first generations of Mac Pro used the same FB-DIMMS, and a while later I was able to add a Mac Pro 1,1 and a 3,1 to the collection of dust-catchers.

Over the course of a few weekends I tried to get them running. I had best hopes for the 3,1 ‘early 2008’ model. A few complicating factors up front:

  • the set came with one MacOS disk without credentials that the seller had procured from a Mac laptop
  • that OS was compatible with the 2008 machine, but would not boot the 2006 machine
  • the 2006 machine had a graphics card that would show “pre-boot” graphics (but the machine would not boot the too-new MacOS)
  • the 2008 machine had a graphics card that did not show pre-boot graphics; graphics would only appear after the OS had booted
  • lacking credentials, the automatic login worked, but after that nothing.
  • the graphics card from the one was not compatible with the other, and vice-versa

Having no interest at all in getting anything to do with an Apple ecosystem, I was not too depressed about the OS being incompatible with one and lacking credentials in general, were it not that most tutorials for installing Linux presume some way of accessing the system. Not having any visual feedback during installation (and unfamiliarity with what would have been visible) was really a showblocker for the 2008 model.

To my surprise it was relatively straight forward to get Debian running on the 2006 model. It was nice to be able to extend RAM to 32 GB, but the machine ran louder and a lot warmer than my desktop.

In the mean time, and just that period and against my will, I was quite an expert at the various Mac Pro configurations, their properties and expansion options. I have since successfully suppressed most of that :wink:

What I can vaguely (as such, not very good for a tutorial section) remember though, is that 4,1 and 5,1 models are the same model; they accept the same CPU’s and the same RAM. The firmware is only a lock for Apple to prevent owners of 4,1 to upgrade their MacOS to the versions that 5,1 accepts, so that they have an excuse to buy a new machine.

There are some physical differences regarding in the CPU area, if I recall correctly:

  • 4,1 models have a standard XEON CPU, but without heat spreader or with a very thin one. A regular ‘pull’ from an old server won’t fit without some rework (whereas with 5,1 a cheap 6-core processor would fit without a problem);
  • 4,1 single core motherboards are physically different from dual core motherboards (whereas 5,1 motherboards just have an unpopulated socket in case of a single core configuration, allowing you to buy two of those cheap multi core monsters and drop them in)

They are nice (but huge) machines to see. I sometimes browse advertisements for a lowly specced 5,1 model on the cheap, but the still high prices and energy consumption, as well as limited expandability (many PCIe, but few VGA choices or places to put a harddisk), hold me back.

I’m sure! That is more valuable (and for a longer time) than the machine itself :wink: Having successfully completed the project despite (or actually because of) the troubles also gives a good feeling!

  • What’s the recommended format for the Yunohost partition? I used ext4. Would it be easier/better to use btrfs instead?
  • If Yunohost is installed on an SSD, which mount options are recommended? noatime and nodiratime? Anything else?

As always, 10 people will give you 10 different answers :slight_smile: In my view, for a server (like Yunohost), CoW filesystems with native snapshot capabilities are the most suitable because they do their best at error corrections and you can revert back to a previous state when something goes wrong during an update.
The best is probably ZFS but not obvious to install en debian; BTRFS is good enough I think, but some people look down on it. I won’t go into that argument… you can create subvolumes very easily, set quotas etc.
For BTRFS on SSD I use the following options (on a desktop machine but the settings are relevant nonetheless)

UUID=xxxx / btrfs defaults,subvol=@xx,ssd,noatime,space_cache,commit=120,compress=zstd 0 0
UUID=xxx /home btrfs defaults,subvol=@xx,ssd,noatime,space_cache,commit=120,compress=zstd 0 0

isn’t “Mac” version you mentioned PowerPC version rather than Intel Mac?
if so, well, it certainly does not boot. Just use x86 for good.

2008-2010 is mentioned so I would think it’s Intel. Apple stopped PPC machines in 2005. You can install linux on PPC but it’s a bit niche :slight_smile:

Thanks for you answers!

I updated the guide:

  • Recommend using an empty drive to avoid possible trouble if Debian/Refind try to use an existing EFI boot partition.
  • clarify the various options when installing Debian
    – Don’t select a desktop environment
    – Don’t use a username that will be an future Yunohost user
    – Don’t separate the /home, /var or /tmp partitions.
    – Use the default mirror and default hostname

i got burned on that with my latest install. had to do some tricky business to go around it. (make a new user, give sudo priv to it, change name of user to another name)

hope others take heed of that advice.

Added:

  • A warning that it’s not possible to automatically power-on after a power failure.(as far as I could find)
  • A warning about using btrfs