Skip to content

Instantly share code, notes, and snippets.

@jadbox
Created July 27, 2016 00:40
Show Gist options
  • Save jadbox/0d25accd3d752ad6fb99dee3a3a83ae8 to your computer and use it in GitHub Desktop.
Save jadbox/0d25accd3d752ad6fb99dee3a3a83ae8 to your computer and use it in GitHub Desktop.
Macbook Pro Retina 11,2 -- Debian Jessie 8.0 Installation

OS and i3

  • Debian Jessie (8.0) Minimal Installation
  • Guided partitioning
  • Only enable system utilities, disable Debian Desktop Environment and Print Server

Login as root

apt-get install sudo
adduser <youruser> sudo
sed -i 's/main/main contrib non-free/' /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get install \
    xorg \
    xserver-xorg-video-intel \
    i3 \
    curl \
    rxvt-unicode \
    alsa-utils \
    alsa-base

curl -O https://master.dockerproject.org/linux/amd64/docker
chmod +x docker
mv docker /usr/bin/docker
groupadd docker
gpasswd -a <youruser> docker

Wireless

ln -s /home/tom/kernel/linux-$(uname -r) /lib/modules/$(uname -r)/build
curl -O http://mirrors.kernel.org/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu2_amd64.deb
dpkg -i bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu2_amd64.deb
apt-get install dkms

modprobe wl

Sound

cat /etc/modprobe.d/snd-hda-intel.conf

alias char-major-116 snd
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-intel
 
options snd cards_limit=2
 
options snd-hda-intel id=SB index=0
options snd-hda-intel id=HDMI index=1
reboot
alsamixer
*unmute master channel with 'M' key*

Power Management Issues

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Powertop suggestions
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
#/sbin/iw dev wlan0 set power_save on

# Kernel Bug on Macbook Pro ? (kworker CPU high)
status=`cat /sys/firmware/acpi/interrupts/gpe06 | grep disable | wc -c`
if [ $status -eq 0 ]; then
    echo disable > /sys/firmware/acpi/interrupts/gpe06
fi
status=`cat /sys/firmware/acpi/interrupts/gpe17 | grep disable | wc -c`
if [ $status -eq 0 ]; then
    echo disable > /sys/firmware/acpi/interrupts/gpe17
fi

exit 0

Kernel Upgrade Time

docker run -it --name kernel-compile -v /boot:/oldkernel:ro -v /home/tom/kernel:/root debian:jessie
apt-get update
apt-get install curl kernel-package fakeroot build-essential libncurses5-dev xz-utils -y
cd /root
curl -O https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.19.8.tar.xz
tar -xvf linux-*.tar.xz
cd linux-*
cp /oldkernel/config-$(uname -r) ./.config
make oldconfig
        * Enable IPTABLES_NAT, THUNDERBOLT and OVERLAYFS
make-kpkg clean
fakeroot make-kpkg --initrd --revision=3.19.8 kernel_image kernel_headers
        (Go watch an episode of Game of Thrones)

exit
dpkg -i kernel/linux-headers-3.19.8_3.19.8_amd64.deb  kernel/linux-image-3.19.8_3.19.8_amd64.deb
sed -i 's/GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"cgroup_enable=memory swapaccount=1\"/' /etc/default/grub
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=\"quiet\"/GRUB_CMDLINE_LINUX_DEFAULT=\"quiet libata.force=noncq\"/' /etc/default/grub

reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment