New Year’s resolution?

I really must write more in my diary, and more often.

I’ve been toying with the idea of keeping a public diary, perhaps by tagging entries in Org mode and running a script to extract the public ones. Then I would not need a separate tool and separate occasion to write a blog. It would be a sort of analogue to literate programming.

Cheese Thins 1

Made some cheese thins from a recipe on
Chocolate & Zucchini

Here is my variation on it (change because I simply used what I had
handy):

  • 170 grams grated 'semi-firm' yellow cheese. In this case Fyldig
    Norvegia, halvfast, modnet ost, 30% fett. This is a relatively new
    variant on Norvegia, which is probably Norway's best selling cheese,
    and it works well in this recipe.

  • 55 grams cheap spreadable margarine, Rema 1000's own brand.

  • 100 grams (3 1/2 ounces, about 3/4 cup) plain flour

  • 1/4 teaspoon salt, plus more for sprinkling

  • 1/4 teaspoon powdered paprika, more for sprinkling

Here is a picture from the website showing what they are expected to
look like:

Chocolate & Zucchini's cheese thins

The original calls for finely grated hard cheese but I found that
coarsely grated new style Norvegia worked well. I used perfectly
ordinary paprika and salt (actually Seltin reduced sodium salt).

First try was with half the given quantities. I have no food
processor so I simply mixed all the ingredients together with a wooden
spoon until they were more or less together then formed them into a
ball with my hands after that I rolled it out thin and folded it over
and rolled again several times to ensure that the cheese was well
distributed.

Rolled it up unto a compact roll about 5cm thick and put it in the
freezer for half an hour so that it would be firmer and hence easier
to cut.

Cut thin rounds, about 2mm thick or slightly thinner.

Cooked for 14 minutes on two trays at 180C in the centre of the fan
oven. I think this might have been one or two minutes too long.

Should add a picture of my own effort but that will have to wait until
tomorrow because they were all eaten.

xmlrpc and WordPress

Having a lot of trouble with Python and xmlrpc. It seems that an
immense amount of junk is being sent, apparently well formed junk but
the WordPress server still doesn't like it. It seems that the xmlrpc
library is creating a call that includes all possible document types
quite unnecessarily.

Meanwhile my functioning cUrl version has stopped working because I
included an ampersand in an image filename which by the time I try to
extract it has been replaced by an html entity name and of course
there is no such file, so I have to translate it back.

Well, now it isn't complaining any more. But it doesn't seem to be
uploading the image either. Or it is uploading it but is deleting the
image element instead of rewriting it with the proper url.

Examination of the html on wp confirms that the img src is broken,
only http:// remains.

It also reveals something else and that every line end in a hard
break. Why? Looks like markdown detects paragraphs by blank lines so
why does it end lines with a
element. But
Daring Fireball
says that markdown doesn't add breaks unless the line ends with two or
more space so it must be WordPress that is doing it. Examination of
the temporary file shows that markdown does not add breaks. So how do
I tell WP to not do it?

Cheese Thins 1

Made some cheese thins from a recipe on
Chocolate & Zucchini

Here is my variation on it (change because I simply used what I had
handy):

  • 170 grams grated 'semi-firm' yellow cheese. In this case Fyldig
    Norvegia, halvfast, modnet ost, 30% fett. This is a relatively new
    variant on Norvegia, which is probably Norway's best selling cheese,
    and it works well in this recipe.

  • 55 grams cheap spreadable margarine, Rema 1000's own brand.

  • 100 grams (3 1/2 ounces, about 3/4 cup) plain flour

  • 1/4 teaspoon salt, plus more for sprinkling

  • 1/4 teaspoon powdered paprika, more for sprinkling

Here is a picture from the website showing what they are expected to
look like:

Chocolate & Zucchini's cheese thins

The original calls for finely grated hard cheese but I found that
coarsely grated new style Norvegia worked well. I used perfectly
ordinary paprika and salt (actually Seltin reduced sodium salt).

First try was with half the given quantities. I have no food
processor so I simply mixed all the ingredients together with a wooden
spoon until they were more or less together then formed them into a
ball with my hands after that I rolled it out thin and folded it over
and rolled again several times to ensure that the cheese was well
distributed.

