Dual Boot Windows 10 and Ubuntu 16.04 on Thinkpad T560

On Carmine, a Thinkpad T560

Back up Windows

See also http://www.everydaylinuxuser.com/2015/11/how-to-install-ubuntu-linux-alongside.html

  1. Start Windows
  2. Download Reflect http://www.macrium.com/reflectfree.aspx
  3. Run the installer and accept all the defaults
  4. Insert USB drive and format with Windows Explorer
  5. Start Reflect
  6. At “Rescue Media” prompt, create USB with defaults
  7. Reboot with recovery USB drive to test it
  8. Reboot into Windows and start Reflect
  9. Select Other Tasks > Edit Defaults > Network tab
  10. Add \\ds411p2\home with NAS credentials
  11. On the Disk Image tab and Create a backup tab, select Image this disk
  12. Backup to \\ds411p2\home\{computer}-backup
  13. Select Other Tasks > Add Recovery Boot Menu Option, select Windows PE 10.0 menu (64 Bit)
  14. Reboot to make sure the boot menu comes up.
  15. Select Windows 10

Install Ubuntu 16.04 with LVM

See also http://askubuntu.com/questions/470632/install-lvm-dual-boot-with-windows

  1. Start Disk Management (called “Create and format hard disk partitions, Control panel” on the start menu)
  2. Right-click on the Windows NTFS partition and select Shrink Volume.
    1. The maximum shrink is the default, though the volume will still be a lot larger than the space used by Windows. In this case, the Windows partition was 237 GB before and 121 GB after, even though Windows reports C: was using only 31 GB.
  3. Boot into BIOS setup. On Config tab, select Keyboard/Mouse and change “F1-F12 as Primary Function” to Enabled
  4. Boot from Ubuntu 16.04 USB
  5. Start gparted.
    1. You can ignore a warning that “the driver descriptor says the physical block size is 2048 bytes but Linux says it is 512 bytes.”
  6. Create a primary partition with the rest of the space, file system “lvm2 pv” named and labeled “lvm”
  7. Apply settings.
    1. Note the lvm partition, e.g. /dev/sda5.
  8. Open a terminal and set up the volume groups
    sudo pvcreate /dev/sda5
    sudo vgcreate volgroup1 /dev/sda5
    sudo lvcreate -n swap -L 16g volgroup1
    The size of the last command is equal to RAM
    sudo lvcreate -n ubuntu16.04 -l 33%FREE volgroup1
    The “-l” in the last command is a lower case L.
  9. Check logical volumes with “sudo lvscan”:
    ACTIVE '/dev/volgroup1/swap' [16.00 GiB] inherit
    ACTIVE '/dev/volgroup1/ubuntu16.04' [31.83 GiB] inherit
  10. Close the command prompt.
  11. Start “Install Ubuntu 16.04 LTS” from the desktop icon.
  12. Enable “Download updates while installing Ubuntu” and “Install third-party drivers” and “Turn off Secure Boot”.
  13. Set the password and store it someplace.
  14. At “Installation Type”, select “Something else”.
  15. Click on volgroup1-swap and change the type to “swap”
  16. Click on volgroup1-ubuntu16.04 and change the type to ext4, format and mount /.
  17. Leave the boot loader device at /dev/sda.

Uncategorized

Comments (0)

Permalink

CyanogenMod 13 Update 20160816 on Nexus 5

A snapshot update became available for my Nexus 5 this week. Here’s how to perform the upgrade:

  1. On the phone in Settings > About Phone > Updates, remove any old updates you don’t need
  2. Download the update to the phone
  3. Back up the current ROM
    1. Make sure Privacy Guard is disabled for ROM Manager–if it’s not, the backup operation will just reboot the phone
    2. Make sure there’s enough space on the phone for a backup–backups need about 7 GB
    3. Perform a backup with ROM Manager
      1. It will show the path of the backup, in this case /sdcard/TWRP/BACKUPS/06c2deb6006b0cb2
      2. When asked for the name of the backup, whatever you name it will end up as a directory in the path above
    4. After the backup, the phone will reboot
    5. Save the backup to computer with sudo adb pull /sdcard/TWRP/BACKUPS/06c2deb6006b0cb2
  4. Under Settings > About Phone > Updates, select the phone icon to the right of the downloaded update and choose “update”
  5. TWRP will install the update and reboot the phone
  6. Android will update all the apps–no GApps update is required for updates of the same CyanogenMod version

