Tuesday, 16 June 2020

How I added a Xubuntu partition

Below are a set of notes I made while adding a Xubuntu partition to my Windows 7 machine.

They are my rough working notes - use with care!

How to add a Xubuntu partition to a Windows 7 machine

This is not a guide it's a note that I wrote as reminder to myself. 
It is not a definitive set of instructions. 
As always your mileage may vary.
Playing with partitions can be destructive and you may lose data or 
brick your machine if things go wrong. 

Think carefully before doing this and make sure you have a backup of your data

Assess your machine

I have only done this on machines with a traditional hard disk - 
this has not been tested on an SSD based machine
  • check the size of the existing hard disk
    • you will probably need between 75 and a 100GB to make a usable Xubuntu partition for useful work. If you just wish to use it to run a quick start web browser and a basic editor 50 to 75GB may be enough
    • check the amount of data currently used by windows. To give yourself adequate headroom double it for the partition size
    • thus if you have a windows machine with a 300GB disk, and you have used a 100GB, you would give 200GB to Windows and 100GB to Xubuntu
    • Do not reduce the size of the Windows partition below 75GB
  • check that you can boot your machine from a usb device and the bios is not locked in some way
    • Dell machines usually require you to press F12 when the Dell logo appears during startup
    • Lenovo thinkpads usually prompt you to press Enter during startup
    • use Rufus to make a bootable volume - Rufus can be downloaded from https://rufus.ie/
    • slightly outdated documentation on using Rufus https://linuxhint.com/rufus_bootable_usb_install_ubuntu_18-04_lts
    • download the Xubuntu 20.04 LTS iso file from Xubuntu.org
    • using a blank USB drive (minimum size 8GB) use Rufus to write a bootable USB stick
    • on the machine that you intend to install the partition, boot from the USB stick
    • verify the stick contents pass self test and the system boots into the Xubuntu environment
  • click on Try Xubuntu and check basic functionality
    • check the mouse works
    • check the keyboard works
    • check wi-fi works (you will need your wi-fi password)
      • performance may be slightly slow, especially program load as you are running off a usb stick
    • reboot the machine

Installing Xubuntu

  • power cycle and boot your machine from the USB stick
  • click on Install Xubuntu
  • answer the questions to specify keyboard etc
    • procedure detailed at
