Contribute
Register

[Guide] Installing Arch Linux on the Razer Blade, Late 2016, FHD

uar

Joined
Jul 21, 2015
Messages
233
Motherboard
Razer Blade, Clover
CPU
i7-6700HQ
Graphics
HD 530 / GTX 1060, 1920x1080
Mobile Phone
Android


This is my way of saying goodbye to the Hackintosh community for good as I can't stand a mediocre operating system that crashes at least 3-4 times a day, deny updates and a company that won't provide support for NVIDIA drivers anymore. I already moved to Android a year ago, and have Windows installed just in case, so I think this is the right time to abandon macOS. It has been fun, I must admit, I started back from the 10.7 days, and had two Hackintoshes, three with this one, on this one everything worked with El Capitan and Sierra. High Sierra had issues, but still it wasn't as unstable as Mojave.

This is a minimalistic guide on installing Arch Linux on the Razer Blade, Late 2016, FHD keeping Clover UEFI without any encryption.

What you need:
  • A USB (even 1GB should do the trick)
  • macOS installation with Clover Configurator.
  • A partition for Arch (Use Disk Utility and format it as ExFAT, it will be deleted and formated for Linux anyway).
  • Smartphone running Android or USB Wi-Fi dongle, iOS won't work, you know mediocrity!
  • Cup ☕ (you might need more than one)

Preparation:
  • In Linux:
    • Unmount disk…umount /dev/sdXZ(where X is the letter and Z the partition)
    • Open your preferred terminal application and navigate to the directory of your newly downloaded .iso and then run this command: sudo dd bs=4M if=arch(press tab to fill) of=/dev/sdX (where X is the letter of your USB disk) status=progress oflag=sync

  • In macOS:
    • Unmount disk…diskutil unmountDisk /dev/diskX (where X is the letter)
    • Open Terminal and navigate to the directory of your newly downloaded .iso file and run this command: sudo dd if=arch(press tab to fill) of=/dev/rdiskX (where X is the letter) bs=1m
Installation:

I assume you guys might have the Broadcom card for macOS, but that card isn't supported by Linux OOB, so we need to use something to get internet connectivity. You can either use a smartphone running Android or a compatible USB Wi-Fi dongle, I used Android.

Connect your phone to your computer and enable USB Tethering. Make sure the device has internet connectivity.

Boot the Arch installation with the newly created USB. You will be welcomed inside a virtual console.

First we have to set up internet connectivity:

  • ip link

You will see one loop device and the Android device with something like enp0s20. This is the interface name.

Now run dhcpcd:

  • dhcpcd <your interface name>

Time to ping and see if we got internet:

  • ping -c 3 google.com

Let's see the disk and partitions:

  • fdisk -l

You’ll see /dev/nvme0n1pX (where X is the partitions).

/dev/nvme0n1p1 is the EFI partition, where we have Clover installed. Don't touch that.

Now note which partition you want Arch on (I dont think a SWAP partition is necessary with 16 GB RAM, so I skipped it).

Now we have to delete the partition first:

  • cgdisk /dev/nvme0n1

You will now be inside cgdisk. Choose your partition and [Delete] it. Choose [New] and assign Linux File System (8300) attributes to it. Now [Verify], then [Write] type "yes" and [Quit] the application and get back to the terminal.

