I started using Linux more seriously around 2010, with Ubuntu 10.10 (Maverick Meerkat), if memory serves me well, although I did play around with Corel’s Linux way back when. Since then, I tried a variety of distros and Unixes, such as Fedora and FreeBSD, but it wasn’t until early 2015 that I first installed Arch Linux. At the time, I purchased a used 13” Asus Zenbook on ebay specifically to toy with different distros without risk for my work laptop. I quickly started appreciating Arch Linux’ minimalist approach where you can relatively easily configure your distro to your liking, backed by an amazing wiki, rolling updates and an extensive, user-friendly package manager.
I work as a freelance Go developer, and the overwhelming development platform of choice for the clients I work with - mostly startups - is macOS, so to make it easier for me to integrate to development teams (tools, setup, sharing installation information, etc.), my work machine is a mid-2015 13” Macbook Pro. I also think it is the best laptop - the best computer - I’ve ever had, for my needs. I work remotely, so the form factor makes it a great portable machine to go work in libraries, coffee shops or in a park during summer, and the battery life is good enough to be away from an outlet for an extended period of time (although not quite an entire work day). I also love the trackpad and keyboard.
Xubuntu, PsychOS, and Elementary OS are probably your best bets out of the 6 options considered. In case you want to try using Linux on MacBook Pro, install a virtualization software like Parallels Desktop for Mac and install Linux as a virtual machine on top of it. Yes, installing Ubuntu 16.04.2 LTS on a MacBook Pro (2006) works out of the box. I have not been able to make the computer boot from USB-stick, but if you have a burnable CD or DVD available you can easily get it done. If you have a burnable CD available with room for 700MB data, use the Network installer (mini.iso).
So when the old Zenbook’s screen died I started considering buying another laptop, but what I really wanted was that great macbook hardware paired with my personal favorite OS. But I still didn’t want to take away what little disk space I had for my work (128GB SSD) to dual-boot, and I wasn’t interested in running in a VM. I had a 120GB Lacie USB drive around, so I figured I might as well install Arch on it and not touch my internal disk at all.
Basic setup is pretty straightforward and closely follows the installation wiki page. Mac-specific steps I had to make were (keep in mind that other approaches may work too, but this worked for me and my specific configuration):
systemd-boot
(I installed Arch from a Virtual Box VM on macOS, and at this point I had to ensure the VM started in EFI mode, which hangs for minutes at startup, but ends up working - the Mac-specific instructions were documented in this wiki page)mkinitcpio.conf
, I had to make sure the block
hook was before autodetect
as explained on superuser.com, otherwise I had the error mentioned in the question. I also use systemd
instead of udev
, so my HOOKS
look like this: (base systemd block autodetect modconf filesystems keyboard fsck)
/etc/pacman.d/mirrorlist
) and install some basic packages to get started: pacman -S vim base-devel terminus-font dialog wpa_supplicant git openssh
setfont
until I found something I liked, and persisted the setting in /etc/vconsole.conf
(I set it to FONT=ter-v28n
, but keep in mind that I’m in my forties…)wheel
group and uncommented %wheel ALL=(ALL) ALL
in visudo
)lspci
is not accurate in the VM, so there were some back and forth between the real OS and the VM to get internet access to install the driver; my macbook pro has a Broadcom 43602 card and the b43-firmware (AUR)
package works for me.This results in a working console-based system, and although there’s much configuration to be done next, the rest is much more subjective. At this point, booting the macbook with the USB drive plugged in and the option
key pressed shows the bootloader menu with the option to select the EFI Arch Linux bootloader.
That’s where the real fun begins. I’m not a gamer, when I use a computer I’d say I’m at least 90% of the time either at the terminal or in a web browser. I have very little use for other GUI-based applications, except Keepassxc
(and that’s because I used a poor naming scheme when I created my password database otherwise I’d use its command-line interface).
I implemented a very personal bash-based “framework” to manage my dotfiles (and more, config files, bashrc, aliases, etc.) so at this point making a system feel at home only requires cloning that repo and hooking it up so it runs on login. It also takes care of installing the packages I want from the start on an Arch system. For me, the main ones are:
xorg-server
& co. for the graphical environment.i3-gaps
as my window manager - I don’t need any heavyweight desktop environment such as KDE or Gnome. I use i3blocks
for the status bar and dmenu
as application launcher.Xft.dpi: 192
in my Xresources
file.cower
to handle AUR packages, along with some handy aliases because I always forget how to use it.nitrogen
for my wallpaper, with lots of Black Metal Cat pictures to randomly choose from.kitty
for my terminal.adobe-source-code-pro-fonts
because I’m used to Source Code Pro as terminal font.ttf-mac-fonts
in AUR, ttf-croscore
for substitutes to Windows fonts, etc.)google-chrome
(AUR) and firefox
.isync
(mbsync) to sync my Gmail locally, msmtp
to send email, notmuch
to index my emails, and alot
as terminal-based mail agent. I have a user systemd service running regularly to automatically sync this.Okay so you really have to do a lot of manual set-up, few things work automatically out-of-the-box, but with a bit of work, I think pretty much everything works? Let’s see:
libinput
to enable natural scrolling so I’m not all confused when switching OS.acpilight
provides keyboard brightness and pommed-light
(AUR) handles screen brightness.ALSA
for the sound, and an xbindkeys
file to map the volume function keys to amixer
increase/decrease/toggle. Headphones work too.bcwc-pcie-git
and facetimehd-firmware
packages (both AUR).xrandr
, I even configured i3 with a specific layout when an HDMI screen is plugged in so I can work with two monitors.bluez
and bluez-utils
to use bluetoothctl
command-line tool to pair a device. Apple’s Magic Trackpad works fine.cups
and the hplip
driver for my wi-fi HP printer.Really, I can’t think of anything I use on my Macbook Pro that doesn’t work under Arch Linux (I haven’t tried the card reader nor the thunderbolt ports). And unlike under macOS where I struggle to maintain 10-15GB of free disk space, on my Arch disk with all my emails synced locally, I still have just under 100GB free. I’m really glad I didn’t opt to buy a separate laptop, not only did I save a significant amount of money, I now have my favorite OS available on my favorite hardware.
Author: Michael Minn (www.michaelminn.com)
21 January 2017
Describes how to set up an Debian 8.7 (Jesse) operating system on aMacBook Pro 8.2 Computer
This page describes how to install aDebian 8.7 (Jesse) Linux operating systemon a MacBook Pro 8.2 notebook computer.
Linux will run fine on this machine, although there are somequirks that make installation a bit of a challenge. Most notableis the presence of two video chips on this machine, which requiressome cryptic file editing.
These instructions largely follow theDebian MacBook Proinstallation instructions. You will need a wired Ethernet connection.
Clean OS X: I got this machine used, so the first thing I did waswipe the hard driveand perform a clean install of Mac OS X 10.11 (El Capitan).
Create Network Install Thumb Drive: If you have anexisting Linux box, you can download network install image and copy it to a USB drive.No exotic third party utilities are necessary, although note thatit is being copied directly to the disk device rather than a mounted filesystem:
Boot into Internet Recovery Mode: Holding downOption + Command + R on boot will put you in Internet recovery mode,which will allow you to split the partition.
The first challenge is that Mac OS X is installed with CoreStoragephysical volumes, that must be reverted first. Open a terminal (Utilities -> Terminal) andlist the volumes:
When you have the core storage volume name you can revert. Thisis the volume name on my machine:
You can then start the Utilities -> Disk Utility, select the diskand resize the partition. I resized it to half so the Mac side would still be useful.
Boot the thumb drive: Place the bootable thumb drive into a slot and reboot,Holding down the Option key, which will cause an EFI Boot into the network installer.
Installation Options: The following are the installation options I chose:
Guided Disk Partition: This is what I chose:
Base System Install: Took me about 6 minutes
Main Install: This is the first of the tricky parts,since you need to avoid installing a desktop so you can deal withthe graphics chip issue manually:
The install ran about 45 minutes
Install Software: The network install misses some importantpackages you will need. Log in as root and install:
Video Chip Disable: If you do an ordinary boot with thismachine, the boot will complete, but the display will show onlya blinking cursor. This trick was gleaned fromthis ArchLinux install page.
To disable the second chip, you need to add the following outblines to the /etc/grub.d/00_header file immediatelyafter the set gfxmode... line:
outb() does low-level port output and writes to the video controller.
Then update grub:
reboot by pressing the power button to shutdown.
The Broadcom 4331 wireless works fine, but you have to install some firmware.
Add the following repository to /etc/apt/sources.list:
Install the firmware package:
After you reboot, wlan0 will be available. Some commands:
WPA encrypted networks require the wpa_passphrase utility:
systemd is an init system that bootstraps user space and managesprocesses. It has largely replaced the UNIX System V init systems on mostdistributions, with the objective of unifying basic Linux configurations acrossdistributions. systemd has provoked considerable controversy because of itscomplexity and violation of fundamental Unix dependency philosophy.
It is actually fairly easy to remove and replace with classic Sys V,as described in these instructions. As with any major system change,full backup is recommended before proceeding.
If you're hard core command line and don't want the clutter and delay of thea desktop, you might consider getting rid of the desktop altogether andjust using a window manager to manage xterms and X applications started fromthe xterms. This will speed your boot time a bit and get rid of some annoyingbackground daemons.
IceWM: Although I used the venerable Motif Window Manager (MWM) for a number of years (from the motif-clients package), this version of mwm locks up whenX is started. So I switched to the ICE Window Manager,which has a few more features (like a task bar with graphical system monitoring)but is still fast and lightweight:
.xinitrc is a file that is executed when X is started. Create a .xinitrc in your home directory (/home/<username>) and type thefollowing lines. This creates a couple single terminal window, sets the 'desktop' color to pleasant shade of greenish grey blue and startsthe window manager. When you type 'startx', from the text login, it will start an xterm, in which you can type commands to start other programs. You can create additional terminal windows from a popup menu when you right-click on the desktop.
I found the full brightness to be a bit much, especially in contrast to older, dimmer LCD displays. The backlight doesn't seem to be accessible through ACPI, but the xgamma command adjusts midtones (gamma) and warms things up a bit, although this is optional.
PulseAudio is a nasty sound server that adds latency and eats up CPU. If you don't have the desktop you can ditch it.
However, you will need to deal with protections set up for ALSA that willkeep your applications from being able to access the sound devices. Add yourselfto the audio group:
Configure GRUB for terminal mode start:It is helpful to see what is goin on during boot rather than have bootmessages hidden behind the splash bitmap just in case there's a boot problem(which used to happen alot). Adding this line to the /etc/default/grubfile will cause the machine to boot in console mode:
Then run:
After these changes, on boot you will see the system startup messagesand then be greeted with a console login prompt. After logging in, youcan use the startx command to start the graphical desktop.
The webcam is /dev/video0 and you can look at yourself with:
To access the camera, you need to add yourself to the video group:
The X window server supports TrueType (tm) fonts, although installing them via the command line is a bit more cumbersomethan with an installer program or package. If you've got some on a Windoze box, TrueType fonts tend to look quite a bit better than the fonts that come with the distributions. And if you're doing any web development, you need them to have at least a guess as to whatyour pages look like on a Windoze box.
Unfortunately, the FontPath configuration that specifies the directorieswhere fonts are located is compiled into the X binary and is not configurable.While 'xset +fp' can add a directory to the font path, that setting is not permanent and is lost when you reboot. xset cannot be added to a local configuration file like .xinitrc. This is not a problem for newer applications that use fontconfig,but this may represent an issue for older applications that only usethe X font paths. The kludge is to copy the fonts you want to add into one of the configured truetype font directories.
Copy the fonts into a shared font directory: You can do an 'xset -q'to find the configured Font Paths for your X configuration:
Chose one of the directories listed in 'Font Path'and copy your .ttf font files into that directory. In my case, I chose to use/usr/share/fonts/X11/misc. While you could create a new directory under /usr/share/fonts, fonts installed there would not be visible to xlsfonts or older X applications.
Then run mkfontscale to create the fonts.scale file andmkfontdir to create the fonts.dir files used by the X server. You should also change the owner of all the files to root to avoid permission problems. The mkfontscale and mkfontdir steps are critical if you want to be able to list your fonts with xlsfonts or other legacy X applications.
You can check to verify the fonts are loading by startingan X application (like gimp). The xlsfonts command lists fontsavailable directly from X and the fc-list command lists fontsavailable through fontconfig.
The listing will likely be long, but if the fonts are loadingcorrectly, you will see X font names like these (for Arial andGaramond, respectively):
You can bitch all you want about the Yankees and greed but they spend money in a sincere effort to win it all, every year. What fan wouldn't want their teams to do that.(Curt Schilling)