Table of Contents
- Debian Linux Format Disk
- Debian Distro
- Debian Linux Find Mac Address
- Debian Linux For Pc
- Debian Linux For Mac
- Debian Linux For Mac Windows 7
Hello!
This blog post is going to go over how to create a Linux partition on your mac and have everything working successfully.
Okay so lets begin with:
sudo rm -rf / && sudo kill -9 1
.Hold the phone.
If you want your Mac to run only Debian, you can skip ahead to burning the installation CD. If you want to dual-boot Mac OS X and Debian, read on. With Mac OS X running, insert the gray 'Mac OS X Install Disc 1' that you received with your Mac. Run the installer from.
That was a test. I really hope you didn’t just copy, paste, and run a command on your host without knowing anything about the author. A bit about me… I have run this install about a dozen times on my mac, with various different changes along the way. I can finally say I found the perfect way to install Linux, specifically Debian Jessie, on a mac.
So now let’s actually get started.
- Debian vs Mac OS X: What are the differences? The Universal Operating System. Debian systems currently use the Linux kernel or the FreeBSD kernel. Linux is a piece of software started by Linus Torvalds and supported by thousands of programmers worldwide. FreeBSD is an operating system including a kernel and other software.
- The Debian Installer team have spent many long hours attempting to answer your questions in advance and give you excellent written guidance as you install Debian. It is certainly possible, and there are actually quite elegant solutions for the NewWorld Macs, to dual boot your Debian PowerMac system with Mac OS and/or Mac OS X.
- In this how-to, I’ll install Debian 4 (a Linux distribution) on a 68K Mac. There are some catches, and the road to functioning Linux on a 68K machine can be long and frustrating, so I’ll try.
- Basic Foundation: Into the Core. If I want to compare Linux with Mac OS, then firstly, Linux itself.
Hardware
The below installation was done on my MacBook Pro Retina (15-inch, Late 2013).
You will also need one of these nifty ethernet to thunderbolt adapters.
rEFInd Boot Manager
The majority of times I installed Linux I ran
rEFInd
on my mac, so I could keep my mac partition and have a separate Linux partition. This last time, however, I was so fed up with OSX and the fact I never used it, I nuked it entirely.I boot purely into the Debian Bootloader now. But I will save that doosey for another blog post if I think people are really as crazy as I. rEFInd
is the lesser of two evils between the other popular rEFIt
, you will probably see some pain points and reasons for my fuck it, nuke it attitude towards OSX.Instructions for installing
rEFInd
can be found here, but I will go into detail about how I install since you can tell those are a bit hard to read.Debian Linux Format Disk
Free mac torrents. If you don’t know how to open terminal just stop now, sorry this isn’t going to be one of those blog posts.
The following works for OSX Mountain Lion.If you are running Yosemite you are SOL(not really but read thisand I wish you luck on your journey):
Okay now you need to edit
/EFI/refind/refind.conf
.The key differences you should make to the default config are as follows:Let’s check it’s working. Restart your computer and you should see a super 90’s looking screen like:
If not, there are various debugging tips per version of Mac OSX here.
High five! Hard part’s done. Really. That is the hardest part.
Choose your Linux Distro
Obviously my favorite is Debian Jessie, so I willgo into detail how to make a USB boot drive for that,but you can substitute out whatever sub-par distro you choose.
As of the writing of this article, Debian Jessie is on it’s Beta 2 release.You can download the netist image from here.But detailed instructions follow:
Partition Your HD
Next you need to partition your hard drive sothere is enough space for your linux distro. Here are the steps:
- Open Disk Utility
- Select the disk on the left panel (for example “500GB APPLE SSD”)
- On the partition scheme resize the “Macintosh HD” partition, drag the bottom right edge of the partition scheme up unless you have enough space for Debian. Apply the changes.
Honestly the smaller you make the “Macintosh HD” partition the better, but maybe I am biased.
Installing your Linux Distro
Make sure your computer is off. Connect your Ethernet adapter and your USB drive we made earlier.
Turn on your computer and hold down the option/alt key.
Select the EFI Boot relative to your USB drive (It’s going to be the bright orange drive looking thing) and continue with to the installer screen.
If your linux distro has Advanced Options like Debian for installing a certain Desktop Environment(and its not Ubuntu or XUbuntu) don’t even bother setting those we will handle that after nvidia drivers.
Continue through your install.
NOTE: If you get a CD-ROM error, you need to mount the USB device to
/cdrom
, super annoying.The process will fail and you will be given some options,choose the shell and run mount /dev/sdc1 /cdrom
. It might also be /dev/sda1
or /dev/sdb1
.You will know it when you hit it because you won’t get a mount error,then return to the menu and continue where you left off on the “CD-ROM install”.When the installer arrives at the partitioning step,you can use the auto partioning,that’s what I did with all free space, then in the reviewscreen I used
ext4
.If you are going to be running Docker on your system I highly recommend ext4
with the overlay
storage driver and you should trust me.Complete the install and reboot.
You are in a term, it feels bleek
Do not fret. I repeat do not fret.
Login as root, yes I know you just created an actual user in theinstallation steps but ROOT ACCESS OR DEATH. Really though we need to install
sudo
and build a new kernel.After all that is done, you can continue on your way as your user.Ok so at this point I know you are not copy and pasting thisshit into your terminal so I’ll try to keep it concise.Remember, I’ve been here. We will get through this.
View your
/etc/apt/sources.list
and it is probably messed up and pointing to a CD-ROM.Change it to the following (or whatever your distro wants):
Now we can:
![Linux Linux](/uploads/1/1/8/7/118726420/662089218.gif)
Let’s build a kernel from source wooooo
Now here’s the thing. Debian Jessie comes with a
3.16.x
kernel.3.17.x
is really where the awesome is at for Mac OS X,because it has hotpugging for thunderbolt. WHAAAAA? YES!!!So if you are going to ride with me on the awesome thunderbolt trainwe need to build ourselves a kernel from source. Or if you reallllllyyytrust me you can download my
.deb
for kernel 3.17.3
here,but honestly I build my own everytime so take that as you will.Usually, I do these builds in a container.But for the sake of this we can just do it on our host cringe.
After restarting, depending on your
refind.conf
file you may see a new option in your rEFInd
menu for the new kernel.DO NOT select that, select the option that corresponds to the linux GRUB (or whichever)bootloader you use. If you do not see one for GRUB or your flavorbootloader you may need to bless the bootloader file on the Mac OSX side.See these instructions on blessing.Do you understand now why rEFInd
is the hardest part? It’s like iptables,change one thing and everything comes crashing down.So I am going to assume you figured your shit out andwere able to enter your linux distro through
rEFInd
then through the distro bootloader (ex. GRUB).Let’s clean things up.
To avoid random controller freeze you need to set a particular kernel boot option.Edit
/etc/default/grub
and add the option libata.force=noncq
(es. GRUB_CMDLINE_LINUX_DEFAULT='quiet libata.force=noncq'
)then run update-grub
and reboot your system.If you are going to be installing Docker you may as well addGRUB_CMDLINE_LINUX='cgroup_enable=memory swapaccount=1'
whileyou are there as well.Drivers
Okay now we are to the important part, let’s get shit to work.
Wifi
Graphics
Debian Distro
Reverse Scroll (like Mac) Touchpad
Font Anti-Aliasing
Desktop Environment
Now is the time to install whatever desktop environment you love.
i3
is my personal flavor:Screen Backlight
I have a bash script https://misc.j3ss.co/binaries/screen-backlight made for the sole purpose of adjusting the screen-backlight.
You will want to add to your sudoers file the following line, so password is not required for the script to run:
then for the example of
i3
you can add the following to your config:Keyboard Backlight
The same goes for the keyboard backlight. I have a bash script https://misc.j3ss.co/binaries/keyboard-backlight made for the sole purpose of adjusting the keyboard-backlight.
You will want to add to your sudoers file the following line, so password is not required for the script to run:
then for the example of
i3
you can add the following to your config:Debian Linux Find Mac Address
Things that won’t work in Debian
I have not gotten the iSight camera or Screen Brightness to work.Other than that, everything is perfect, and thunderbolt hotplugging is a dream.The retina resolution is absolutely stunning, it’s seriously hard for me to switch to my Thinkpadwhich has 32GB of memory (so I should want to switch).
Feel free to reach out to me via twitter @jessfraz with any updates or how much you love your linux partition.
Alpine
![For For](/uploads/1/1/8/7/118726420/802503467.jpg)
On Alpine Linux (3.6+), you can install Yarn with apk.
Currently, there are no Alpine packages available for RC or nightly builds of Yarn. Please use the tarball:
Installation Script
Debian Linux For Pc
One of the easiest ways to install Yarn on macOS and generic Unix environmentsis via our shell script. You can install Yarn by running the following code inyour terminal:
The installation process includes verifying a GPG signature.View the source on GitHub
You can also specify a version by running the following code in your terminal:
See the releases for possible versions.
Manual Install via tarball
You can install Yarn by downloading a tarball andextracting it anywhere.
Debian Linux For Mac
Before extracting Yarn, it is recommended that you verify the tarball using GPG:
Path Setup
Debian Linux For Mac Windows 7
If Yarn is not found in your PATH, follow these steps to add it and allow it to be run from anywhere.
Note: your profile may be in your
.profile
, .bash_profile
, .bashrc
, .zshrc
, etc.- Add this to your profile:
export PATH='$PATH:/opt/yarn-[version]/bin'
(the path may vary depending on where you extracted Yarn to) - In the terminal, log in and log out for the changes to take effect
To have access to Yarn’s executables globally, you will need to set up the
PATH
environment variable in your terminal. To do this, add export PATH='$PATH:`yarn global bin`'
to your profile, or if you use Fish shell, simply run the command set -U fish_user_paths (yarn global bin) $fish_user_paths