Windows and Ubuntu Dual Boot on an x64 LattePanda
Matt
2017/04/26
Introduction
This guide will walk you though how to dual boot Windows 10 and Ubuntu 16.04 LTS on a 4GB x64 LattePanda with Z8350 processor.
Note that at the time of writing driver support under Linux is limited, but essential features such as WiFi, Bluetooth, DSI, HDMI and Audio work well. You can find information in our Linux discussion on our official forum.
Step 1: Shrink your Windows 10 Partition
- Boot in to Windows 10
- Right click on the Windows 10 logo in the taskbar
- Navigate to
Disk Management
- Right click on your Windows 10 partition
C:/
and select Shrink Volume
Choose the shrink size you would like. This will become unallocated space on your drive that you can then use to install Ubuntu (or another Linux distribution). The amount of space will vary according to your needs. We allocated 15 GB (15000 MB).
Step 2: Make an Ubuntu 16.04 LTS Boot Disk
We have prepared a toolpack that has all the necessary files to create an Ubuntu boot disk.
You will also need to download the Ubuntu 16.0.4 LTS image
-
Burn the Ubuntu image to a USB drive (at least 4 GB). Our toolpack includes a utility to do this.
-
Insert your USB drive to a free USB port on the LattePanda, and reboot the machine. When the LattePanda boots, you will be greeted by the Ubuntu GRUB.
-
Select Install Ubuntu
-
Install the system on the unallocated space you created earlier. Click through all the default settings for now, you can install updates later.
-
When the system is installed, reboot the LattePanda.
At this stage it will boot in to Windows 10 by default, so we need to edit the boot manager settings.
Step 3: Edit Boot Manager Settings
-
Press the Windows Key on your keyboard, type cmd
, and then right click the command prompt application
-
Click Run as administrator
-
Type the following command: bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
-
Hit enter and await confirmation
-
Reboot
-
When the LattePanda boots, you will be greeted by the Linux GRUB, which will enable you to select which operating system to boot in to
A this stage you have two operating systems, but you will need to do some tweaking to get all the hardware recognized by Ubuntu.
Step 4: Configuring WiFi/Bluetooth Drivers in Ubuntu
-
Download the Kernel Patch Kit and unzip it to a USB stick
-
Connect a USB keyboard and mouse to the LattePanda
-
Hit esc repeatedly on boot to get in to the BIOS
-
Navigate to: chipset > south bridge > LPSS & SCC configuration > SCC SDIO support
-
Change SCC SDIO support
from ACPI Mode
to PCI Mode
-
Press F4
to save settings and exit
-
Boot in to Ubuntu
-
Dump the file ubuntu16.04_patch_20170223.tar
somewhere. In this example I stored it on the root of a USB stick that was mounted to the filesystem.
e.g.
cd /media/lattepanda/usbstick/
-
Open a terminal (Tip: ctrl+alt+t
opens one in Ubuntu)
-
Run the following commands:
sudo su
cd /<stick/directory>
(in my case this was /media/lattepanda/usbstick/)
unzip tar xf ubuntu16.04_patch.tar.gz
Tip: Hitting the tab key will auto-predict filenames to save you typing them all out
-
When it has unzipped successfully, navigate to the directory that it has created and run the provided install script (make sure you are running as root):
cd ubuntu.16.04_patch
bash ./install1210.sh
-
Wait for the process to complete.
Step 5: Edit grub.cfg
-
Still running as root, navigate to grub directory
cd /boot/grub/
-
Backup grub.cfg
so you can revert back to it in case of any disasters
cp grub.cfg grub.cfg.old
Now you have a version to revert to if you run in to issues
-
Change the permissions of grub.cfg
so you can read, write and execute the file
chmod 777 /boot/grub/grub.cfg
-
Edit grub.cfg
using your favourite text editor. We used nano.
sudo nano /boot/grub/grub.cfg
Tip: In nano you can press ctrl + w
and type part of the name to find matching entries
-
Search for the following section:
export linux_gfx_mode menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-3a08ec07-2677-499e-9638-aea4af1c9d0d' { recordfail load_video gfxmode $linux_gfx_mode insmod gzio if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi insmod part_gpt insmod ext2 if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root 3a08ec07-2677-499e-9638-aea4af1c9d0d else search --no-floppy --fs-uuid --set=root 3a08ec07-2677-499e-9638-aea4af1c9d0d fi linux /boot/vmlinuz-4.4.0-21-generic.efi.signed root=UUID=3a08ec07-2677-499e-9638-aea4af1c9d0d ro quiet splash $vt_handoff initrd /boot/initrd.img-4.4.0-21-generic }
-
Search for this line within the section:
vmlinuz-4.4.0-21-generic.efi.signed
Change it to:
vmlinuz-4.4.0-2017022104
-
Search for this line in the same section:
initrd.img-4.4.0-21-generic
-
Change it to:
initrd.img-4.4.0-2017022104
(Take note that UUIDs will vary for your system. Leave them as they are, they do not need to be changed).
!!Double check how you have named your files, or your system wont boot and you will have to run extra steps to restore it!!
- Press
ctrl X
and then Y
to save and exit, and then reboot
When the system boots again you should now have working WiFi and Bluetooth.
Troubleshooting
Boot Error
If you have an error in grub.cfg, the system will not be able to boot. You will need to revert to the grub.cfg.old
file we made earlier.
- Boot in to recovery mode
- Navigate to
/boot/grub/
cd /boot/grub/
- Delete or rename
grub.cfg
and replace with the backup file you made earlier by running mv grub.cfg.old grub.cfg
- Reboot by running
reboot
You should now be able to boot Ubuntu, but you will need to repeat step 5 onwards.
Porting Linux to the LattePanda
Porting Linux to the LattePanda is an ongoing project and we welcome all feedback about your user experience using Linux. Under this version of Ubuntu we have the following working successfully:
- WiFi
- Bluetooth
- USB 2
- USB 3
- HDMI
- DSI Display
- Arduino
- Audio Out
We are still working on:
- Ethernet
- SD
- Touch Overlay
Feedback is appreciated, so keep us updated with your results or alternative methods on our Linux thread.
Known Issues
SD Card as a Bootdisk
- Using a class 10 SD card piggybacked on to a USB adapter will cause the Ubuntu installer to fail in some cases. Consider alternatives if possible.
Bad HDMI Output
- The HDMI output is sometimes disrupted on boot. Generally hitting the reset button will fix this.