Now let's format it for Linux:

  • mkfs.ext4 /dev/nvme0n1pX (Where X is the partition. Remember nvme0n1p1 is EFI. Don't delete that.)

Now let's assign it to /mnt and EFI partition to /mnt/boot

  • mount /dev/nvme0n1pX /mnt (Where X is the partition)
  • mkdir -p /mnt/boot && mount /dev/nvme0n1p1 /mnt/boot

Finally, time for installing:

  • pacstrap /mnt base base-devel

Let's generate fstab:

  • genfstab -U -p /mnt >> /mnt/etc/fstab

Now let's chroot into the new installation:

  • arch-chroot /mnt

You will now be running as root inside /mnt all changes you do now, is ON the installation.

We have to edit locale:

  • nano /etc/locale.gen

And remove the hashtag from each locale you want to enable. Like:

en_US.UTF-8 UTF-8

Save it (Ctrl+X), type “y” to override and enter.

Now let's generate locale:

  • locale-gen

We have to set hardware clock and set the timezone:

  • rm -rf /etc/localtime

  • ln -s /usr/share/zoneinfo/Europe/Oslo /etc/localtime

(You have to change your zone and city)

  • hwclock --systohc --utc

Let's set computer name:

  • echo RB > /etc/hostname

(RB is my computer name, you might use one for your liking)

Change root password:

  • passwd

We create a new user, as being root as too risky:

  • useradd -m -g users -G wheel -s /bin/bash <username> && passwd <username>

Let's change sudoers, so we don't have to type password when running commands with “sudo”

  • nano /etc/sudoers

Remove the hashtag for:

%wheel ALL=(ALL) NOPASSWD: ALL

Save it (Ctrl+X) and type “y” to override and enter.

Setting Pacman repositories:

  • nano /etc/pacman.conf

Remove hashtag for:

[multilib]
Include = /etc/pacman.d/mirrorlist

Save it (Ctrl+X) and type “y” to override and enter.

We will install intel-ucode package that will update CPU microcode before loading the Linux kernel. Let's install dosfstools alongside.

  • pacman -S intel-ucode dosfstools

We have to grab the PARTUUID’s for EFI partition and of our root partition:

  • blkid

Take a note of the EFI partition and of the root partition. We will use that later so Clover can boot Arch.

Now let's unmount the /boot partition:

  • umount /boot

Now let's add PARTUUID for EFI partition:

  • nano /etc/fstab

PARTUUID=<add uuid here for EFI partition> /boot vfat

Save it (Ctrl+X) and type “y” to override and enter.

Now let's mount EFI partition (/boot) with PARTUUID:

  • mount PARTUUID=<add uuid here for EFI partition> /boot

Take a backup of kernel:

  • cp /etc/mkinitcpio.d/linux.preset /etc/mkinitcpio.d/linux.backup

Let's install the kernel package with the new configuration in /boot mount point:

  • pacman -S linux

You can check if the ramdisk is there:

  • ls /boot

Exit chroot and reboot to macOS:

  • exit
  • umount -R /mnt
  • reboot

The Blade will hang. To fix that. We have to install xorg packages, but for now just long press the power button to shutdown.

In macOS. Open Clover Configurator, mount the EFI partition and open config.plist

Click “Gui” section -> In Custom Entries -> Click that + sign. Double click on the newly created custom entry:

  • Volume should be selected to “EFI (disk0)”
  • Path should be “\vmlinuz-linux”
  • Arguments should be “initrd=/intel-ucode.img initrd=/initramfs-linux.img root=PARTUUID=<add uuid for the root partition NOT EFI partition this time> rw quiet"
  • Type should be selected to “Linux”
  • VolumeType should be selected to “Internal”

Save it (Windows key+S) and restart. You should now be able to boot Arch from Clover.

Post-Installation:

Boot to Arch, login as your newly created user. Connect to the internet first with dhcpcd with your Android device.

  • ip link

You will see one loop device and the Android device with something like enp0s20. This is the interface name.

  • sudo dhcpcd <interface name>

This will give you internet connectivity again. Check it with ping:

  • ping -c 3 google.com

Let's configure network:

  • sudo pacman -S broadcom-wl networkmanager network-manager-applet
  • sudo systemctl disable dhcpcd
  • sudo systemctl enable NetworkManager
  • sudo reboot

It will still hang, just long press the power button to shutdown.

Start again, boot into Arch. Now let's check if we got the Broadcom card detected by Arch:

  • ip link

If you see something like wlp2s0 than it is detected. Now let's connect to internet:

  • nmcli device wifi connect <wifi name(ssid)> password <wifi-password>

It will connect now and you should have working internet connectivity without the need of your Android device or USB Wi-Fi dongle.

Let's configure sound:

  • sudo pacman -S alsa-utils

Open alsamixer to adjust the volume within the console itself.

Let's install and configure xorg:

  • sudo pacman -S xorg xorg-server xorg-xinit xorg-xrandr
  • sudo cp /etc/X11/xinit/xinitrc ~/.xinitrc
  • sudo cp /etc/X11/xinit/xserverrc ~/. xserverrc
  • sudo Xorg :0 -configure
  • sudo cp /root/xorg.conf.new /etc/X11/xorg.conf

Install NVIDIA Drivers:

  • sudo pacman -S nvidia nvidia-utils nvidia-settings lib32-nvidia-utils

Install git:

  • sudo pacman -S git

Let’s install yay so we can install packages from the Arch User Repository (AUR):


Install nvidia-xrun with yay:

  • yay -S nvidia-xrun

Now finally a DE (Desktop Environment) or WM (Window Manager). I prefer WM and specially Openbox (but you guys can install a DE like Gnome, KDE, Xfce and so on).

  • yay -S openbox archlinux-wallpaper arc-gtk-theme nitrogen konsole chromium vlc libreoffice filezilla gimp firefox pcmanfm tint2 menumaker obconf obmenu conky-nvidia
Install mesa package:

  • yay -S mesa

You can run xinit to launch apps with the Intel card, nvidia-xrun to launch with the GTX 1060:

  • nvidia-xrun openbox-session

Create a autostart file:

  • nano ~/.config/openbox/autostart

Add the commands you want to automatically start everytime you run openbox-session:

nitrogen --restore &
tint2 &

Save it (Ctrl+X), type "y" and enter. Now when you set a wallpaper with nitrogen, it will automatically restore in the next openbox-session.

You can install much more than that. This is Arch. I only use the GTX 1060 in Arch, recently installed Steam and used Proton to run GTA V.

You can now delete macOS if you want to. I will be adding more over time. Good luck and tell me if there is something you don't understand.

Thanks to the Arch Community, the Arch Wiki and vulgo!
 

Attachments

Last edited:
Top