Aquarionics

Home | Projects | Archives | About Aquarionics | About Aquarion

A tale of two operating systems

My main machine is primarily used for websurfing, ssh and games, and because the first two are OS agnostic and the third isn’t, it runs Windows 7. Clare’s PC, however, runs Windows XP for games, and she would like it also to run Ubuntu, because it’s the OS she’s most familiar with.

(Yeah, I know).

So while she’s away at a LARP event for the weekend, I decided it was a good time to put the newest version of Ubuntu on her machine. When I built the Windows install, I left a partition at the end to put it on, so I booted from my handy 9.09 CD and installed it there. Ran though the install, answered all the questions, booted into shiny Linux install. Boom, multiboot.

No, wait. Hmm. The install process usually recognises Windows installs and adds them to the menu. Where is it?

Aha, they’re using the new version of grub. Maybe the detection’s not quite perfect. I’ll add it manually.

Menu item doesn’t work. Odd.

What do you mean “isn’t a valid NTFS drive”?

There is nothing quite like the sinking feeling when you realise that the drive that isn’t working anymore is the one that has your SO’s data on it. I mean, there are backups in place and everything, but still. There might be stuff not backed up.

Eep.

This is when I discovered that Partition Magic-, my go-to software for “My Windows partition is hosed” – no longer exists, and that my old copy no longer works. So, I have a weekend of alternately trying not to think about it and tracking down things that might work that have no possibility of hosing the rest of the drive (I’m still pretty sure it’s just the partition table at this stage).

Fixed it in the end, though. I’d tried the Windows XP Recovery Console, because I’d assumed it was just the MBR broken and “fixmbr” repairs that. I had, however, not gone far enough.

Microsoft Windows XP(TM) Recovery Console.
The Recovery Console provides system repair and recovery functionality
Type EXIT to quit the Recovery Console and restart the computer.
1: C:\WINDOWS
Which Windows installation would you like to log onto
(To cancel, press ENTER)? 1
C:\WINDOWS>fixboot
The target partition is C:.
Rre you sure you want to write a new hootsector to the partition C: ?
The file system on the startup partition is NTFS.
FIXBOOT is writing a new boot sector.
The new bootsector was successfully written.
C:\WINDOWS>_

And relax.

March 15, 2010 - 7:15 AM Comments (4)

DNS for DHCPd in the FUTURE

I have a dream.

My dream is that one day, a giant carrot carved into the shape of a submarine will sail down the Thames before sinking below the waves to take back America using only the power of latin.

But also, I want for machines that are on my local network to be accessible as “$hostname.d.water.gkhs.net” to everyone else on the same local network. That’s a more technical dream, and this is how I did it:

first, we google “smoothwall dhcp to dns”. The first result seems to be exactly what we need, so we click it, and find outselves on Kryogenix, the website of Aquarius, who I have known for somewhere close to a decade, which is an aeon in internet time. The article is now close seven years old, and while its lost its styling, it is (a) entirely what I want to do (b) comprehensive and (c) now completely broken.

The new page that Douglas Warner’s dhcp2dnrd script lives is now somewhere else on the site, and appears to be having some kind of formatting problem, but can still be downloaded from this direct link. At the bottom of this is a link to my own version of this file, with all these changes already made.

Although the the class::date problem no longer exists, a few other things that have changed since the article was released. So, this is what to do to get it working. Most of this is built on the stuff sill said already in his article, just updated for Smoothwall 3.0:

