Home   About   Contact   Log in

Posts Tagged ‘Linux’

Server all sorted now

August 24th, 2008 | No Comments | Filed in Technology, blog365

After spending all night and day shuffling data off old hard drives onto my new terabyte drive, everything is complete. Some of the drives in my server were really slow and it’s only because it was attached to my network that I never noticed. My main video drive, for example, was managing a whole 2 megabytes per second. It took ages to empty that!

After removing the five old drives and the ATA controller card the machine draws 100w of power. I have left the kill-a-watt plugged in permanently and will watch it out of mild interest. Strangely the UPS draws 50w with no load.

With all my data moved across I have 583GB of space free. This should do me for a few years if I remember to clean up and periodically delete accumulated junk.

For those of you who are interested, have some stats:

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      121601   976760001   83  Linux

Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: MAXTOR STM310003 Rev: MX15
  Type:   Direct-Access                    ANSI SCSI revision: 05

/dev/sda1:
 Timing cached reads:   578 MB in  2.00 seconds = 288.34 MB/sec
 Timing buffered disk reads:  226 MB in  3.01 seconds =  74.98 MB/sec
Visit my other sites: Photo Gallery | Insane in the Membrane | Main website

One Terrorbyte of space! (or around 870GB if you can count properly)

August 23rd, 2008 | No Comments | Filed in Technology, blog365
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda3              14G  2.0G   12G  15% /
varrun                221M  300K  220M   1% /var/run
varlock               221M     0  221M   0% /var/lock
procbususb            221M  120K  221M   1% /proc/bus/usb
udev                  221M  120K  221M   1% /dev
devshm                221M     0  221M   0% /dev/shm
/dev/hda1              99M   32M   63M  34% /boot
/dev/hdb1              58G   39G   19G  69% /data
/dev/hdc1              38G   12G   26G  32% /data/pub/pictures
/dev/hdd1              74G   54G   16G  78% /data/pub/audio
/dev/sda1             113G   57G   51G  53% /data/backups
/dev/sdb1             147G  131G  8.3G  95% /data/pub/video
/dev/sdc1             917G   17G  854G   2% /mnt

See the tiddly hard disks that are mostly full in that list? They’re all going to be removed and replaced with that nice, shiny 1TB drive. Rather than having six drives in my computer chewing away at my electricity bill, there will be two - a PATA boot drive and the SATA data drive.

Copying the data across takes quite a long time though.

Visit my other sites: Photo Gallery | Insane in the Membrane | Main website

Linux is doomed

August 7th, 2008 | No Comments | Filed in Technology, blog365

Over on his blog Thoughtfix has written about why he thinks Linux on mobile devices is doomed. Having read the post, I can see his points and think the argument is valid for desktop Linux too, but he suggests a few ideas that would be exceedingly hard to implement

“Linux has the opportunity to learn from these competitors and blow them away.”

And yes, it does… but who is “Linux”? Arrange me a meeting with the CEO of “Linux” and its board of directors. That can’t be done, can it? There’s no one person in control, no one single vision or direction keeping things consistent… There’s just millions of individuals running around doing what they (or their own little communities) think is best.

He also says

“I hope some company is strong (or wealthy) enough to provide developers with the tools, distribution channels, and incentives to provide a rich application directory for their devices.”

But then we’ve just got another distribution out there justifying its existance as being “the one”. Every large Linux distro is the result of someone thinking these exact thoughts and saying “God this is a mess, I am going to sort it out and do things properly”.

The OSS community has, for so long, been hell-bent on competing with Microsoft and getting itself noticed. We’ve done that part now - I can buy a multitude of Linux based devices, my mum knows what a Linux is and compared with five years ago she could probably install it with as much difficulty as she’d encounter installing XP. It’s like winning a war and realising you’ve now got to create some law and order, without causing a riot.

Now the community needs to create some standards for what a “Linux” distribution really is. We’ve got to take the spirit of Open Source and apply it not just to the source, but to the whole concept.

Unfortunately none of this will happen since the instant you tell RedHat users that Debian’s package system is good you’ve got a holy war. And if a large company suddenly pops up and tries to do it, they’ll be knocked down instantly since the OSS community is riddled with people that hate any form of large business for no real concrete reason.

And that’s the whole damn problem from where I’m sat - there’s too many frothy mouthed zeolots running around on crazed holy missions to insert their own brand of Linux into as many PCs as possible, rather than people sitting down together and thinking “OK, so when someone sees a software package on the Internet and they click it… what exactly will happen?”, “They plug in a 1TB external HDD, where exactly will it mount?” “Let’s make KDE and Gnome operate in exactly the same way, with the same file manager standards so that when a user bookmarks their favourite locations in Firefox they can also see them in The Gimp”.

You know, basic stuff that Apple, Microsoft and everyone else has had since they first came out over 20 years ago…

Then again, Linux was never designed with any particular goals, so it’s hardly surprising things are chaotic.

