Not today...

comments

OS

Linux Mint 2

Tagged admin

I recently messed up my laptop (do not play with /etc/apt/preferences too much!), and I had to reinstall my distro. I checked my previous article and noticed some missing informations. So here is a second article of things I needed to fixup when installing LMDE on my Macbook.

Installation

First, for the creation of the usb key, I ended up using the method described in the archlinux wiki. Basically, this was the command line I entered:

dd bs=4M if=/path/to/lmde.iso of=/dev/sdb # /dev/sdb is my usb key (lsblk FTW)

Then, for the partitioning I forgot to tell the filesystem needed by each part, so here is lsblk to the rescue:

$ sudo lsblk -o NAME,FSTYPE,MOUNTPOINT
NAME               FSTYPE      MOUNTPOINT
sda
├─sda1             hfsplus
├─sda2             vfat        /boot/efi
├─sda3             ext4        /boot
└─sda4             LVM2_member
  ├─vg_ssd-lv_root ext4        /
  └─vg_ssd-lv_swap swap        [SWAP]
sdb                iso9660
├─sdb1             iso9660     /media/max/LMDE 2 Cinnamon 64-bit
└─sdb2             vfat

(sudo needed to output the fs, see man lsblk for more informations)

Configuration

Preferences

This time I will try to avoid messing up with the packages, here is what I have done.

I want to add unstable and experimental repos, so I created a source file: /etc/apt/sources.list.d/debian-package-repositories.list

# https://wiki.debian.org/SourcesList

deb http://httpredir.debian.org/debian sid main contrib non-free
deb-src http://httpredir.debian.org/debian sid main contrib non-free

deb http://httpredir.debian.org/debian experimental main contrib non-free
deb-src http://httpredir.debian.org/debian experimental main contrib non-free

Now it is time to set up the preferences. But here is the trick, by default Mint set up a Pin-Priority 700 to all the Debian packages. This will bring unstable packages at the same level as those from stable.

See the file /etc/apt/preferences.d/debian-package-repositories.pref, in order to have a good priority across those repos replace the content with:

Package: *
Pin: release a=stable
Pin-Priority: 550

Package: *
Pin: release a=unstable
Pin-Priority: 450

Now, just a apt-get update and we are ready to install packages safely

Tearing

I had a tearing issue on my macbook, which I was able to spot and test with this video.

I followed the instructions from the arch wiki. It makes me create /etc/X11/xorg.conf.d/20-intel.conf file, and fill it with:

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "sna"
   Option      "TearFree"     "true"
   Option      "DRI"          "3"
EndSection

I restarted X (restart the computer in order to be sure :p), and it now works (hopefully).

Webcam

I had issues with my webcam too. I followed archwiki again. This one is not confirmed but no command failed, and the test with mplayer at the end seemed to work:

mplayer tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0 -fps 30

Programs

Neovim

I replaced vim with neovim, and put all the configuration in the .config/nvim directory. It works out of the box, without changing a thing in the configuration, except the paths for the plugins (which were in ~/.vim).

To install neovim you will need the experimental packages described in the first part of this post.

Golang

I wanted Golang 1.6 (not the 1.3 version from stable). So, I read the documentation and asked forum. And I discovered the -t option in apt-get which allows as long as it does not broke package integrity to install from different versions.

I simply typed the following command to have the version needed:

apt-get install -t unstable golang

Docker

Docker is available in the unstable repository, but this one broke some other dependencies. I had to install it with a custom repo following those instructions.

# Add the repo to a dedicated source.list file
echo "deb https://get.docker.com/ubuntu docker main" > \
       /etc/apt/sources.list.d/docker.list

# Add repo keyring
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys \
       36A1D7869245C8950F966E92D8576A8BA88D21E9

# Update and install the package
apt-get update -qq && sudo apt-get install -y lxc-docker

# Add my user to the docker group
gpasswd -a <my_user_name> docker

# Enable the docker service for the next start
systemctl enable docker

Now logout, and reconnect and it should work.

Python

I always need some base packages in order to start developing, so those are the most basic one I need in my daily life:

apt-get install python-dev libxml2-dev libxslt-dev virtualenv libyaml-dev

(be sure to install the virtualenv package and not the python-virtualenv one, because it will not add the binary to the PATH).