Skip to content

serpro69/dell-precision-5530_ubuntu-win_dualboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stand With Ukraine

Instructions on provisioning Dell Precision 5530 with dualbooted Ubuntu (currently 18.04) + Windows

DISCLAIMER. THESE GUIDELINES ARE MY PERSONAL NOTES AND ALL THE MATERIALS HERE ARE PROVIDED “AS IS” WITH NO WARRANTIES WHATSOEVER REGARDING THE SECURITY, RELIABILITY, AND PERFORMANCE. THE AUTHOR MAKES NO WARRANTY THAT FOLLOWING THESE GUIDELINES YOUR SYSTEM WILL BE UNINTERRUPTED, TIMELY OR ERROR-FREE OR THAT THE RESULTS OR INFORMATION OBTAINED FROM USE OF THESE GUIDELINES WILL BE ACCURATE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, EXEMPLARY OR PUNITIVE DAMAGES. YOU UNDERSTAND AND AGREE THAT YOU USE THE THE MATERIALS PROVIDED HERE AT YOUR OWN DISCRETION AND RISK AND THAT YOU WILL BE SOLELY RESPONSIBLE FOR YOUR ACTIONS, AND FOR ANY DAMAGES TO YOUR COMPUTER SYSTEM OR LOSS OF DATA THAT RESULTS FROM THE DOWNLOAD OR USE OF THESE GUIDELINES.

These are my personal notes on installing Ubuntu LTS (18.04 at the time of writing) alongside Windows 10 Pro on a Dell Precision 5530 (mid 2019) laptop. Most of these intructions and tweaks should apply to Dell XPS 15 9570 as well since they share mostly same hardware. They should also apply to some previous models of these laptop lines (Dell Precision 5520, Dell XPS 15 9560, Dell XPS 15 9550). I have personally tested the same setup (with very slight differences) on my other Dell XPS 15 9550 and everything works just fine. I don't make any guarantees though. If in doubt - read the disclaimer first and proceed at your own risk.

NOTE: This is a WIP guide.##

ToDo

  • ToC
  • BIOS
  • Reinstalling Windows 10
    • Downloading drivers and software
    • Downloading Windows 10 iso image
    • Creating bootable flash drive
    • Clean Windows 10 install
    • Tweaking Windows 10 after fresh install
    • Optional software
  • Installing Ubuntu
    • Downloading iso image
    • Creating bootable flash drive
    • Installing ubuntu as second boot
    • Partitioning SDD drive for Ubuntu installation
    • Dell Precision 5530 tweaks for Ubuntu
      • Respin image
    • Installing necessary software packages (This should be done with ansible)
    • Dotfiles (This should be done with ansible)
    • Creating shared drive for Ubuntu and Windows
    • Optional software

Table of Contents

BIOS

Updating BIOS

As a first step after booting up a new laptop I always update the BIOS to latest version. This can be found on DELL's support site. Simply download and run the executable file and the runner will do the job. Note: it is advisable to charge the laptop and connect it to AC. Any interruption during BIOS update may render the laptop unusable

Tweaking BIOS for dual-boot

