Monday, 14 March 2016

Just for fun, putting FreeBSD onto an old 32-bit machine.


Just for fun, putting FreeBSD onto an old 32-bit machine, to get my mind away from W**doze. 
 
All this info, I pinched off t'internet thingy.
I don't want to use a DVD, so I grabbed an old USB stick to use.

Go to the FreeBSD web page here:- https://www.freebsd.org/
Then navigate to the downloads page, and find an image suitable for your machine's architecture.

As its a USB stick and not a DVD, we need to find an appropriate .img file and not a .iso.

All the instructions to install it are here:-

Here is a precis:-
They suggest:-
dd if=FreeBSD-10.2-RELEASE-amd64-memstick.img of=/dev/da0 bs=1M conv=sync
As I was using Linux for this, my output file was /dev/sde, and I carelessly used a blocksize of 512, and the first time I forgot the sync, and it didn't copy correctly.
Doing sync after this command is a good idea.

Booting the target machine from this USB stick worked ok, and I selected install.
All the questions and answers are the usual for any install, I had an unused disk to install to, so plodded on and selected commit. There are then more of the usual questions, and at last we get to reboot into our newly-installed disk.

Unfortunately this only gets to a command line interface. Not everyone's cup of tea.

So we plod on:-
Log in as root, and you get a # prompt:-
Then:-
pkg install xf86-video-fbdev mate-desktop mate xorg
Add the following lines to /etc/rc.conf
moused_enable="YES"
dbus_enable="YES"
hald_enable="YES"
Test it with:-
xinit mate-session



Now, in a command box,
Install Slim
pkg install slim
Add the following line to /etc/rc.conf
slim_enable="YES"
Add the following line to .xinitrc file in the user’s home directory
exec mate-session
Probably, the file .xinitrc doesn't exist yet, so just make it.
N.B. Do this for root as well as your user. I forgot, and had to do some sneaky recovery.
Root's home dir is /root, and not in /home/root!
It's also worth installing and configuring sudo, so while still root:-
pkg install sudo
and add this line with visudo (where username is your login name).
 username ALL=(ALL) ALL

And while we're still root, remove some rubbish you get when logging in:-

:>/etc/motd

touch /etc/COPYRIGHT

And most annoyingly, login as your user and edit .profile
Find a line similar to
-x /usr/games/fortune ] && /usr/games/fortune freebsd-tips 
and put a # and the beginning to comment it out.
You'd probably best then reboot and test all the logins.
Obviously, this is only your starter for 10, and there's lots more installing and configuring you might want to do, once you've found out what it can do.













Thursday, 10 March 2016

It never ends.


Well, I haven't done anything here for a while, so it's about time. 

I have been carefully ignoring Windows 10, as I don't use it myself, but I have to maintain a few Windows machines for the other half. These were supposed to be Windows 7, with one Windows 8.1 for testing. This all went wrong, some updated themselves to windows 10, and someone got few up with the nagging, and let the main production machine update. This resulted in days and days of on-and-off downtime, and much banging my head against a brick wall. 

The final straw was my dual-boot system, where the Windows 10 update removed my Linux partition completely. Is that badly behaved, or what? Anyway, things are settling down slowly, although I can't believe how sluggish this supposedly snappy new system is, and some small peripherals still don't work.

Just as a flavour of the sort of issues, things have been reasonably quiet for almost a month, when the scanner part of the multi-function printer stopped working. Some update has borked the driver. Further investigation, and the manufacturer is no longer listing a Windows 10 driver for this model.
What! 
I cast my mind back to similar nonsense from years ago, and I go to the American website, and find a driver for a similar model. It looks the same, but the American one has a different model number to the European one. This driver has no resemblance to the old one, either in name or look, but it works. I wonder for how long? Who thought automatic updates without details of what was being updated was a good idea?