Rolled it up unto a compact roll about 5cm thick and put it in the
freezer for half an hour so that it would be firmer and hence easier
to cut.

Cut thin rounds, about 2mm thick or slightly thinner.

Cooked for 14 minutes on two trays at 180C in the centre of the fan
oven. I think this might have been one or two minutes too long.

Should add a picture of my own effort but that will have to wait until
tomorrow because they were all eaten.

Must Stop Jumping To Conclusions

2015-07-15 Wed 22:11 +0200

Message to self: read all the instructions.

Cloned MEGA's github repository:

git clone -b stable https://github.com/meganz/sdk.git

Then a quick skim of the readme and off I went with:

sh autogen.sh
./configure
make
sudo make install

Well at least that was the plan. In fact, of course, it didn't get as
far as make because I hadn't read the prerequisites carefully enough
so some libraries were missing. The fact that the same library has
different names in different Linux distributions didn't help. Of
course before I got everything properly installed I created a bug
report on github and almost immediately got a reply from
wizzard asking for the contents of
config.log which I added just as I realized which libraries were
missing. sergiohs84 also pointed out
what the libcrypto library is called on Debian/Ubuntu machines. Of
course I didn't see it in Synaptic earlier because I was looking for
what ./configure said it couldn't find: libcryptopp

My only, feeble excuse, is that my C++ days are long ago and all but
forgotten, I simply didn't see that pp == ++.

Anyway, after that it all ran very smoothly and the example
examples/megacli works perfectly as far as I can see with yet
another cursory glance.

So, thanks MEGA, wizzard, and sergiohs84.

Auntie Beeb is not what she was

The BBC seems to be in decline.

Here is an edited copy of an email I sent to a very good friend of
mine about a recent article on the BBC web site:
Heat pumps extract warmth from ice cold water.

Almost the first thing the article says is that Drammen is 40 miles
west of Oslo.

This makes me a little disinclined to take the article seriously. For
a start Drammen is slightly less than 40 kilometre from Oslo and the
direction from Oslo is roughly west by south west. 40 miles due west
of Oslo is in the middle of nowhere and there is no road. Nearest
town is Prestfoss about 10km away through the woods then by road it’s
over a hundred kilometre to Oslo.

It used to be that if the BBC said something then I just believed it.

And it gets worse. The article claims that the price of electricity
here is a penny per kWhr. While this is strictly true, in fact today
it is even less, in January I paid a total of NOK 2100 for 2579 kWhr
or NOK 0.81 per kWhr which is 7 pence today. My latest bill is NOK
863 for 1329 kWhr or NOK 0.64 per kWhr or fivepence.

The difference is of course because the price of electricity in Norway
varies wildly depending on the time of year and the water level in the
lakes. However to the basic price one must add the cost of
transporting that electricity. Here I can buy the electricity itself
from anywhere in the country but I always have to pay the local
company rent for the cables and pylons plus a per kWhr charge for
transport plus tax, etc. In fact right now the cost of transport is
higher than the cost of production.

So, much of the article is what they call here ‘en sannhet med
modifikasjoner’, a partial truth.

And then there is a paragraph about using gas boilers to heat water.
Well, there is no mains gas here so most people who use gas must buy
propane in 11kg canisters like I do for cooking. Now that’s fine for
cooking and one lasts five months but it costs NOK 200 and has a
calorific value of about 200 kWhr so it would not be a sensible
proposition for water heating even in the winter. I presume that the
author meant it to apply to the UK and some witless sub editor chopped
the article incompetently.

And then we have the suggestion that the Thames could heat half a
million homes with 1.25GW. That’s 2.5kW per home. That’s insane,
there is no way a properly insulated house in the south of England can
need an average of 2.5 kW to keep it warm, not even if you include
water heating. My total energy budget here is about 24MWhr per year
(18 from electricity plus 6 from paraffin) which is about 2.7kW
average for a house that is 40% bigger than the average for the UK and
where this January the night time temperatures were down to -15C
(unusually warm). And you have to remember that about 800W in this
house is the base load because of all the computers that are running
winter and summer.