Log in to your Smoothwall box over ssh (If you cannot do this, you need to go to the web interface, Services, Remote Access, and tick SSH. Then, using your favourite terminal, log in to the same IP, port 222. Username root, password whatever you chose when you set up the firewall so long ago. I do hope you remember it.

mkdir dhcp2dnrd; cd dhcp2dnrd # (Being neat and tidy is good)

wget http://www.silfreed.net/download/progs/dhcp2dnrd.pl
wget http://search.cpan.org/CPAN/authors/id/D/DL/DLUX/Class-Date-1.1.9.tar.gz

tar xzvf Class-Date-1.1.9.tar.gz # to extract the perl module.
mv Class-Date-1.1.9/Date* /usr/lib/perl5/5.8.8/Class/ # to copy the perl module in place
vim dhcp2dnrd.pl # Or use your personal favourite editor. Unless it’s emacs or something, because I don’t think that’s installed.

Personally, I change the “home.net” line to “d.water.gkhs.net”, because it fits my network model better. You do need to change the “$dhcpdpath” to “/usr/etc/dhcpd.leases”, however.

Finally, smoothwall no longer uses dnrd, so either comment out the entire bottom of the file after “# restart dnrd”, or rewrite that to work. I’ve modified the code in mine to “work”, but it’s mostly cargo culty.

Downloading Douglas’ script, I found it had windows line endings, which confused me. You can convert it back to unix format in vim with “:set fileformat=unix”. If you’re using mine you shouldn’t need to.

Finally, run it, check the output of /etc/hosts is roughly what you expect, then throw the script into cron like this:
cp dhcp2dnrd.pl /etc/cron.often/

And that appears to work. You can grab my copy of the code from github should you want to.

Tags: , , ,
March 3, 2010 - 5:44 PM Comment (1)

Backups

You should back up your data.

You should periodically review this backup system to make sure you can get data back off it, but you should back up your data.

I’ve been doing this “computer guy” thing for a while now, and these are three things I have learnt are always true:

  1. The only way to be absolutely sure you get rid of a virus is to nuke the system it’s sitting on.
  2. Backup solutions that require the user to perform an action don’t work.
  3. The universe tends to irony WRT backup systems. And everything else.

The second is always true, from the lowliest “I want the blue “e” to work again” casual user though the most fan-speed obsessed poweruser to the most jaded and cynical sysadmin, if your backup system requires you to actually do something, then it’ll happen less often than it needs to and the time you fail to do it, or fail to check it, will be the day your harddrive dies.

Apple’s Time Machine is great, because it automatically syncs stuff to an external hard drive or network backup as you’re using the machine. If you have a laptop with it, set it up with a network backup, because while it warns you about your last backup being out of date it will go away if you tell it to, and that’s a recipe for badness.

Obviously this is where I explain how my backup system is the ultimate, most perfect way to solve this problem, but it isn’t. This the way that works for me:

Dropbox

My music, documents and projects get synced to Dropbox on a continuous basis as I’m using them (it used to be just Documents, but I started using them as a full backup system last year) and from there synced back down to my other machines (Directly over the lan with the latest version). By sharing subfolders with other accounts, Documents & Projects get synced down to my laptop when it gets plugged into wifi (it doesn’t have the disk space for the whole thing) and as soon as Dropbox sort sub-folder syncing even that complication will go away. Various subfolders are shared with other actual people too, for the things I work on with other people.

It’s good, it works, I know within a few hours if it’s broken, and I don’t have to think about it.

Which is, for me, the perfect backup system.
Windows 7 has a great backup system also. It will continually pester you until you set up some kind of backup system, and then it will pester you if that stops working.

Neither of them are good enough, though. You can ignore the messages, you can forget to plug in the external drive every so often.

(Downsides mainly involve trusting a third party with your data)

If Ubuntu’s magic personal backup system was cross platform, I’d probably use that (this syncs between three OSs), but trading into a different closed ghetto isn’t something I consider a good idea.

January 24, 2010 - 1:30 PM Comment (1)

Wreck a nice beach

So,
I decided to start playing with windows seven amnesty by speech systems, it comes to conclusion that what I should not do is to do the corrections are anything but a suppose something with a stream of consciousness and exactly as I am saying it’s exactly how is this translates into recognised speech.

This is not strictly fair, because I’ve given this next to no training and despite this it appears to be picking up what I’m saying quite well. + Finding the accessibility features of are you to be really helpful in this regard. I’m not quite sure why you picked ” are you” instead of I.e. It doesn’t appear to deal with initialization so well either.

Certainly in my be good for first after documentation but anything technical a it’s not take into account production and were expected to be.

Of course possibly am not speaking clearly enough for it if I deliberately speak slowly and clearly I suspect the results are by far better than what I’ve been getting before. Or possibly not.

Possibly I’ll get far better results of some training although it does seem to be quite good at being in control windows using voice of mass keyboard. Although I wonder if I can say switched to Cromer without it actually doing anything. Maybe I can.

Experiment ends.

October 30, 2009 - 9:07 PM No Comments

Every OS Sucks

Back to the fluff soon, promise.

So, sil said that norm said that jwz said that…

gosh, an OS war.

This is my environment:

(Interstitial lyrics in this post are from “Every OS Sucks” by Three Dead Trolls In A Baggie. You can find a video of it on youtube)

Now there’s lih-nux or lie-nux,
I don’t know how you say it,
or how you install it, or use it, or play it,
or where you download it, or what programs run,
but lih-nux, or lie-nux, don’t look like much fun.

On Waterwheel at work I use Ubuntu Jaunty, 64bit. I use Gnome and a heavily sparkly compiz setup (because desktop cube with a transparent desktop means I can see all my virtual desktops at once). I can entirely ignore any of the buzz about how good Air apps are, or the latest cool thing Youtube does, the new Chromium builds and any of a dozen other nice bits of technology, because my desktop is 64 bit and making things work on it is so much of a faff that I don’t bother. Sound just about works – sometimes the volume goes screwy – and occasionally a reboot will bugger up my gnome panel so the clock won’t appear for ten minutes. Despite having the fastest desktop in the office, HD Youtube won’t play on my desktop because of faff to do with 32 bit interfaces to 64bit programs or something. It goes at 3 frames per second, and my amiga 600 could do better than that.

Then Windows 95, then 98,
man solitaire never ran so great,
and every single version came out late,
but I guess that’s the way it goes.

At home my desktop – Tsunami – is a triboot system. My prefered environment currently is the Windows 7 RC, which generally Just Works, except that the network cuts out after a while, my sound card no longer records properly, and I can incapacitate any other player of Left for Dead by turning on “Push to Talk”, which blasts the rest of the game with high level static.

Other than that it runs XP, which is fine except for the bit where running it for more than four hours slows down to a crawl, the system has reached the half life when it needs to be reinstalled until I find the time to do it, and if anything attempts to put the machine to hibernate it will crash so hard it won’t recover for three reboots. The default browser for both the above is Google Chrome, because it has given me a browser window before Firefox has realised I’ve clicked the icon.

Thirdly, it also runs Jaunty, upgraded from Feisty, which would be my standard environment if it ran games. Mostly I don’t boot into it because it can’t find my sound card either, despite it working fine with Feisty, and because something in the upgrade broke the XConf so it only sees one monitor and I haven’t got around to fixing that yet.

Oasis – my laptop – is a Compaq Mini 700 that is sold in the states with a variant of Feisty on it. Oasis runs Jaunty and will either record or play sound and not do both, and is running a non-standard kernel because otherwise the wired network doesn’t work.

Cenote, the server Aquarionics is hosted on; and Fjord, my home server; run Debian Lenny. It works fine. I assume this is because neither of them have anything to do with any graphical interface.

Well Stevie said to Xerox,
“Boys, turn your heads and cough.”
And when no-one was looking,
he ripped their interfaces off.

Stole every feature that he had seen,
put it in a cute box with a tiny little screen,
Mac OS 1 ran that machine,
only cost five thousand bucks

In previous working environments I used to run on OS X full time, which I didn’t have any UI problems with, but massive arguments with whenever something that wasn’t case sensitive on the system interfaced with something that was, and the occasional block of doing something Not The Mac Way because it had to be consistant with something that was Not The Mac. Also, I stopped using a Mac because I can’t afford to buy the hardware.

My iPhone was fine until… well, that’s another Choose Your Own Adventure Post.

I use Windows because it runs almost all the F/OSS I use day to day, plus the games I enjoy. I use Ubuntu because it’s free and Free and mostly Just Works, and I can get a server development environment without faff. I use OS X because its interface works the way I think, install and uninstall is generally easy, and it rarely explodes.

From Microsoft, to Macintosh,
to Lin– line– lin– lie… nux,
Every computer crashes,
’cause every OS sucks.

In conclusion, everything sucks somewhat to someone, and they all suck differently. Pick your own damn operating system, use it, and don’t feel the need to “fix” other people who *have* made a decision.

July 30, 2009 - 9:13 AM No Comments

Windows 7

My work machine runs Ubuntu, as does my netbook. But my primary desktop is used mostly for games and web-browsing, so it tends to be in Windows. Chrome is currently my browser of choice when not developing (because I can start it, check my email and close it again in the time it takes Firefox to load). Microsoft sent me an email – along with most of the rest of the world – saying I could try the Windows 7 RC for free for a year, so I decided to give it a shot. Mostly because Windows 7 has DirectX 11, and I wanted to see if LOTRO’s support was shiny.

Now, last time I attempted a Windows 7 install, it didn’t go so well. (This article contains occasional Naughty Words).

This time it worked perfectly. It installed cleanly, recognised all my hardware, and everything’s working fine. LOTRO found its DirectX 10 mode, and looks shinier, and the interface is snappy and responsive, and has stolen just enough from OS X to be shiny without being a ripoff. The “gadgets” bar is off by default, and it Just Works.

Which is a shame, because the other article was a lot more fun to write.

Tags: ,
May 24, 2009 - 8:56 AM No Comments

To remove a host that denyhosts has banned

Denyhosts is a utility that automatically bans IPs who attempt to ssh in to your server and get three wrong passwords. This is great when people are dictionary-attacking your SSH server, but less good when you have actual users who might get their password wrong.

The FAQ for denyhosts says how to fix this if it happens and your users are banned, but it’s a bit faffy, so I’m putting my script here. It works for me, it may screw your life up. Backups are your friend.

#/bin/sh
REMOVE=$1

/etc/init.d/denyhosts stop

cd /var/lib/denyhosts
for THISFILE in hosts hosts-restricted hosts-root hosts-valid users-hosts;
do
mv $THISFILE /tmp/;
cat /tmp/$THISFILE | grep -v $REMOVE > $THISFILE;
rm /tmp/$THISFILE;
done;

mv /etc/hosts.deny /tmp/
cat /tmp/hosts.deny | grep -v $REMOVE > /etc/hosts.deny;
rm /tmp/hosts.deny

/etc/init.d/denyhosts start

Needs to run as root or someone with access to all denyhost’s files (plus hosts.deny).

Tags: , ,
May 13, 2009 - 8:29 PM Comments (3)

On subnotebooks

Sometime around mid-March, I was in the market for a subnotebook of some kind. My existing laptop – a swivel-screened Toshiba known as Touchstone – is a bit bulky for day to day carrying, plus it was second hand when I got it, and every single netbook on the market blows it out of the water for specs.

A number of people I know have Asus Eee netbooks, but I’m not fond of them, mostly because the 80% of full size keyboard is a little too small for me to use comfortably (The 1000 model has a 92% keyboard, which is better), but also I’m not that fond of how the machines actually look. Mac user, remember.

Eventually I went for the Compaq Mini 700 (which is a variation of the popular HP Mini 1000, sold only in the states) because it has a 92% keyboard, looks nice, and was being given away free with a 3 3G mobile broadband contract.

I had it just over a week before it – along with my bag, iphone, keys, wallet etc – were stolen, but for that week it was a really nice laptop.

This week I got around to replacing it, and after careful and due consideration I got exactly the same model. It still doesn’t have a solid state hard-drive, but makes up for this by having a decent amount of space. It arrived Thursday morning, and first thing I did was to put the latest Ubuntu Netbook Remix on it. 

I’m not a great fan of the Netbook Remix interface, prefering a more standard Gnome setup (though stripped down a great deal), though I’ve kept the addition that automatically maximizes all the windows. 

Sound was broken by default, but that’s a known thing, and a kernel linked from that thread fixed it.

So now I have a netbook, can get online from anywhere (once I replace the 3G modem) and have no excuse not to update this.

Oh yes.

Tags: , , , ,
May 4, 2009 - 1:39 PM No Comments

Open Sesame

The Open Rights group founding was interesting.

At a talk just over a couple of years ago, organised by NTK, someone suggested that an organisation to protect the rights of people in the UK would only cost a few hundred people a fiver a month, and that there must be enough that this would be possible.

Having fairly publicly put my money where my mouth was a year or so ago, live on Hashlugradio, I’ve yet to regret doing so. And now it’s three years old, and already getting other people schooled.

It’s been a bumper year for digital rights. From HMRC posting half the nation’s bank details to the Darknet, to the ongoing campaign against Phorm, to three strikes and the rightsholder lobby’s so-far thwarted attempt to take control of your internet connection, this year was the year digital rights went mainstream. (ORG is 3, Nov 08)

So if you give a damn about protecting your rights online and off, I’d recommend throwing a couple of starbucks worth of change at the ORG each month, in return for a warm glowy feeling, a christmas party with no karaoke, and the possibility that the rights you’re guarding are your own.

But the leap from 750 to 1000 fivers received each month is not yet enough to guarantee us long term financial stability. We must reach our target of 1500 fivers before the end of the year. And we can’t do that without you. (ORG is 3, Nov 08)

Go now. Go quickly. We only have a few months to save the world

November 19, 2008 - 11:03 AM Comments: Closed

Genius Trial

September 10, 2008 - 1:14 PM Comments: Closed

« Older Entries