Uncategorized

Comments (0)

Permalink

Installing KeePassX 0.4 on Ubuntu 16.04

Download the KeePassX 0.4 .DEB from  https://launchpad.net/ubuntu/xenial/amd64/keepassx/0.4.3+dfsg-0.1ubuntu1

sudo dpkg -i keepassx_0.4.3+dfsg-0.1ubuntu1_amd64.deb

sudo apt-get install -f

Uncategorized

Comments (0)

Permalink

Upgrading Jennings to Ubuntu 16.04 from 14.04

Jennings is a Lenovo K450E with an NVidia GTX 750 graphics card.

During the upgrade, two files were flagged as modified from the installed versions.  One was for Cups, the other for XSane.  Both of these changes were for a Lexmark Pinnacle Pro901 all-in-one printer using the legacy-1 driver.  The changes looked like the older versions might not work with the new software.  Since I have documented here what was required to get the Lexmark working, I chose the new files.  After the upgrade, I’ll need to check that printing and scanning still work and reapply the fixes if necessary.  (Printing left files sitting in the queue forever–reinstalling the printer drivers fixed the problem.)

The NVidia graphics card was not supported when I installed Ubuntu 14.04 and it’s still not supported with Ubuntu 16.04.  After the upgrade was finished, a reboot was required.  The graphical log-in screen never came up.  The fix for the driver issue is to replace the default nvidia drivers with nvidia-364:

  1. Log in to your account in the TTY
  2. sudo apt-get purge nvidia-*
  3. sudo add-apt-repository ppa:graphics-drivers/ppa
  4. sudo apt-get update
  5. sudo apt-get install nvidia-364
  6. Reboot

One other issue I had was that KeePass 0.4 is no longer included with the Ubuntu distribution.  I’m currently using a version 1 database because a few years ago it was the only version supported on all my devices (Ubuntu, Android and Windows).  KeePassX 2 can import the version 1 database used by KeePassX 0.4, but it’s a one-way upgrade.  My options are to upgrade on all my devices and switch to the version 2 database or manually install KeePassX 0.4.

Uncategorized

Comments (0)

Permalink

Android Phone Finder Update

A few years ago, I used a combination of Google Voice, Tasker, Secure Settings, Dropbox and Dropsync to enable finding my phone by sending a text message to it.  I documented the first part of the project, which included detecting the text message and turning on GPS, and using Google Latitude to find the phone.  Latitude isn’t around anymore, though you can track location in Google+ now.

At some point after that, CyanogenMod added a feature to their CyanogenMod Account that would let you find your phone and remotely wipe it as well, so I switched to that.  Earlier this year, however, they discontinued that feature and moved it to their C-Apps.  There are privacy issues with C-Apps, so I didn’t want to use it.  As a result, I tried to resurrect the old hack.  Although I had switched from the Google Voice app to the Hangouts app as my text messaging client, the process still worked, with a few tweaks.  Here it is:

Set up Tasker and Secure Settings to detect a text message.  Make sure you select the right text messaging client.  For me that’s now Hangouts.  Create an associated task that does the following:

  1. Variable Set–Name %GPS_WAS To %GPS
  2. Secure Settings–Configuration GPS Enabled
  3. Get Location–Source GPS Timeout (Seconds) 90
  4. Write File–{a dropsync-enabled file} Append Off
  5. Secure Settings–Configuration GPS Disabled if %GPS_WAS ~ off

Steps 1, 2 and 5 will turn GPS on to get the location, then turn it off after, but only if it was not already on.