Everyone should read David McKay’s Sustainable Energy – without the
hot air http://www.withouthotair.com/Electronic.html . He has some
pithy remarks on the subject of ground and water source heat pumps in
densely populated areas such as the UK. Perhaps I should declare an
interest, I provided one of the ebook versions that you can download
to read on a mobile :-).

One could say a lot more about the article (mostly negative) and the
district heating system it purports to describe (mostly positive) but
I think that’s enough ranting for now.

Kraków 8th..19th June 2015

The ongoing real ale revolution

Now that Poland has enthusiastically joined the movement for
interesting beer it’s odd to visit a restaurant (Ariel’s Restaurant in
Kazimierz) and find that they only have Zywiec and Heineken.

Cafés I like

NapNap on ul. Zwierzyniecka has good food, decent coffee and is
barefoot friendly. By barefoot friendly I mean more than simply not
throwing one out. One guy serving there said he tried it for six
weeks but the streets of Krakow were too tough for him. I suppose he
had a point, the cobbles in some places in and around Rynek Glowny are
a bit challenging with sharp edges, irregular gaps and so on but I
like it because of the wide variety of surfaces.

Another good one is just across the road: Amano. Some similarities to
the food in NapNap but in addition they sell beer; had a nice
unfiltered beer called Miłosław from Browar Fortuna.

And of course if you like to read while eating and drinking you should
visit Massolit Books on ul. Felicjanek. The menu is limited but
sufficient for snacking while browsing, usually quiche, rhubarb and
strawberry pie, sweet and dry cider, various coffees and teas. I
think they might also sell wine or at least used to. Of course the
main attraction is the bookshop which is one of the best English
language bookshops you can find anywhere especially for history,
social studies, language studies (grammars, readers, dictionaries for
all sort of languages including most European plus Chinese and
Japanese) they also have a small but deep selection of science books
(I got Hawking’s On the Shoulders of Giants there for a fraction of
it’s cover price).

Following instructions isn’t always easy

Need to update my Slacko stick

But there is no newer Firefox in Puppy it seems and I am too lazy to
go through all the creation of PETs when I want a new version.

A bit of web searching led me to
Freedom Embedded

So let’s see if I can follow the instructions.

They boil down to roughly this:

  • Create a disk image that corresponds in size to the size of the USB
    stick,

  • Obtain a Debian ISO image,

  • Boot QEMU with that image,

  • Install to the newly created image file, setting up file system
    type, swap, encryption, etc. as we go.

  • Shut down QEMU,

  • Copy the image file to the stick using dd.

So here we go.

To make slightly better use of time I’ll start downloading the Debian
image first so that it can work while I do the other steps. I’ll go
for a stable build instead of a daily. A quick look on debian,org
took me to this:

http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso

First make a directory for all this stuff then run wget to download
the image.

kj@otto:~$ mkdir ~/encryptedusb
kj@otto:~$ cd encryptedusb/
kj@otto:~/encryptedusb$ wget http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso
--2015-06-14 17:56:00--  http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso
Resolving cdimage.debian.org (cdimage.debian.org)... 130.239.18.173, 130.239.18.165, 2001:6b0:e:2018::173, ...
Connecting to cdimage.debian.org (cdimage.debian.org)|130.239.18.173|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://gensho.acc.umu.se/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso [following]
--2015-06-14 17:56:00--  http://gensho.acc.umu.se/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso
Resolving gensho.acc.umu.se (gensho.acc.umu.se)... 130.239.18.176, 2001:6b0:e:2018::176
Connecting to gensho.acc.umu.se (gensho.acc.umu.se)|130.239.18.176|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 330301440 (315M) [application/x-iso9660-image]
Saving to: ‘debian-8.1.0-i386-netinst.iso’

 5% [=>                                     ] 19,346,405   393KB/s  eta 10m 44s^C
kj@otto:~/encryptedusb$

Actually that took almost no time because it is the net install image.

Now we need to find the device name of the stick because we need to
find out how big it is. This is not something I do everyday so I have
forgotten how. I started Nautilus and an entry appeared in the
devices list on the left pane accompanied by a large box with an error
message which amongst a lot of other verbiage said:

Failed to mount '/dev/sdc1': Invalid argument.

and complaints about NTFS signatures being missing.

Some people,
superuser: How do I figure out which /dev is a USB flash drive?,
suggest using the mount command to find it but that won’t work
because it is not mounted. I also tried the suggested blkid without
getting any output at all.

In the end the most useful was this:

kj@otto:~/encryptedusb$ ls -l /dev/disk/by-id/*usb*
lrwxrwxrwx 1 root root  9 Jun 14 17:20 /dev/disk/by-id/usb-Multiple_Card_Reader_058F63666435-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Jun  4 19:39 /dev/disk/by-id/usb-Multiple_Card_Reader_058F63666435-0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  9 Jun 14 17:21 /dev/disk/by-id/usb-SanDisk_Cruzer_Blade_4C530100231211109035-0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 Jun 14 17:22 /dev/disk/by-id/usb-SanDisk_Cruzer_Blade_4C530100231211109035-0:0-part1 -> ../../sdc1
kj@otto:~/encryptedusb$

Now I have it because it has Sandisk Cruzer written on it. So
/dev/sdc it is.

So to get the size we do exactly as Balau did and hit our first
roadblock:

kj@otto:~/encryptedusb$ blockdev --getsize64 /dev/sdc
blockdev: cannot open /dev/sdc: Permission denied
kj@otto:~/encryptedusb$

Perhaps this has something to do with the file system that is on the
stick. But no it does not, it is simply that I am not root, serves me
right for not reading carefully enough, try again with sudo:

kj@otto:~/encryptedusb$ sudo blockdev --getsize64 /dev/sdc
[sudo] password for kj: 
16008609792
kj@otto:~/encryptedusb$

Now make a file, called usbkey that size, being careful to subtract
one:

kj@otto:~/encryptedusb$ dd if=/dev/zero of=usbkey.img bs=1 count=1 seek=16008609791
1+0 records in
1+0 records out
1 byte (1 B) copied, 0.0665122 s, 0.0 kB/s
kj@otto:~/encryptedusb$

Now I start qemu:

kj@otto:~/encryptedusb$ qemu -m 512 -enable-kvm -hda usbkey.img -cdrom debian-8.1.0-i386-netinst.iso 
The program 'qemu' can be found in the following packages:
 * qemu-system-arm
 * qemu-system-mips
 * qemu-system-misc
 * qemu-system-ppc
 * qemu-system-sparc
 * qemu-system-x86
Try: sudo apt-get install 
kj@otto:~/encryptedusb$

This is a bit irritating because I have just installed qemu using
Synaptic. Time for more web searching.

A search for ubuntu quemu command missing finds (Index » Newbie
Corner » Qemu command not
found..)[https://bbs.archlinux.org/viewtopic.php?id=134902].
Scrolling all the way to the bottom we find:

firecat53 wrote:

The command on our systems with the regular 'qemu' package is "qemu-system-x86_64" (or i-386)

So try that:

kj@otto:~/encryptedusb$ qemu-system-i386 -m 512 -enable-kvm -hda usbkey.img -cdrom debian-8.1.0-i386-netinst.iso 
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
kj@otto:~/encryptedusb$

Try without -enable-kvm:

kj@otto:~/encryptedusb$ qemu-system-i386 -m 512 -hda usbkey.img -cdrom debian-8.1.0-i386-netinst.iso

Well, at least it started qemu. But it declared that the disk image
was not bootable.

Try another route. I installed QtEmu from Synaptic and used it to
create a new VM. Just create any size hard disk, you will change it
later.

Go to the settings and choose the image you created earlier as the
hard disk in the Settings tab, also change the memory from the
default 128MB to 512MB. In the Control Panel under Reload Optical
drive
choose the Debian image that was downloaded earlier.

Now try starting it. Unfortunately it also complains about KVM
modules so I suppose I must conclude that something is missing from my
kernel.

I have VirtualBox installed so I suppose I could try that.

Following instructions isn’t always easy

Need to update my Slacko stick

But there is no newer Firefox in Puppy it seems and I am too lazy to
go through all the creation of PETs when I want a new version.

A bit of web searching led me to
Freedom Embedded

So let’s see if I can follow the instructions.

They boil down to roughly this:

  • Create a disk image that corresponds in size to the size of the USB
    stick,

  • Obtain a Debian ISO image,

  • Boot QEMU with that image,

  • Install to the newly created image file, setting up file system
    type, swap, encryption, etc. as we go.

  • Shut down QEMU,

  • Copy the image file to the stick using dd.

So here we go.

To make slightly better use of time I’ll start downloading the Debian
image first so that it can work while I do the other steps. I’ll go
for a stable build instead of a daily. A quick look on debian,org
took me to this:

http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso

First make a directory for all this stuff then run wget to download
the image.

kj@otto:~$ mkdir ~/encryptedusb
kj@otto:~$ cd encryptedusb/
kj@otto:~/encryptedusb$ wget http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso
--2015-06-14 17:56:00--  http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso
Resolving cdimage.debian.org (cdimage.debian.org)... 130.239.18.173, 130.239.18.165, 2001:6b0:e:2018::173, ...
Connecting to cdimage.debian.org (cdimage.debian.org)|130.239.18.173|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://gensho.acc.umu.se/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso [following]
--2015-06-14 17:56:00--  http://gensho.acc.umu.se/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso
Resolving gensho.acc.umu.se (gensho.acc.umu.se)... 130.239.18.176, 2001:6b0:e:2018::176
Connecting to gensho.acc.umu.se (gensho.acc.umu.se)|130.239.18.176|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 330301440 (315M) [application/x-iso9660-image]
Saving to: ‘debian-8.1.0-i386-netinst.iso’

 5% [=>                                     ] 19,346,405   393KB/s  eta 10m 44s^C
kj@otto:~/encryptedusb$

Actually that took almost no time because it is the net install image.

Now we need to find the device name of the stick because we need to
find out how big it is. This is not something I do everyday so I have
forgotten how. I started Nautilus and an entry appeared in the
devices list on the left pane accompanied by a large box with an error
message which amongst a lot of other verbiage said:

Failed to mount '/dev/sdc1': Invalid argument.

and complaints about NTFS signatures being missing.

Some people,
superuser: How do I figure out which /dev is a USB flash drive?,
suggest using the mount command to find it but that won’t work
because it is not mounted. I also tried the suggested blkid without
getting any output at all.

In the end the most useful was this:

kj@otto:~/encryptedusb$ ls -l /dev/disk/by-id/*usb*
lrwxrwxrwx 1 root root  9 Jun 14 17:20 /dev/disk/by-id/usb-Multiple_Card_Reader_058F63666435-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Jun  4 19:39 /dev/disk/by-id/usb-Multiple_Card_Reader_058F63666435-0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  9 Jun 14 17:21 /dev/disk/by-id/usb-SanDisk_Cruzer_Blade_4C530100231211109035-0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 Jun 14 17:22 /dev/disk/by-id/usb-SanDisk_Cruzer_Blade_4C530100231211109035-0:0-part1 -> ../../sdc1
kj@otto:~/encryptedusb$

Now I have it because it has Sandisk Cruzer written on it. So
/dev/sdc it is.

So to get the size we do exactly as Balau did and hit our first
roadblock:

kj@otto:~/encryptedusb$ blockdev --getsize64 /dev/sdc
blockdev: cannot open /dev/sdc: Permission denied
kj@otto:~/encryptedusb$

Perhaps this has something to do with the file system that is on the
stick. But no it does not, it is simply that I am not root, serves me
right for not reading carefully enough, try again with sudo:

kj@otto:~/encryptedusb$ sudo blockdev --getsize64 /dev/sdc
[sudo] password for kj: 
16008609792
kj@otto:~/encryptedusb$

Now make a file, called usbkey that size, being careful to subtract
one:

kj@otto:~/encryptedusb$ dd if=/dev/zero of=usbkey.img bs=1 count=1 seek=16008609791
1+0 records in
1+0 records out
1 byte (1 B) copied, 0.0665122 s, 0.0 kB/s
kj@otto:~/encryptedusb$

Now I start qemu:

kj@otto:~/encryptedusb$ qemu -m 512 -enable-kvm -hda usbkey.img -cdrom debian-8.1.0-i386-netinst.iso 
The program 'qemu' can be found in the following packages:
 * qemu-system-arm
 * qemu-system-mips
 * qemu-system-misc
 * qemu-system-ppc
 * qemu-system-sparc
 * qemu-system-x86
Try: sudo apt-get install 
kj@otto:~/encryptedusb$

This is a bit irritating because I have just installed qemu using
Synaptic. Time for more web searching.

A search for ubuntu quemu command missing finds (Index » Newbie
Corner » Qemu command not
found..)[https://bbs.archlinux.org/viewtopic.php?id=134902].
Scrolling all the way to the bottom we find:

firecat53 wrote:

The command on our systems with the regular 'qemu' package is "qemu-system-x86_64" (or i-386)

So try that:

kj@otto:~/encryptedusb$ qemu-system-i386 -m 512 -enable-kvm -hda usbkey.img -cdrom debian-8.1.0-i386-netinst.iso 
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
kj@otto:~/encryptedusb$

Try without -enable-kvm:

kj@otto:~/encryptedusb$ qemu-system-i386 -m 512 -hda usbkey.img -cdrom debian-8.1.0-i386-netinst.iso

Well, at least it started qemu. But it declared that the disk image
was not bootable.

Try another route. I installed QtEmu from Synaptic and used it to
create a new VM. Just create any size hard disk, you will change it
later.

Go to the settings and choose the image you created earlier as the
hard disk in the Settings tab, also change the memory from the
default 128MB to 512MB. In the Control Panel under Reload Optical
drive
choose the Debian image that was downloaded earlier.

Now try starting it. Unfortunately it also complains about KVM
modules so I suppose I must conclude that something is missing from my
kernel.

I have VirtualBox installed so I suppose I could try that.

Following instructions isn’t always easy

Need to update my Slacko stick

But there is no newer Firefox in Puppy it seems and I am too lazy to
go through all the creation of PETs when I want a new version.

A bit of web searching led me to
Freedom Embedded

So let’s see if I can follow the instructions.

They boil down to roughly this:

  • Create a disk image that corresponds in size to the size of the USB
    stick,

  • Obtain a Debian ISO image,

  • Boot QEMU with that image,

  • Install to the newly created image file, setting up file system
    type, swap, encryption, etc. as we go.

  • Shut down QEMU,

  • Copy the image file to the stick using dd.

So here we go.

To make slightly better use of time I’ll start downloading the Debian
image first so that it can work while I do the other steps. I’ll go
for a stable build instead of a daily. A quick look on debian,org
took me to this:

http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso

First make a directory for all this stuff then run wget to download
the image.

kj@otto:~$ mkdir ~/encryptedusb
kj@otto:~$ cd encryptedusb/
kj@otto:~/encryptedusb$ wget http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso
--2015-06-14 17:56:00--  http://cdimage.debian.org/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso
Resolving cdimage.debian.org (cdimage.debian.org)... 130.239.18.173, 130.239.18.165, 2001:6b0:e:2018::173, ...
Connecting to cdimage.debian.org (cdimage.debian.org)|130.239.18.173|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://gensho.acc.umu.se/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso [following]
--2015-06-14 17:56:00--  http://gensho.acc.umu.se/cdimage/release/current/i386/iso-cd/debian-8.1.0-i386-netinst.iso
Resolving gensho.acc.umu.se (gensho.acc.umu.se)... 130.239.18.176, 2001:6b0:e:2018::176
Connecting to gensho.acc.umu.se (gensho.acc.umu.se)|130.239.18.176|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 330301440 (315M) [application/x-iso9660-image]
Saving to: ‘debian-8.1.0-i386-netinst.iso’

 5% [=>                                     ] 19,346,405   393KB/s  eta 10m 44s^C
kj@otto:~/encryptedusb$

Actually that took almost no time because it is the net install image.

Now we need to find the device name of the stick because we need to
find out how big it is. This is not something I do everyday so I have
forgotten how. I started Nautilus and an entry appeared in the
devices list on the left pane accompanied by a large box with an error
message which amongst a lot of other verbiage said:

Failed to mount '/dev/sdc1': Invalid argument.

and complaints about NTFS signatures being missing.

Some people,
superuser: How do I figure out which /dev is a USB flash drive?,
suggest using the mount command to find it but that won’t work
because it is not mounted. I also tried the suggested blkid without
getting any output at all.

In the end the most useful was this:

kj@otto:~/encryptedusb$ ls -l /dev/disk/by-id/*usb*
lrwxrwxrwx 1 root root  9 Jun 14 17:20 /dev/disk/by-id/usb-Multiple_Card_Reader_058F63666435-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Jun  4 19:39 /dev/disk/by-id/usb-Multiple_Card_Reader_058F63666435-0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  9 Jun 14 17:21 /dev/disk/by-id/usb-SanDisk_Cruzer_Blade_4C530100231211109035-0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 Jun 14 17:22 /dev/disk/by-id/usb-SanDisk_Cruzer_Blade_4C530100231211109035-0:0-part1 -> ../../sdc1
kj@otto:~/encryptedusb$

Now I have it because it has Sandisk Cruzer written on it. So
/dev/sdc it is.

So to get the size we do exactly as Balau did and hit our first
roadblock:

kj@otto:~/encryptedusb$ blockdev --getsize64 /dev/sdc
blockdev: cannot open /dev/sdc: Permission denied
kj@otto:~/encryptedusb$

Perhaps this has something to do with the file system that is on the
stick. But no it does not, it is simply that I am not root, serves me
right for not reading carefully enough, try again with sudo:

kj@otto:~/encryptedusb$ sudo blockdev --getsize64 /dev/sdc
[sudo] password for kj: 
16008609792
kj@otto:~/encryptedusb$

Now make a file, called usbkey that size, being careful to subtract
one:

kj@otto:~/encryptedusb$ dd if=/dev/zero of=usbkey.img bs=1 count=1 seek=16008609791
1+0 records in
1+0 records out
1 byte (1 B) copied, 0.0665122 s, 0.0 kB/s
kj@otto:~/encryptedusb$

Now I start qemu:

kj@otto:~/encryptedusb$ qemu -m 512 -enable-kvm -hda usbkey.img -cdrom debian-8.1.0-i386-netinst.iso 
The program 'qemu' can be found in the following packages:
 * qemu-system-arm
 * qemu-system-mips
 * qemu-system-misc
 * qemu-system-ppc
 * qemu-system-sparc
 * qemu-system-x86
Try: sudo apt-get install 
kj@otto:~/encryptedusb$

This is a bit irritating because I have just installed qemu using
Synaptic. Time for more web searching.

A search for ubuntu quemu command missing finds (Index » Newbie
Corner » Qemu command not
found..)[https://bbs.archlinux.org/viewtopic.php?id=134902].
Scrolling all the way to the bottom we find:

firecat53 wrote:

The command on our systems with the regular 'qemu' package is "qemu-system-x86_64" (or i-386)

So try that:

kj@otto:~/encryptedusb$ qemu-system-i386 -m 512 -enable-kvm -hda usbkey.img -cdrom debian-8.1.0-i386-netinst.iso 
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
kj@otto:~/encryptedusb$

Try without -enable-kvm:

kj@otto:~/encryptedusb$ qemu-system-i386 -m 512 -hda usbkey.img -cdrom debian-8.1.0-i386-netinst.iso

Well, at least it started qemu. But it declared that the disk image
was not bootable.

Try another route. I installed QtEmu from Synaptic and used it to
create a new VM. Just create any size hard disk, you will change it
later.

Go to the settings and choose the image you created earlier as the
hard disk in the Settings tab, also change the memory from the
default 128MB to 512MB. In the Control Panel under Reload Optical
drive
choose the Debian image that was downloaded earlier.

Now try starting it. Unfortunately it also complains about KVM
modules so I suppose I must conclude that something is missing from my
kernel.

I have VirtualBox installed so I suppose I could try that.