Visit my other sites: Photo Gallery | Insane in the Membrane | Main website

Learning LWJGL, Slick and Slickset

May 14th, 2008 | No Comments | Filed in Programming, Projects, blog365

Printed out the example Space Invaders clone, scribbled all over it to make sense of it. Turns out the old method of learning how to program still works pretty well. I guess I’m a visual learner since the simple act of printing the code onto sheets of paper so I could draw on them caused the code to make sense. I sat on my settee and by cross-referencing the code to the Javadocs was able to work out the boilerplate code from the actual game logic.

I also found the possibly dead, but handy Pixen pixel art package for my Mac.

I’m experimenting with some woolly psychobabble ideas too. My PC is in my office and I do work on it. The work is quite interesting and motivating. I also have my Macbook which I could do work on, if I bought the VMWare Fusion key that I need. My Mac has Eclipse installed though, and the SlickSet stuff all set up. It’s turning into a portable devkit quite nicely, and is currently being my “fun” coding environment.

Sure, I could sit at my PC with its twin 19″ monitors, a mouse and a clacky IBM Model M keyboard and run Eclipse. But my Mac lets me sit in my bedroom and code, or do it downstairs in front of the telly. This portability lets me code when I want to, where I want to. Personal coding is supposed to be fun and amusing, rather than something rigid that you’re paid to do. So anything that makes it more fun is going to help with motivation.

I’ll install Eclipse on my PC at some point, just to check the code runs OK in Windows and Linux. I’ll also commandeer Amy’s PPC iBook to see what it’s like on that too :) She doesn’t know this yet though ;)

Visit my other sites: Photo Gallery | Insane in the Membrane | Main website

No disk space

May 10th, 2008 | No Comments | Filed in Technology, blog365

On my server, PC and Mac… where’s it all gone? What am I going to do?

I think I need to buy some bigger disks and put them in my server. A terabyte should do me. My PC needs its disk sorting out, there’s Linux and Windows squashed in there, along with a data partition. Then I installed a few virtual machines in Windows and now the Windows partition is full.

If I can offload the data partition onto my server, that can be used for virtual machines instead.

Visit my other sites: Photo Gallery | Insane in the Membrane | Main website

Nokia N800, Canola and OGG Vorbis

April 10th, 2008 | No Comments | Filed in Technology, blog365

I managed to stop my Nokia N800 from correctly booting the other day. I had a bit of a “moment” in the terminal and typed “apt-get upgrade” which seemed to go OK - until I rebooted. Then my N800 got stuck in a loop and refused to boot up.

Fortunately I was able to re-run the firmware flasher and re-install OS2008 (getting an upgrade in the process). After that it booted normally and I could begin the slightly irritating task of putting everything back on.

To play music I use Canola which is a really nice media player that, with some minor tweaking will play OGG Vorbis music as well as MP3. Since it’s a bit complicated making OGG Vorbis work at the moment I have included the instructions below:

This comes from the ITT forum post linked to above, courtesy of etrunko:

1) Install ogg-support from application manager (instructions in http://ogg.garage.maemo.org)

2) Install libvorbis0a package manually either using application manager in red pill mode or typing the following command in xterm *AS ROOT*

# apt-get install libvorbis0a

3) Finally, download and install the lightmediascanner0-ogg package using either application manager in red pill mode or typing the following command in xterm *AS ROOT*

# dpkg -i path/to/lightmediascanner/package

Visit my other sites: Photo Gallery | Insane in the Membrane | Main website

Focus Stealing is Bad

March 26th, 2008 | No Comments | Filed in Technology, blog365
From Wikipedia:

Focus stealing is when a program not in focus (e.g minimised or the in background) places a window in the foreground and redirects all keyboard input to that window. This is considered a major annoyance by most users because the program may steal the focus while their attention is not on the computer screen, such as when typing while reading copy to the side. This will cause everything typed after the window appeared to be lost.

(From their entry on Focus Stealing)

Not only might it cause you to lose work, accidentally delete data or send things to the printer, but it really disrupts your workflow. A few minutes ago I was working on a PowerPoint presentation, and had Outlook open in the background. Without warning it just forced its way to the front to ask me the terribly important question of whether I want to AutoArchive my emails.

Would have been much better if it’d flashed the task bar at me instead. With the exception of a critical event such as a battery about to run out, a hard disk in danger of catastrophic failure, or something else where there is an immediate danger of data loss/hardware damage should the user be interrupted.

It’s not just Windows that does this. Yesterday I managed to disable my UPS on my Linux server, but kept the USP software running. Being a critical event, the UPS software started sending alerts to every logged in console in the hope I would see it. I did because it smeared all over my IRC client’s display.

This is a valid time when focus stealing is appropriate. Unfortunately it then became highly irritating since the error message kept appearing even when I was attempting to fix the problem. It’s not easy reading documentation or editing config files when

Broadcast message from (root):

Device ‘BelkinUPS’ is not responding, blah blah blah fix it now blah blah