https://linuxconfig.org/how-to-install-ubuntu-20-04-alongside-windows-10-dual-boot


  • specify the partition table size by dragging the slider to adjust the sizes in line with what you originally decided
  • answer the scary questions about whether you really want to do this
  • wait while xubuntu resizes the partitions
  • continue the installation process
  • remove the boot media and reboot
  • Boot into Xubuntu and check everything works

    • check the mouse works
    • check the keyboard works
    • check wi-fi works (you will need your wi-fi password)
    • reboot the machine

    Boot into Windows and check everything works

    • run chkdsk when prompted
    • log into windows when prompted
    • check everything still works
    I found I had to reinstall OneDrive and do a resync - unsure if this was due to repartitioning the disk or if it was broken anyway
    • you’re now done - enjoy (remember you may need to install additional applications and configure printing on your Xubuntu install)


    Monday, 15 June 2020

    Adding a Xubuntu partition to a production Windows 7 machine ...

    Windows 7 was in many ways an admirable operating system, but one of its major problems was its slow startup and shutdown times,

    On a desktop computer, this didn't matter much, basically you never bothered to reboot them unless necessary  and then a restart or planned shutdown was an excuse for an extended coffee break or informal meeting. However on a laptop being used as a portable machine it was a pain - while there were tricks like Alt-F4 to force a quick shutdown when running for a flight, startup was always tedious - I've lost count of the number of times I've spent making polite conversation to people while my laptop booted.

    Windows 10 is much better - faster startup, faster shutdown, and no irritating mandatory updates at inappropriate moments.

    Well, the old Thinkpad X230 I bought a couple of years ago is still stuck on Windows 7 due to its role as a backup machine for the Dow's Pharmacy documentation project, and is probably not worth upgrading to Windows 10, given that I always intended it to become a linux machine after the end of the project.

    Unfortunately, due to the Covid-19 lockdown, I've lost nearly three months, and instead of being finished sometime around the end of winter, January next year looks more realistic.

    The machine is quite a nice machine to work with in an extended session but a pain for a quick looksee operation due to the slow startup time.

    After my success making a dual boot work machine, and given that the disk was only about 25% full, I decided to sacrifice around 100GB of the unused space to make a Xubuntu partition - I could probably have made it smaller if I had to, but I had the space anyway.

    The idea was to build a quick boot partition and add a minimal set of applications to allow for work in a quick startup/quick shutdown situation.

    This isn't an original idea. HP to name but one, used to sell laptops where you could boot into what they called Quickweb - a minimal web based environment to allow you to check email etc.

    So, to do this I used the repartioner in the Xubuntu installer to shrink the windows partition, and did a vanilla install of Xubuntu - this gets you Firefox, Libre Office, Thunderbird, and the Ristretto image viewer in the box - essentially all you need to do useful work.

    To this I added Focuswriter for quick distraction free writing, ReText for MarkDown editing, and Notable as a way of grouping together notes.

    I didn't install printing and I reckon that material can be uploaded or downloaded from OneDrive/Google Drive/iCloud as required via a web browser.

    Making the Xubuntu partition just worked. Utterly unexciting.

    Shrinking the Windows partition also worked smoothly. As always, it wanted to run chkdsk afterwards to verify the volume integrity - which it passed with flying colours.

    The only problem I found was that the OneDrive widget had gone stupid on me and required to be reinstalled - whether due to my shrinking the partition or some other cause I don't know, and this then required a massive resync with the cloud instance - all 64 GB of it - which took several hours.

    Painful, tedious but ultimately a fairly straightforward mechanical process.

    However, in the end it was worth it - I still have an alternative machine to keep working with should disaster strike the project machine, and I also a have quick start linux based machine to get work done in these boring half hours waiting for trains that never come ...

    Friday, 5 June 2020

    Notable ...

    When I built my Xubuntu machine for research I suggested installing Standard Notes as a notes management application.

    I didn't install it at the time but yesterday I started a little project on the Yelverton case to track its coverage through newspapers of the time.

    I'd forgotten how sparse and featureless Standard Notes was without a paid subscription, so much so that it was useless to me. I guess I could have used CherryTree, which I've used in the past, but instead I though I'd try Notable, which has a feature list similar to that of CherryTree back in 2017 when played with it, but with one important addition - MarkDown support.

    For some people this might well be a hindrance, but given that I usually use MarkDown when writing notes to give myself some semi structured text, to me it's an advantage.

    There's also a windows client, meaning that if you add Google drive support to both your Xubuntu and Windows machines you can share the database between the two machines.

    I havn't played with it extensively yet, but from a bit of work I did yesterday, it's looking good ...

    Sunday, 31 May 2020

    Making a wordcloud for the Waterloo Bridge mystery

    Remember wordclouds?

    A few years ago they were incredibly popular as a way of visualising the key themes in a document.

    Just for fun, and out of curiosity, I decided to use the accounts from the Mount Alexander Mail of the murder and the inquest to pull our the key themes.

    There's nothing special about using the Mount Alexander Mail - they had more or less the same syndicated reports as other newspapers, but the OCR'd text in Trove was among the cleanest.

    For the wordcloud software I used the IBM java wordcloud package - the same one as I used some years ago, and which I'd forgotten was (a) tortuous to install - for some reason my Xubuntu machine did not install OpenJDK 8 as a default (b) needed  some modifications to the startup script to work on Xubuntu, but I got there - you can see the results from working with the defaults stopwords file at the top of this post

    I then 'borrowed' a stopwords list from a nineteenth century literature research site, rather than using the default, and came up with a slightly different wordcloud:



    I don't think you actually learn much from either wordcloud, other than the stories were concerned with bones, blood, the bag, and the clothes, but it was a fun exercise for a wet and blowy Sunday afternoon ...

    Thursday, 28 May 2020

    Coronavirus, lockdown, and old machines

    Earlier today, the ABC had a post about the difficulties poorer families encountered while trying to homeschool their kids during lockdown.

    Naively, one might have thought using older hardware with a lower demand operating system might be a help to them.

    Not really, while it's true that using Linux and LibreOffice would give you a low cost and licence free environment, and given that most online schooling is is web based, it should be a no brainer.

    Nope.

    There are costs associated with moving to linux. The first, most obviously is that not everyone has the technical skills to install linux onto an old machine, and ideally you need a decent internet connection.

    In fact you need someone to do the install for you.

    Consider, if you've only got a 10GB a month data allowance the 1.5-2GB download is a big chunk of your monthly allowance.

    And remember, if you are renting, and on benefits, as so many people are now, an extra $60 a month for even a basic NBN package is a lot of money, and you may be worried about being able to pay for it over the 24 month contract term.

    And surprisingly, a lot of people get by with a phone or an ipad on a monthly cellular contract. One of the reasons that the queue's at Centrelink offices were so long with people filing claims was not only that the system was over capacity, but also the public libraries had been closed - a lot of people rely on the public machines when they need to do something that needs a keyboard.

    When I've been doing some research in a public library I've always been amazed at how well used these public access machines are - now I know why.

    And of course, there's the question of ongoing support - people will need support. Things go wrong, and sometimes people simply won't have the knowledge to to work round a problem.

    There needs to be a support framework.

    And also some commitment from the educational system. Telling kids to put their work in an excel spreadsheet or word document isn't helpful.

    The teaching materials need to be product agnostic. By all means tell them that if they use LibreOffice they need to save that essay in docx format for upload, or export the spreadsheet as xlsx from Google Sheets, but don't tell them they should be using particular software packages.

    Of course, this requires that teachers, educators, and support staff have to be familiar with a range of software and environments, which means training, which probably isn't going to happen any time soon.

    But we should take a look at what actually happened during the great home schooling experiment, and think very hard about what we can do to end the digital divide.

    It doesn't have to be expensive. It doesn't need a lot of shiny new kit. But it does need some careful thought.

    Building a Xubuntu machine for research

    Earlier this month I posted about building a Xubuntu based machine for fieldwork.



    At the time it was difficult to get hold of suitable machine machine - basically all the reasonable second hand machines hand disappeared due to either working from home, or with kids having to be home schooled, the need for people to get a cheap extra second machine.

    However, I manged to get hold of an old Dell E6320 ( i5, 4GB RAM, 500GB HDD) for a little under two hundred bucks, that I reckoned would be powerful enough to run R to do some (very simple) text analysis to establish the vocabulary used in Victorian murder reports, and OCRfeeder to take pdf's of Victorian murder reports and extract the text.

    I decided I needed a newer machine because while capable, my old Inspiron did grind a little when asked to do anything serious.

    An odd hobby to be sure, but fairly harmless.

    The machine arrived yesterday. In practice a little bigger than I imagined - lesson learned, don't go on the screen size, go on the sizes from an old review - and slightly more battered than ideal, but everything worked and the screen was nice and bright.

    I'd previously made myself a bootable Xubuntu USB stick for my initial experiments on my old Inspiron, so I used that.

    First problem - I couldn't change the boot volume from the internal hard disk to the USB stick. Most Dell's I've installed linux on you just need to hit F12 once the Dell logo appears, and after a few seconds you end up in the boot selection menu.

    Not this one. I tried holding down F12, which works on some manufacturers, I even tried an external keyboard to check if the key was faulty. I ended up resorting to Google. It turns out that on the E6320 (and some similar machines) you need to rapidly tap on the F12 key during startup until a message in yellow appears in the top right hand corner, and then you end up in the device selection menu.

    After that, installation was basically the case of following the bouncing ball. The machine had come with Windows 7, and I decided to keep a small Windows 7 install just in case I ever needed to run some windows only software.

    The Xubutnu installer included a nice graphical partitioning tool to let you keep your existing Windows install. The default was to split the disk half and half, which would give each more than enough, but I decided that as I only needed a small windows install to go for a 25:75 split between Windows and Xubuntu. On a 500GB hard disk this gave Windows a more than reasonable 120GB.

    Everything just worked. Well except for the trackpad, which was a little slow and draggy. Strangely the little joystick thingie on the keyboard worked as well as an external mouse.

    As it was a $5 mouse from the office supplies store solved the problem.

    Software install was fine, network support was fine - it took me a couple of hours at most, including the F12 problem, to end up with a usable machine:




    Sunday, 24 May 2020

    Researching the Waterloo Bridge mystery

    I've recently blogged about the 1857 Waterloo Bridge murder, but I thought I would summarise how I researched the post:

    My initial search was some fairly dumb searches using Google and Wikipedia - usually if it's a well known case such simple searches turn up articles and books about it - this time I drew a blank so I moved on to Welsh Newspapers online which is free to search, and which turned up a number of  reports from the period.

    Unfortunately, Welsh Newspapers is not the easiest to print articles from - it operates more like a virtual microfilm viewer than anything else, meaning that is so long or multi column such that you can't easily do a screen grab using Snip'n'Sketch, you have to resort to taking notes on a second device such as an ipad, which is a bit silly.

    This time, I didn't do that, I repeated my search using the State Library of Victoria's historic newspaper databases, and printed out the relevant articles. I also used the print to One Note feature in Windows to save them to One Note as well in case I ever needed to go back to them.

    Printing the articles wasn't the whole of the story - I then worked through the articles, taking notes and summarising as I went.

    As it was a nice, sunny, late autumn afternoon, I did this sitting outside on the deck and used my MSI netbook for the task.

    The MSI has a very nice keyboard to type on, which is why I keep it around, but is distinctly underpowered for 2020 with only 1GB of RAM and a 2012 vintage Atom processor.

    That said it runs BunsenLabs linux perfectly well, and using ReText, it's highly responsive - add in two or three browser tabs and a running mail client it does grind a little, but for most writing purposes it's fine, and considerably nicer to work with than an ipad or my old Alcatel Android tablet and keyboard combo.

    The finished notes were then transferred to my Windows laptop via dropbox, converted to Word, and inserted into OneNote.

    Not the most elegant workflow, but one which I found to be the best given the various constraints (and the sunny weather)!