Several changes to BIOS are needed. I've separated them into mandatory and optional as show below. Mandatory:

  • General -> Boot sequence - UEFI
  • General -> Advanced boot options -> Uncheck 'Enable Legacy Option ROMs'
  • Secure boot -> Secure boot enabled -> Disable
  • Switch SATA operation to ACHI (Do this after installing windows and setting safeboot to minimal. See Windows won't boot with ACHI mode for details.)

Optionally:

  • Battery -> Set change level from 50 to 80 (As I mostly use AC I don't want the battery to always keep charged to 100%, this should prolong the battery life in the long run.)

Some extra info on setting up BIOS for dual-boot can be found on DELL's support page.

Reinstalling Windows 10

It is advisable to reinstall Windows 10 on a newly-bought laptop. The default OS often comes bundled with bloatware, outdated drivers, etc., hence I prefer to always start with a clean install.

Downloading drivers and software

It is advisable to make some changes to Windows 10 prior to connecting to internet. A clean Windows 10 is sh*t and a huge spyware. If you are concerned about your privacy (which you should be) then you should follow the guidelines on how to disable telemetry, cortana and apply other privacy related tweaks to Windows 10 (See below.) prior to connecting to internet. Therefore you will need some software and drivers to be downloaded first.

Prior to wiping the hard drive and installing clean Windows 10 download the following drivers, software and win10 tweak files. They will be needed later after installing fresh OS.

Downloading Windows 10 image

Windows 10 images are available for download from Microsoft support site. However, if downloading from Windows OS, then Microsoft will try to detect your OS and will want you to use their Media Creation Tool. IF you don't like to use the tool there is still an option to download the iso file directly, all you need to do is make MS servers think you're using an unsupported OS. To do this simply switch the user agent that your browser sends, for example to Safari on iPad, and it will allow you to get a direct download link for the iso image of Windows.

Creating bootable flash drive with Win10

There is plenty of software that can create a bootable flash drive from the iso image, I personally prefer Rufus.

  • First verify the iso image downloaded from Microsoft. This can also be done with Rufus. For more info see FAQ.
  • Then create the bootable flash drive in UEFI mode. For more details see full Rufus FAQ.

Installing Windows 10

Applying optional tweaks to Windows 10

After completing the previous step you should have a usable Windows 10 platform with most of spyware and telemetry disabled. However there are some additional tweaks that can be applied based on your tastes and desires. See Windows 10 Tweaks and Fixes Guide for more details.

Installing Ubuntu

Downloading iso image

For this guide I have used the latest LTS version available at the time - Ubuntu 18.04.2 LTS. I haven't tried the short-term support versions and can't guarantee everything will work the same.

Download Ubuntu Desktop version from here: link.

Creating bootable flash drive with Ubuntu

The instructions are same as for Windows 10 bootable flash drive - see this section for more details.

Installing Ubuntu as second boot

This step is pretty straight-forward. After creating a bootable drive with Ubuntu just boot from the flash-drive using a one-time-boot menu (F12) and follow the on-screen instructions.

Partitioning SDD drive for Ubuntu installation

I have a 1 TB SSD drive and I have partitioned it the following way:

  • Windows and shared:
    • System - 90G
    • Shared Data - 600G
  • Ubuntu
    • / - 36G
    • /home - 274G
    • SWAP - 18G (Though it's recommended to have twice of RAM on SWAP I think allocating 64G for SWAP would be an overkill.)

Note: after installing Windows OS I have left the rest of the space unallocated and partitioned the rest during ubuntu installation.

Additional read:

Dell Precision 5530 tweaks for Ubuntu

The first step I took after installing Ubuntu is running a script from this repo: DELL XPS 15 9570 Ubuntu 18.04 respin and post installation script

To run the script without cloning the repo execute the following command (requires curl):

bash -c "$(curl -fsSL https://raw.githubusercontent.com/JackHack96/dell-xps-9570-ubuntu-respin/master/xps-tweaks.sh)"

Or clone the repo and run from the cloned dir (requires git):

$ cd ~ && git clone [email protected]:JackHack96/dell-xps-9570-ubuntu-respin.git
$ sudo /bin/bash ~/dell-xps-9570-ubuntu-respin/xps-tweaks.sh

This will install several drivers (including prime drivers for nvidia/intel graphics) and add some extra tweaks to the OS.

Creating shared drive for Ubuntu and Windows

Installing software packages and drivers

This is an optional list of things that I use. Feel free to skip entirely or pick out what you might need.

Packages: (This should be moved to install script)

  • VPN
    • install openvpn network manager for gnome shell $ sudo apt-get install network-manager-openvpn-gnome - without this package I was unable to import openvpn config file via Settings -> Network menu, nor connect to any of the remote host adresses using openvpn client from cli.
    • Install openconnect network manager for gnome shell $ sudo apt-get install network-manager-openconnect-gnome
    • Go to Settings -> Network -> Modify vpn settings -> IPv4 -> Use this connection only for resources on its network -> Save JDK - https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-18-04 Gnome extensions and tweaks
    • $ sudo apt install stow
    • $ sudo apt install xclip

Gnome Shell Extensions

First install $ sudo apt install gnome-shell-extensions gnome-tweaks

Then install the following extensions:

Optional software

Useful tips and tricks

Some useful command-line tricks:

  • To see the history of all changes made with apt(credits):
$ (zcat $(ls -tr /var/log/apt/history.log*.gz); cat /var/log/apt/history.log) 2>/dev/null | \
    egrep '^(Start-Date:|Commandline:)' | \
    grep -v aptdaemon | \
    egrep -B1 '^Commandline:'
  • To see the history of all apt(-get)? install commands(without dates):
$ (zcat $(ls -tr /var/log/apt/history.log*.gz); cat /var/log/apt/history.log) 2>/dev/null | \
    egrep '^(Commandline: apt(-get)? install)' | \
    grep -v aptdaemon | \
    egrep '^Commandline:'
  • To see the history of all apt(-get)? (remove|purge) commands(without dates):
$ (zcat $(ls -tr /var/log/apt/history.log*.gz); cat /var/log/apt/history.log) 2>/dev/null | \
    egrep '^(Commandline: apt(-get)? (remove|purge))' | \
    grep -v aptdaemon | \
    egrep '^Commandline:'
  • Change the duration logs are kept for dpkg and apt:
$ sudo vim /etc/logrotate.d/apt
# change rotate from 12 (months) to any other value
$ sudo vim /etc/logrotate.d/dpkg
# same as above

Remapping keyboard keys

https://superuser.com/questions/417568/setting-hyper-and-super-modifiers-for-certain-keys-with-setxkbmap-or-xmodmap https://askubuntu.com/questions/749660/how-can-i-persistently-remap-keys-in-ubuntu-16-04 https://askubuntu.com/questions/423627/how-to-make-hyper-and-super-keys-not-do-the-same-thing?noredirect=1&lq=1

Fixes and Troubleshooting

Windows won't boot without ACHI mode

  • Run a Command Prompt (Admin)
  • Set reboot on safe mode, typing this command: bcdedit /set safeboot minimal
  • Restart and enter BIOS Setup
  • Change the SATA Operation mode to AHCI
  • Save changes and exit Setup
  • Windows will automatically boot to Safe Mode
  • Run a Command Prompt (Admin)
  • Set reboot to normal Windows, typing this command: bcdedit /deletevalue safeboot
  • Reboot once more and Windows will automatically start with AHCI drivers enabled

Fixing DNS resolutin on Ubuntu 18.04+ when connected to OpenVPN

After some time of using Ubuntu I've noticed that connecting to VPN (with an option "Use this connection only for resources on this network") did not automatically resolve DNSs on that network.

Issuing systemd-resolve --status with VPN connection with disabled "Use this connection only for ..." option produced the following output:

Link 10 (tun0)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 10.xxx.xx.xx
          DNS Domain: ~.

Whereas enabling "Use this connection only for ..." option produced:

Link 10 (tun0)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Option 1 (didn't work for me, but kept as a possible solution for reference)

  • Install openvpn-systemd-resolved with sudo apt install openvpn-systemd-resolved or by following instructions in the jonathanio/update-systemd-resolved
  • Enable stub resolver sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
  • Modify openvpn conf by adding the following lines (At the beginning of the config file.)
    script-security 2
    setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    up /etc/openvpn/scripts/update-systemd-resolved
    up-restart
    down /etc/openvpn/scripts/update-systemd-resolved
    down-pre
    

Source

Option 2 (this helped fix the issue and DNS were again resolving automatically on establishing VPN connection)

Execute:

nmcli c modify <vpn-settings-name> ipv4.dns-search '<domain>'

where <vpn-settings-name> is the name of the VPN connection as displayed in Network Manager, and <domain> is the DNS search domain, i.e. example.com

Option 3 (this helped with a diffevent vpn connection, also openvpn)

Add the following lines at the end of the client.ovpn config file before importing it:

script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

Note: Try combining with Option 2

Source: https://openvpn.net/vpn-server-resources/connecting-to-access-server-with-linux/

KDE Plasma Desktop Not Saving Desktop Settings

https://bbs.archlinux.org/viewtopic.php?id=218052 https://unix.stackexchange.com/questions/150513/how-do-i-stop-kde-from-changing-my-screen-resolution https://askubuntu.com/questions/299241/how-to-reset-kde-display-settings-after-a-move-to-a-new-machine

Tried the following:

  • switching to intel video and back
  • some suggestions from above links

KDE does not connect to VPN (openvpn and openconnect) through NetworkManager

Could not find a solution to this as of now. Had to go back to Gnome because of this issue.

Useful links

Using boot-repair tool to fix Windows boot
Disabling Secure Boot in Windows
Recovering Ubuntu after installing Windows

Extra links and thanks

Releases

No releases published

Packages

No packages published