Is being scrawled all over your screen every 30 seconds.

Visit my other sites: Photo Gallery | Insane in the Membrane | Main website

Serial Terminal Working

March 25th, 2008 | No Comments | Filed in Projects, Technology, blog365

I have made my WYSE serial terminal work with my Linux server. After yesterday’s confusion and frustration I went back to Maplin and bought a few things that made the task very simple. I bought a properly wired DB9-DB9 null modem cable, a DB9 gender changer and a DB9-DB25 adapter.

All it took was for me to connect the DB9 serial cable to the second serial port of the terminal, plug the other end into my server and run a getty. This is how easy it should have been yesterday, but it seems I was using a wire not designed for connecting between PCs and the terminal. God knows what it’s for, but it didn’t work.

I’ve written up a small Drupal book about my method to make this work. Read it here.

Visit my other sites: Photo Gallery | Insane in the Membrane | Main website

Obsolete hardware is obsolete for a reason

March 24th, 2008 | No Comments | Filed in Technology, blog365

I have in my posession an Amiga 500, Amiga 1500, WYSE terminal and a Mac Classic.

Today I learned several things:

  • PCs running XP can’t read 720k floppies
  • Serial communications is still just as confusing as it used to be
  • Old hardware doesn’t work like you’d expect
  • Given the choice between soldering small, fiddly things yourself, or paying  £5 for someone to do it for you, choose the £5 option

One of my aims today was to get my A1500 reading floppy disks, since originally all that happened was an intense squeaking/grating noise would come out the drive, and the computer would have a bit of a fit and complain the disk wasn’t working properly. This was solved, after much faff, by swapping a diskdrive from the A500 and putting it in the A1500. Seems the drives are the same, apart from the fronts of them.

The original diskdrive in the A1500 was quite damaged, either years of fluff and dust had stuck to the read heads, or they were mis-aligned. Either way any disk put into the drive was instantly rendered a dead disk, and received a neat scratch near the edge that went right through the magnetic layer.

PCs won’t read 720k disks any more, so that makes it hard to copy disk images into the Amiga to write them to floppies. After all, writing Amiga floppies on a PC would just be too simple now, wouldn’t it.

The idea with the serial terminal was to hook it up to my Linux machine. This - obviously - meant I had to go out and buy a USB-Serial dongle for my Linux machine, modern PCs having between zero and one serial ports now. Despite being a no-brand one from Maplin, the Linux machine worked out what it was and said it was called ttyUSB0. Now all I had to do was run a getty and connect the serial cable up.

And this is where the trouble began. The cable I have is a null modem cable, with a male DB25 connector on one end, and a male DB9 connector on the other. PC serial ports are also male DB9 connectors.

In Maplin I saw a DB9 Female-Female gender changer, but it was a fiver and at home I have several female DB9 connectors of my own. Surely it’s not hard to make a genderchanger by hand. Yeah, right… whatever. Soldering to those connectors is hard, especially when nobody seems to provide pinouts of gender changers. Do the pins go straight through, as if the two connectors are soldered back-to-back, or do all the pins cross over? I tried both ways and the best I could get was a bit of random garbage in Minicom.

The rest of the day had me trying various cables I own, all of which look like null modem leads, and none of which worked. I will go to Maplin again tomorrow and get a collection of gender changers and serial cables. I want to hook my A1500 up to my PC to transfer files in addition to making this terminal work.

For a test I plugged my GPS into the terminal and after setting the comms parameters, was greeted with NMEA text shooting up the screen.

So, the next time you complain it’s hard making a USB device work, or that it’s such a pain having to install a driver disk, just remember what it used to be like. Is it 19200,8,N,1 or is it 115200,8,N,1? XON/XOFF or RTS/CTS or both? Or neither? And what serial port are you plugged into? And it takes so long transferring files at multi-megabit speeds doesn’t it.

Visit my other sites: Photo Gallery | Insane in the Membrane | Main website

VPNs, SSH Tunnels and my Macbook

March 23rd, 2008 | No Comments | Filed in Technology, blog365

This weekend away has been an excellent chance to test out my home network and remote access to it. Some of the things I’ve done were just as a test, other things have been really useful.

For a start I allow incoming SSH connections so that I can access my server from anywhere outside. I’ve used this for everything from transferring files to setting off backups of my system at home. To maintain consistency between logins, and to cope with faulty Internet connections, I use screen to keep control of my session.

Tip: Use the following .screenrc option to make your many screen sessions less confusing by printing a list of open sessions along the bottom of your display:

hardstatus alwayslastline "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %Y/%m/%d %0c:%s "

In anticipation of other remote connections I might want to make to my machine at home, I thought about setting up a VPN. There are several options, all described in detail across the Internet, so I’m not going into detail about how to configure things, I’ll just explain what I am using and where I found out the information that made it work. (more…)

Visit my other sites: Photo Gallery | Insane in the Membrane | Main website