And just in case you thought it was only Windows 10, we have a couple of old laptops that are stuck on XP. No more updates, so stable enough for searching for W10 problems on the internet.  Unfortunately, other stuff is still changing, and both went wrong at the same time.  One continually reboots as soon as it starts, and the other blue screens with that IRQ_NOT_EQUAL nonsense. Fortunately it accuses timfsony.sys of causing this.  This is the driver for the sony/TI memory stick adapter. 
You can cure this by booting into safe mode and removing flash. Who'd have thought of that?  This isn't convenient, so we go into system/devices and disable the sony/TI memory stick (which I don't use anyway).  I could then re-install flash and carry on. 

Rant over.  The sun's out, and it's time to walk the dog.


Wednesday, 26 February 2014

Mystery of the missing DVD drives.

Here's an odd one.

SWMBO has has a bit of a disaster with her computer, and is using the spare one.
It's supposed to be an identical copy, but as you might expect, there are all sorts of odd differences.
To load a CD or DVD into one of the 2 drives, she opens windows explorer and clicks on the drive in the left pane. The drawer then opens, and she can put a disk in.

However. With no disk in the drive, the drive isn't there. It is on the old one.
As usual, after much clicking about, I went to a well-known internet search program and searched.
Other people have found this. It looks like a minor change in the defaults during one of the hundreds of updates.
Things to check:-
Open explorer and click “Organise”, click “Folder and search options”, click “View”.
Make sure “Hide empty drives in the computer folder” is unticked.
Then go to the General tab and make sure “Show all folders” in the Navigation pane is ticked.
This last one was the culprit.
Then you can see all the drives, including empty ones and CD/DVD drives.
For completeness, I tried this on my Windows 8 test box. This is slightly different.
 
Open explorer and click “View” in the ribbon.
Click “Navigation Pane”, and then click “Show all folders” in the drop-down menu.

Nothing like consistency. And this is nothing like...








Tuesday, 11 February 2014

Fun with a digital photo frame.


Today, it's trying to get SWMBO's family pictures onto one of those “digital” picture frames.

It's an old one from Jessops (a 5156874) that was given to us for “not working properly”.
It was the cheapest on the market at the time.

It's quite difficult to operate using the touch controls, so the usual thing is just to power it on and let it do it's own thing. Plugging the USB into a Linux box throws a wobbly and doesn't work, so it's back to Windows to get files onto it.

The pictures are a mixture of jpegs, gifs and bmps from all over the place.
Sure enough, some pictures display ok, but some won't display. Unfortunately, this includes anything downloaded from Facebook, and also anything from a newish camera.
That's not good.

Further investigation seems to show that the unsupported jpegs are not “too big”, as I first thought, but they're “progressive jpegs”. Huh! Whatever that is, it's evidently too new for this frame.
It appears that jpeg files are not all the same, and there are a number of different types.

There's no possibility of any software updates for this, as Jessops went bust a while back. The new owners have re-invented the shops as a bit more up-market, and they don't do this sort of cheap stuff. Anyway, there doesn't appear to be any way to update it, even if such a thing was available.

The way I went about it, was to convert the errant pictures from progressive to baseline jpegs.
You can do this one file at a time with Windows Paint, and trying it out works ok, so that proves that we have found the problem.

This is all very well, but is going to take a lifetime, so searching around, and going back to Linux, I found that ImageMagick will also do this, and we should be able to cobble up a script to do a whole batch all at once.

Conveniently, as usual, someone has already been there, and there's a nice script on this page:-


However, there's one or two small gotchas.

First, I tried to cut-and-paste the script from the web page, but that doesn't work, as the web page uses some other codeset that won't work in a script. So I had to re-type it by hand.

Any file that's been near a FAT file system (i.e. most cameras) have an extension .JPG and not .jpg so we need an additional -i for the egrep on line 1.
He's used -i for the greps on line 3, so it's probably a typo.

Out of habit, I usually add a #!/bin/sh at the beginning of a script, because that's how we did it in the old days. (Am I beginning to sound like an old bearded Unix guy?)
This had me fooled for a while, as it fails with a “not found” on the if clause in line 5.
To cut a long story short, it seems that Ubuntu, in it's wisdom, has defaulted the sh command to dash instead of the expected bash. How am I supposed to know that?
Changing the line to #!/bin/bash makes it all work. (Nearly!)

Another slight problem is these pesky Windows file names with embedded spaces. Most OSs don't like this, expecially any *nix. And lo-and-behold, the script fails on such files.

This is a common Unix/Linux problem, so I try a quick fix to change the spaces to underscores.
As this is Ubuntu, it has the Perl version of rename, so we can:-
rename “s/ /_/g” *.jpg (and repeat the process for *.JPG).
(Note that this fails using just * instead of *,jpg. No-one else seems to have encountered this failure mode, so I'll leave it for another day.)

As I did a bit of mucking about, I ended up deleting all the left-over files with names like picture99.jpg.prog

Now the script runs ok, and I copy all the files to a shared partition, reboot into Windows and copy the files to the frame.
So far it's working ok, but it's taken me all day. Oh, well.

And here's the final script:-

#!/bin/sh
# script to convert progressive jpegs to baseline.
for img in `find . -name "*" | egrep -i *\.jpe?g$`
do
  idout=`identify -verbose $img | grep -i interlace | grep -i none$`

  if [[ -z $idout ]]
  then
    echo "-------------------------"
    echo "$img is progressive"
    echo "....making copy of original with .prog extension"
    /bin/cp -f $img $img.prog
    echo "....converting to baseline"
    convert $img -interlace none $img 
    echo "....done!"
  #else
    #echo "$img is non-progressive"
  fi
done











Thursday, 26 December 2013

Blinkstick for Xmas.

As it's Christmas, I bought myself a USB blinkstick kit. Just for fun. 
See www blinkstick.com 

I haven't made up anything for ages, and the bit of soldering took me back a bit, although everything seems to be much smaller these days, and I needed to use an eyeglass to check the soldered joints.


Here's the kit as received:-















And here it is assembled:-















And just to prove it works, here's the 3 colours, and all 3 together to give white.













This was using the test function from Windows.
Next to have a go at controlling it from a Linux API.



Monday, 28 October 2013

Does nobody test anything these days?

Does nobody test anything these days? 

Although I mostly use Linux, there are several Windows 7 boxes here at Vanya Towers. Supposedly protected by Avast antivirus.
They all run Internet Explorer 10 as well as Firefox.

This week there was an Avast program update to version 2014.9.0.2006.
It doesn't do anything different, but the familiar orange ball that spins when stuff is happening is now orange and blue. Whoopee!

Except, that while Firefox and Chrome run as normal, Internet Explorer has stopped dead.  What?

It turns out that it isn't quite dead. If you leave it for several minutes, it eventually renders the page you clicked on. 

After much head scratching and internet searching, the fix appears to be to disable any Avast add-ons in Internet Explorer. i.e.:-

Start Internet Explorer, and allow it to reach it's home page.  This may take several minutes. Don't click anything until it's loaded properly.

Then:-
Click the gearwheel at the top right.
Select 'Manage Add-ons'.
Select 'Show all Add-ons'.

The list should include either 2 or 4 entries for Avast Online Security.
Why 2 or 4?  Who knows.
Right-click the first one and select 'Disable'.
A box will come up to say the others will also be disabled.
Click Close, and shut down Internet Explorer.
Restart Internet Explorer, and it should work ok.

Of course, this means that IE no longer uses the Avast online protection, but if you don't go anywhere nasty you should be ok.
If, for some reason, you need to go to some random, unknown site, they first go there with any other browser.

Postscript.
In amongst all this messing about, Windows wanted me to install something called Microsoft Security Essentials, but this wanted me to remove Avast altogether.   I can only suppose it's MS trying to muscle in on the AV market.  Maybe I shall investigate this later.









Wednesday, 23 October 2013

Upgrading to Windows 8.1 (Part 3).


Upgrading Windows 8.1 pro Preview to the final released Windows 8.1 pro. (Part 3).

Right, off to installing some actually useful software...
Belarc Advisor, Firefox, the Gimp, LibreOffice, TightVNC.

Some of these installs don't put an icon on the desktop. You can find and run them with search, if you can remember what they're called, or how it's spelled.
In their arrogance, MS have made it more difficult to make a shortcut.

To start with:-
Click file explorer icon on the task bar.
Click view.
Tick “file name extension”.
Close.

For the Gimp:-
Right click where you want the shortcut to go on the desktop.
Select new, shortcut, and click browse.
Drill down through: This PC, Local Disk(C:), Program files, Gimp2, bin
and highlight gimp-2.8.exe
click ok, next, finish, and there it is.

Other programs will be similar, but if they turn out to be 32 bit versions, they'll be in “Program Files (x86)”
Some may not use the bin folder, and some are in a folder with the name of the software house instead of the actual program.

As I have the media pack, I thought I'd like to watch a DVD. It wants to set up media player. Eventually, after much disk rattling, Express or Custom.
I've met this sort of question before! Custom!
Did I want to join some sort of customer experience program? No thanks.
Do I want it to download cover art? I suppose, yes.
Then some display and sound setup questions, and it say's we're done.

Now there's a weird screen with TV, Sports and whatnot. What?
The scroll wheel on the mouse scrolls up and down even more strange options.
This looks like some sort of online streaming program. All I want to do is play my DVD!
The Sports section appears to be very American.
Eventually, hidden in the Movies section, I see a very faint button marked Play DVD.
That must be it! Yes. Success at last, but what a tedious performance to get here.
Now to get a driver for my printer. I put the printer model into the Epson support site, but for some reason, it mis-identifies the OS as Linux. Doh! Scroll down and select Windows 8.x 64 bit.
Goody, there's a driver. There's various licence and security boxes to click through, and a restart.
When I select “Update and restart” there are 6 Windows updates already! Windows 8.1 has been out less than a week! Still, it sees the printer over the wifi.
Finally, I can run Belarc Advisor and print the results.


Monday, 21 October 2013

Upgrading to Windows 8.1 (Part 2).


Upgrading Windows 8.1 pro Preview to the final released Windows 8.1 pro. (Part 2).

Today's chores done, I can get back to my windows upgrade.
So, boot up and this time log in with my local PC login and not the stupid MS account.
And, everything is back to the useless defaults. So again:
Turn off all the live tiles. Why can't you do this with one setting?
Drag the desktop tile to the top left for easier access.
Change the desktop background to a plain colour because it makes for a clearer screen.
Change IE home page and disable autocomplete.
Remarkably, it's using the same power and TZ settings, so I can leave them alone.

It's a pain to shut this OS down, so I make a shortcut on the desktop to do this.
All the shortcut is is “shutdown -s -t 0” (without the quotes).
I can then change the icon to something more meaningful, and drag it onto the task bar at the bottom of the screen. Shutdown with one click!

The disk is rattling like there's no tomorrow. I find this is the indexer, indexing all my files that it didn't delete. It should stop eventually.

You're supposed to be able to boot directly to the desktop instead of the tiles. Just like a proper OS!
Of course, MS don't provide any instructions, so here goes.

Right-click on the taskbar
Select Properties
Click the Navigation tab
Under Start Screen, check the box labelled “When I sign in or close all apps on a screen, go to the desktop instead of Start”.
Click Apply and OK.

Intuitive eh? Not!

And I still have to install all my programs.
Oh, and make sure when you do, that you make a shortcut on the desktop, as there's STILL no start menu.
 Good grief, Penfold.

And here's a correction.   I should have realised when the Timezone was wrong, but the whole environment is set to US instead of UK.  How come the upgrade  didn't preserve this?
 Anyway,  Hover near the bottom right and click Settings.
Click control panel.
Click Language.
Click English (UK).
Click Download and Install Language Pack.
Click yes to the user a/c control security box that pops up.

When done, (it takes ages), highlight English (UK) and click Move Up.
This sets the default, and you can see the date change instantly to be the correct way round.
Time for bed, said Zebedee.








Sunday, 20 October 2013

Upgrading to Windows 8.1


Upgrading Windows 8.1 pro Preview to the final released Windows 8.1 pro.

Should be easy, just go to the store, download it and follow the instructions.

So, I do a search in the store, but can't find it. I resort to a well known internet search site, and find some instructions. It's already not that simple, the Microsoft site wants to know how I installed it. I don't remember, but eventually I find a DVD labelled “Windows Blue 64 bit”, so I choose the instructions for “installed from iso”.
It wants me to buy it again. No, I already paid for Windows 8. The 8.1 upgrade should be free.

I need to start IE, and go to ms-windows-store:WindowsUpgrade and click download.
First it wants my password, but then it wants me to sign up to a Microsoft account. I already have one, but there's no option for that. I try all sorts, but eventually decide that you simply can't do this while logged into Windows with a local login. I need to log into my own pc with a Microsoft account.

Start again.
Boot up PC, log in using my Microsoft account and make sure all the updates for the current version are done.
Open the store and leave it running. This takes several goes, as it claims to not see the store.
Open IE and go to ms-windows-store:WindowsUpgrade
Then I can click download and the download starts, followed immediately by the upgrade installing without any pause to ask if I really want to do this.

It claims to preserve your files, but throw away all your installed programs, which it annoyingly calls “apps”. Then will need re-installing.

It takes an age, and does several restarts. During this, it wants some options choosing.
I choose custom, not express, because I want to see what it does.
I was right to be suspicious. I accept most of the defaults, but come to a page where it wants to share all my info with Microsoft. No thanks! I click all the switches to OFF.

I log in again using my Microsoft account, but for no apparent reason, it sends a security code to the secondary email address of my Microsoft account. Just as well I have another PC running, so I can retrieve this and enter it in the box.
And that's it. All I have to do now, is put my settings back to what they were, and re-install all my programs. (The default settings are seriously bad).
Before I shut down for the day (yes, it took all day), I notice the time is wrong. The TZ is set to Pacific time. (Seattle, presumably). I set it back to London, which is conveniently labelled UTC.

That's definitely it for today. No wonder business users are avoiding Windows 8!

Saturday, 14 September 2013

For various reasons, been a bit busy, but here's some pics of a new distant arm going up on the post that we recently painted.  This wooden post has the date 1922 stamped into it, so it's been up a long time.





Sunday, 5 May 2013

Monday, 15 April 2013

Contrasts on the railway



Here's a contrast between 2 recently refurbished engines, and some equipment that's become almost lost in the undergrowth, and is only just now being uncovered.



















Saturday, 2 March 2013

Diverting a stream

To try and mitigate the water collecting round the starter signal at Parkend, we've dug out a new channel for the water to hopefully run away down the cess. It's only small, but so far running away from the post.  The date on the post is 1927, so it's been there a while.

Before ...













After ...























Saturday, 26 January 2013

More trees on the line

Still loads of snow on the ground, but here you can see the effect the heavy falls have had on some trees at Parkend.

Here I am standing in the  four-foot, where no train will be running today.
The line on the right is a disused siding.
There are 2 trees that have been uprooted by the weather.
















 This branch fell from an overhanging tree directly above the platform.











Wednesday, 23 January 2013

New rolling stock

Today, the postman fought his way through the deep snow to bring me an  LMS coach from late forties/early fifties (someone has painted the roof black and fitted plastic axles to the wheelsets), and a Saxa salt wagon (again with a repainted roof).


Friday, 18 January 2013

Monday, 24 December 2012

New aerial pole

OK, here's my 2m/70cm aerial on it's new pole screwed to the shiny new bargeboard.


Tuesday, 4 December 2012

Had a weekend in Kent and London.  Here's some pics of assorted people.














































Tuesday, 27 November 2012

Just for a change away from the railway this weekend, it's was SWMBO's birthday, so here's a picture of the cake, and us enjoying a rare dinner out.

Saturday, 3 November 2012

Yet another railway day.

Went in early today to open the gates for the arrival of a container.  
It still hadn't arrived when I came home this afternoon.

Anyway, here's my effort at removing some decades-old paint.
















While I was doing this, someone was investigating a blocked land drain that turned out to be a collapsed culvert. Unfortunately digging it out has undermined the track. Oops!



















Friday, 26 October 2012

More railway work.

Here's a couple of new signs.














And a couple of pics of maintenance of the ground frame.














 And just for fun, a picture of the current end of the line.
























Thursday, 25 October 2012

A bit of work installing a new signal at Parkend.




























































Then we see someone making a good job of painting a vintage wooden signal post, but some problems with the drainage are threatening it.



































































And finally, some new Hornby trucks arrived.
(Well, the dog looks interested!)