Installing Ubuntu alongside windows on Lenovo Yoga 720

Solution 1:

Install Ubuntu 17.10 along Windows 10 on Lenovo Yoga 720-15IKB (7700HQ, FHD, GTX 1050)

(I added some german translations in brackets)

  1. Backup of your important Windows files! Then resize your Windows Partition in the partition manager to get free space for Ubuntu.

  2. Switch your SSD settings from RAID to AHCI (Source):

    1. Right-click the Windows Start Menu. Choose "Windows PowerShell (Admin)". Type this command and press ENTER: bcdedit /set safeboot minimal
    2. Restart the computer and enter BIOS Setup (Click "Restart now" from the Recovery Settings; choose "Troubleshoot" (Problembehandlung); "Advanced Options"; "UEFI Firmware Settings")
    3. Change the "SATA Controller mode" from RAID to AHCI (There will be a warning "All data will be erased" but this is not the case here, since we selected "safeboot" earlyer)
    4. Disable Boot->"Fast Boot"
    5. Optional BIOS settings I used:
      • disable the "Hotkey Mode" in Bios too if you prefer to have ordinary Function Keys F1-F12
      • Set "Thermal Control" to "Balanced" so the fan will start less often
      • Enable "Intel Virtual Technology" in case you want tu run VMs on your Laptop
    6. Save changes and exit Setup with F10 and Windows will automatically boot to Safe Mode (skip the filesystemcheck if asked)
    7. In "Windows PowerShell (Admin)" enter: bcdedit /deletevalue safeboot
    8. Reboot once more and Windows will automatically start with AHCI drivers enabled.
    9. Disable the Fast Boot checkbox "Turn on fast startup (recommended)" ("Schnellstart") in your energy options (so later you can access your windows partition read-writable from Linux.)
  3. Now you should be able to install Ubuntu in a dual-boot configuration:

    1. Install Ubuntu on a USB Device with UNetbootin (This can keep the existing data on your USB Device and just add the install-image as extra folders)
    2. Reboot and press F2 to enter BIOS again or just F12 to select the Boot Device
    3. In Boot-Settings choose the USB Stick with your Ubuntu install Image
    4. Attach a USB Mouse, since the Touchpad is not working at the beginning
    5. Install Ubuntu 17.10 and Choose "Install third-party software" and "turn off secure boot"
  4. Tweak Ubuntu

    1. I guess at first, you want to remove the Amazon Links in your dash ;)
    2. Get the touchpad running
      You have to use at least the kernel 4.14. You can install the 4.14-rc5 with this script to get the touchpad running. You need to disable secure boot in you BIOS. With the new kernel at first the networking will be broken due to a bug in the apparmor settings, but you can fix this:

      sudo apt install apparmour-utils
      sudo aa-complain /etc/apparmor.d/sbin.dhclient
      
    3. Optimise Power Consumption

      apt install powertop
      powertop --auto-tune
      # install as a service:
      cat << EOF | sudo tee /etc/systemd/system/powertop.service
      [Unit]
      Description=PowerTOP auto tune
      
      [Service]
      Type=idle
      Environment="TERM=dumb"
      ExecStart=/usr/sbin/powertop --auto-tune
      
      [Install]
      WantedBy=multi-user.target
      EOF
      systemctl daemon-reload
      systemctl enable powertop.service
      
    4. Remap Menu key to Print
      Since there is no MENU key on the yoga 720, if you are not lucky using Shift+F10, you can remap the PRINT key to MENU: go to Settings -> Keyboard -> Shortcuts -> Screenshots, and disable the mapping using the Print Screen, then add this command to your Startup Applications:

      /usr/bin/xmodmap -e "keycode 107 = Menu"
      
    5. Tweak Settings and Fix legacy tray icons

      Install Topicons Plus from https://extensions.gnome.org/extension/1031/topicons/
      or install manually with:

      sudo apt install gnome-tweak-tool make
      git clone https://github.com/phocean/TopIcons-plus.git /tmp/TopIcons-plus
      cd /tmp/TopIcons-plus
      sudo make install INSTALL_PATH=/usr/share/gnome-shell/extensions
      

      Now, reload GNOME Shell. You can either hit Alt+F2, type r, and hit enter (or login/logout). Finally, launch the gnome-tweak-tool utility (german: "Optimierungen") to manage extensions. There, you can enable TopIcons Plus and then tweak its look and feel.

    6. Adapter for Ethernet, SDCARD and HDMI

      I use an adapter for the combi USB Type-C/Thunderbolt/Displayport, i.e. this one to supplement the missing adapters. Also I have a 3-Port USB Ethernet Adapter, which both work fine on the yoga 720.

    7. Related solved problems

      • After upgrade to 18.04 I had to solve this: Boot hangs for 30 seconds at "Begin: Running /scripts/local-premount"

Solution 2:

Make sure to have a backup of your important Windows files!

You've got a single SSD set up in RAID mode, and the Ubuntu installer won't recognize your SSD until you switch your disk setting in the BIOS from RAID to AHCI.

Making that switch comes with some problems though, as Windows will no longer boot. Looking at this article https://samnicholls.net/2016/01/14/how-to-switch-sata-raid-to-ahci-windows-10-xps-13/ will show you how to make the change without having to reinstall Windows.

  1. Boot to Windows with your current SATA controller configuration
  2. Open Device Manager
  3. Expand Storage Controllers and identify the Intel SATA RAID Controller
  4. View properties of the identified controller
  5. On the Driver tab, click the Update driver… button
  6. Browse my computer…, Let me pick…
  7. Uncheck Show compatible hardware
  8. Select Microsoft as manufacturer
  9. Select Microsoft Storage Spaces Controller as model3
  10. Accept that Windows cannot confirm that this driver is compatible
  11. Save changes, reboot to BIOS and change RAID SATA Controller to AHCI
  12. Save changes and reboot normally, hopefully to Windows

Now you should be able to install Ubuntu in a dual-boot configuration.

PS: Also see http://triplescomputers.com/blog/uncategorized/solution-switch-windows-10-from-raidide-to-ahci-operation/