In step four, you have to write a file to a location that is synchronized by Dropsync to a DropBox folder.  Here’s the contents of that file:

<html><body>
%DATE %TIME<br>
%LOC accurate to %LOCACC meters<br>
Altitude %LOCALT meters<br>
Speed %LOCSPD meters/second<br>
<a href=”http://maps.google.com/maps?q=%LOC“>Map</a>
</body></html>

The process takes a minute or two to update the file.  The delay is almost entirely due to waiting for the GPS to get a coordinate fix.

Uncategorized

Comments (0)

Permalink

ROM Manager and TWRP Problems on new CyanogenMod 13 Installation

After installing CyanogenMod 13 on my Nexus 5, ROM Manager failed to back up the current ROM or reboot into recovery. Both of these actions just rebooted the phone. It was possible to manually reboot into recovery and perform a backup, but ROM Manager could not see it. The problem was that although root access was enabled in Privacy Guard for ROM Manager, it was not enabled for the OS in Settings -> Developer Options.

Uncategorized

Comments (0)

Permalink

Upgrading Nexus 5 from CyanogenMod 12.1 (Lollipop) to 13.0 (Marshmallow)

CyanogenMod 13.0 release post

  1. On the phone, perform a Nandroid backup from ROM Manager
  2. Under Settings > Developer options, enable Android debugging
  3. Connect the phone via USB to your computer
  4. On your computer, run [sudo] adb pull /mnt/shell/emulated/clockworkmod/backup
  5. Remove all backups on phone other than the most recent with adb shell
  6. Update to the latest TWRP image
  7. Under settings > About Phone > CyanogenMod Updates, download the update–it will go in /sdcard/cmupdater
  8. Download Google Apps for CyanogenMod 13 (ARM, 6.0, Nano)
  9. Send the package to the phone with adb push file /sdcard/.
  10. Unplug the phone
  11. Boot into recovery
  12. Wipe the System, Cache, & Dalvik partitions
  13. Install the CM snapshot and Open Gapps package

If you trigger an assert violation (radio, bootloader, etc), fulfill the requirement it complains about. These asserts are in place to make sure your firmware matches what CM13/Android 6.0.1 needs and you can actually use your device/phone as a device/phone.

I got repeated errors that com.android.phone has stopped.  This is the fix:

adb shell
rm -fr /data/data/com.android.providers.telephony/
rm -fr /data/data/com.android.phone/
exit

Uncategorized

Comments (0)

Permalink

Install Team Win Recovery Project (TWRP)

Install TWRP Manager on the phone (requires root):
http://play.google.com/store/apps/details?id=com.jmz.soft.twrpmanager

Uncategorized

Comments (1)

Permalink

Netflix Broken on Chrome

In the past, Netflix would not work in Linux without jumping through hoops. About a year ago or so, Netflix added support for Chrome under Linux. This worked fine with no extra steps required.

Today, however, I loaded up Netflix for the first time in a while and the web page was broken. Missing links, text that should have been links, missing graphics–totally unusable. A little Googling turned up that some extensions can break Netflix. AdBlock is one of them. The solution is to whitelist netflix.com in the extension. Unfortunately, I had already done that. The next step is to disable extensions one at a time to find the guilty party. This time it was Privacy Badger. Luckily, it has a domain whitelist setting also. Adding www.netflix.com fixed the problem.

Uncategorized

Comments (0)

Permalink

SSH X Forwarding when using Sudo

When you ssh -X to a host, SSH handles X forwarding for you. However, if you run a sudo command in that session, the process breaks down. Here’s how you can make it work:

you@local$ ssh -XC server
you@server$ xauth list
 [output]
you@server$ sudo su - otheruser
otheruser@server$ xauth add [paste output from "xauth list"]
otheruser@server$ xterm (or other X application)

Source: http://backdrift.org/x-forwarding-sudo-ssh-session

Uncategorized

Comments (0)

Permalink