Category Archives: Linux

Home Improvements – Here endeth the lesson

For the story so far see Part 1 and Part 2. If you’re totally bored, then please don’t read on… this is the longest post yet!

So I got my Linksys NSLU2 home. I thought I’d fire it up and make sure it worked. There’d be nothing more frustrating than flashing it with the Linux OS, find it doesn’t work and then wonder whether the issue is with the new Firmware or the actual hardware.

Plugged it in, fired it up, plugged in and formatted a blank external drive I dug out of the cupboard. All good so far! I can’t plug in a disk with anything on it because the LinkSys requires disks to be formatted with EXT3.

Hmmm… what’s this… a firmware upgrade to the NSLU2 that allows it to read NTFS! That’d make the device usable until I get my head around the Linux options!

Loaded up the upgrade, all went smoothly. Plugged in my external hard drive to see if it works. Get “Drive not formatted” message in the NSLU2 admin screen, so it must not support NTFS after all. Oh well. Plugged the external drive back into my desktop PC.

“This disk is not formatted. Do you want to format it now? Yes/No”

My

heart

stopped.

An entire disk’s worth of data… gone. Video from when the kids were little, lots of photos… gone. I know what you’re all thinking… why wasn’t this data backed up? I have two responses to this. 1) It’s not that easy to back up a 14GB video file. 2) Part of the reason I was setting up this solution is to make automated backups more accessible!

Some have said that I shouldn’t have trusted the device with my data, but in my defence, it’s a shrink wrapped consumer device that’s designed to have drives plugged in to it. If I can’t trust this device with my data, I don’t have much use for it!

I kicked off a File Recovery scan and went to bed very sad.

In the morning, the file recovery had found a bunch of deleted files, but none of the files that were not deleted at the time of the corruption! I tried loading the drive up in a couple of EXT3 file viewers, but they couldn’t read the drive either.

I’d pretty much given up hope of getting my data back.

Then my neighbour nonchalantly suggests I try a partition table repair tool. I load one up and run it. It tells me “The partition table on the disk is incorrect. Would you like to fix it?” I click “Yes”. Bang. All my data is back!!!

Yay! Waves of relief! Not to mention proof that the Linksys had screwed up the disk. The partition table was written for an EXT3 disk, even though it was still formatted in NTFS.

Yesterday I took the Linksys back to Harris Technology and threw it at them as hard as I could. Actually I didn’t and they were incredibly helpful, giving me a full refund without any hassle.

So back to the drawing board. Now that I realise how precious that data is to me, I’m going to have to get a proper, RAID based network drive solution. More money 🙁 I’ll probably go for a Thecus N2100.

Lesson the First
Imagine losing all your data that is not backed up. How do you feel about that?

Lesson the Second
No, really. Losing it. Right now. Seriously, how do you feel about that?

Weigh your reaction to the above questions against the cost of getting dedicated backup.

Here endeth the lesson.

Update: I was talking to Josh last night and he said it wasn’t clear that I hadn’t installed the funky open source firmware on the LinkSys box yet. It was running the latest official firmware release. I probably also didn’t emphasize enough that I wouldn’t recommend anyone buying one of these pieces of junk

Home Improvements – Part 2

I’ve purchased my Linksys NSLU2 🙂

Now I want to make some modifications. The issue is that there are a number of different firmware options to choose from.

My requirements:
– Serve files for media (Basic functionality for all firmware)
– Read from FAT32 formatted external drives (isn’t provided by the base firmware!! The device requires all disks to be formatted!)
Bittorent client
Subversion server

Based on this comparison of different firmware options I’m going to have to look at a full linux based OS. Unfortunately I’ve never used Linux, so trying to get it to work on a small memory/slow processor device is going to be a steep learning curve.

Stay tuned for the next exciting episode.

Home Improvements

I’ve annexed a room at my house to be my ‘den’. First order of business is getting some entertainment in there.

Requirements:

  • Watch DVDs
  • Watch other media from my computer
  • Reasonably inexpensive

My current solutions contains the following components:

  • Xbox running XBMC as a games/media streaming console (just purchased from Global Consoles)
  • Some sort of network storage so I don’t need to have my PC running constantly.

The network storage decision is narrowing down. I considered solutions such as the Thecus N1200. I dismissed this as being overpriced and probably overkill for my needs.

My current front runner is a Linksys NSLU2. It doesn’t have any internal disks, but has two USB ports to plug in external drives. The real beauty of the device (affectionately known as the ‘slug’ by fanboyz) is that there is an open source Linux based operating system that can be installed to it. This adds lots of extra functionality like all sorts of servers (print, bittorrent, iTunes, media/photos). I was even thinking I could install svn on it and it can be my source control repository.

I’ll let you know how my plans proceed. Any advice/comments would be very welcome!

Keeping your PC pure and fast with virtualisation

A couple of weeks ago Josh posted about virtualising your overloaded, slow, not-rebuilt-for-years PC, and keeping it on standby within a new build in case you need anything on it.

How about the idea of keeping that new build clean — putting on only your most frequently used, essential applications, with everything else going onto a virtual PC?

For me, that would mean Office, Firefox, my usual web-building stuff (Photopaint, UltraEdit, Filezilla), Nero, and one or two others, such as perhaps Trillian. I’d draw a line under them, and anything else not worthy of a permanent spot in my Windows setup would be virtualised, possibly in various separate virtual PCs, setup for different roles: one for Visual Studio, one for trying out freebie apps from mags, a Linux setup for LAMP development, one for stupid software that insists on running as Administrator, etc, etc.

Windows 98 under Virtual PCWhat to use for the virtual machines? There’s a few different options.

The freebie Virtual Server will only support Windows NT 4 and above, and only server OS’s, which to my mind would unnecessarily weigh down your virtual machines with more than they need. (Linux as a guest OS seems to be coming.)

Another option is the free VMWare Server, which will host a wider range of guest OSs.

The non-free Virtual PC will host just about any x86 operating system. If you don’t want to try the 45 day free trial, it’ll set you back A$215 or so, or it’s available via MSDN Universal.

A problem would be performance, of course. It’s not like emulating a 2Mhz 6502 under BeebEm. But then, hopefully it’s not as bad as what I’ve seen on my brother-in-law’s PowerPC Mac trying to run x86 AutoCad in Windows 2000.

Nonetheless games and other performance-intensive apps may not perform well under virtualisation, especially if they require particular hardware. And yet they would benefit the most, as they often have installers that wreak havoc on Windows setups, chucking weird-arse DLLs everywhere. As the “Virtual PC Guy” is fond of telling us, a lot of the older games run okay, but newer ones might be a problem.

Maybe the only solution there is to put them on a completely separate computer, or move up to Intel’s latest chips which have better support for virtualisation.

Or give the whole thing up and resign yourself to a slow computer with rebuilds every year or two.

I think I’ll try Win98 with a couple of recent-ish games (say, Midtown Madness 1 and 2) and see how it goes.

A Windows user’s adventures in Linux

Linux penguinFollowing the comments posted in various forums which espouse the various benefits of Linux and having a need to test a setup of “MySQL” database engine, I though, well, lets give this ‘Nix thing a go.

So these observations which follow are of my first encounter with Linux (which occurred about a month ago – early Dec). They are offered for general interest and likely amusement of the ‘Nix aware among you. These comments are longish – but contain just some of the many items I observed.

Remember, this from a person who has never seen or run Linux before spending all my time with various flavours of DOS & Windows.

Firstly, I had armed myself with a couple of different books – a copy of “Fedora Core 4 Unleashed” and a “Linux Pocket book”, both containing recent Fedora core distributions. (online download of ISO vs. Dialup? Hardly. Plus there were instructions in those books)

Then, after checking minimum hardware requirements in the books, I threw together a basic “no frills” PC running what appeared to be more than adequate – P3 600, 3/4 gig Ram, 40 gig HDD, Basic LAN card, old DVD reader, old TNT video, no floppy, no sound, no extras. It booted – good.

Loaded the DVD from the Unleashed book into the drive and hit the reset button. The Linux installer fired up & gave Text or Graphical installer options. I’m a Windows Bloke – so, naturally, I chose Graphical. Spent some time accepting defaults for the disk partitioning and making various choices about what to install. I have no idea what some of ’em related to… but what the heck. Finally get to the “OK, now install it all” & waited….

.. till the installer crashed PRIOR to the disk partitioning step.

U-huh.

Rebooted, started again. This time selected TEXT mode installer.

After quite some time, a couple of dialogs, nominate root password and a *single* reboot (well, now, there is a plus) I was looking at a login screen. OK, so what now?

Login as root. Graphical desktop. U-huh. (Gnome desktop by default, although I believe KDE was also available – I certainly didn’t know enough to feel the need to alter their default choice). Start button (OK, or whatever Fedora calls it) is at top left, not at bottom. I can deal with that. Menu’s …. Goodo. Found a menu item to create user accounts. Umm. Made a user account – yeah, I know you shouldn’t use root accounts for general work. Bloody hell, I wanna share with my Win network, but it would NOT let me create a Login that matched what is already in use on the Win network – I currently use, my logins have a space in ’em… like “Dave Jenkins” Nix didn’t like that. Subsequently my fears that this might cause problems were proved founded!

Anyway created new user account, validated it on my Win box, logged in to Fedora with that.. righto, so now what? From a shell (what, coloured background by default… ummm different) established that MySQL had loaded, and from MySQL docos got the server process running. Great. Now to share it on the network.

Network sharing? Samba, right? Well, frig me, if it didn’t take at least 4 – 5 hours arsing around before I could even get the thing to see my Windows network, let along get it to be able to transfer files back & fwd. At one point, late the first day, I could see Windows shares from Nix, but not the other way. I turned both PCs off and started again the next day – only to fine that, without any further setting changes, Windows could now see ‘Nix shared folder. U-Huh. I cannot explain it – maybe, at that time, like me, the PC had had enough. Combinations of needing new logins created on a Windows box, along with some funny settings (I’ll prolly never find again) which match Windows/sambo logins with local IDs… Certainly it was not easy. I knew that I need to set certain IP settings to what values, but ya think I could easily find where? Of what the new terminology was?

Then to Printers….

Several attempts with different (why would you have several seperate ways to hook up a printer?? At least one I know was referred to as “CUPS”) setup tools, I finally found I had to BLINDLY enter the mappings to the location of the PC/Printer name, ‘cos Nix would not show the printer even existed until AFTER the password access to the printer had been validated. Security, bah… Anyway, I finally got Writer (OpenOffice) to send a formatted line of text to my Windows Printer.. although I did not understand, nor bother, about the cryptic error in the dialog I received AFTER the print had been generated.

And speaking of Security….

Bloody hell. I know many, if not most will want and need a *secure* PC to protect from nasties. In this particular case, I did not. Quite the reverse. This was to be used to test on a local controlled private network. It would never see Internet or unknown source disks and so would not be at risk from foreign nasties. Ya think I could find someway to turn off the high level of security? Fat chance! Every time I tried to do anything I was prompted for the Root Password. Got to the stage where I gave up and was logging in a root to avoid this problem. I couldn’t find a way to get the thing to auto-log in. And I never managed to unbar the ports that MySQL used so I could get to it from a Windows box.

And what’s with everything being configured by TEXT files? Every item in the books say launch this or that config file… (which, when finally found and opened, all, remarkably, look like “ini” files). Now didn’t Windows move on from config by ini files about a decade ago? And unlike the old system & Win inis, it seems to me that there are bazillions of those config files… and not all in the same place either.

And a bunch of other things. A simple “Dir” in the shell doesn’t work. I know its different, but why does EVERYTHING have to be different at the command prompt, but appear like Windows in the GUI? Windows CLEARLY displays my different drive volumes – yeah I s’pose you’d get use to the “mount point” system… but I like my drive letters. Why doesn’t a DVD/CD get auto recognised when you are logged in at the command line? Manual mounting? How quaint…

Open Office “Write” initially looked like Word. Could get to work straight up in there. Ditto for whatever the Excel replacement was (Calc?). GIMP? I’d expect to need a bunch of time to get used to their idea of an interface. Gnome desktop – I could find NO WAY to alter what items appeared in their Applications menu. Further, installing more apps from the disk using the GUI installer changed NOTHING in that menu. I’m not saying it can’t be changed… it’s prolly in a config file somewhere!

Summary: You want to “get to work” straight away? Then stick with what you know. If you want to learn something VERY different – then by all means, try Linux (or Unix or FreeBSD or…). But do not believe what you may have heard that “it is easy” or “you will be up and running quickly”. Expect to take a long time before you’ll be productive. I think some of these “it’s easy” comments may come from people who are familiar with Nix but who have forgotten the various difficulties they first experienced. Remember your first System.ini edit? Or your first venture into ANSI prompt commands?

After this little adventure, I then hear that this, that or the other flavour of Nix would have been better because…. <insert reasons> Well, I am not so sure.

After all that, yeah, I’d have a similar bunch of comments if I was an old UNIX user trying Windows for the first time. I’m not trying to say that Nix doesn’t have advantages or that Windows is better. All I’m trying to say is that there is a *considerable* learning curve to the change.

Two parting comments:
1) After chewing up the better part of two full days (about 1 month ago), that particular Nix PC has sat idle – I’m back to my comfortable and familiar Windows world.
2) The MySQL test install which prompted al this? I dropped down a Windows version, installed it to a XP “server” box, and was up and running remotely from my Windows desktop creating tables and queries *within an hour*.

So, you Nix people, go on, have your chuckle. Now is where you tell me all that I did wrong….

Dave

Playing around with Knoppix

Linux penguinMy 7-year-old son Jeremy shows a fascination for computers. He’s a pretty skilled Windows user (it’s what we run at home), and loves using my sister’s Mac laptop when we visit her. So I thought I’d show him Linux, in the easiest way possible: a bootable version.

Knoppix was tried first. The BitTorrent download (yes, there is a legitimate use for BitTorrent) came down the line at a blistering 150kbps. Simplicity itself to burn the ISO to a CD using Nero, and chuck it into the older of my two PCs.

Alas, ’twas not to be. After doing the auto-configuration thing, it stopped dead. This turned out to be my video card, an aging Diamond Viper V-550. Theoretically a good card (well, for five years ago), it’s hampered by a lack of support, not only from Microsoft via DirectX, but also apparently from Linux distributions. (I know they can’t support everything, but it’s particularly galling with DirectX, because earlier versions worked okay with it, and once you’ve got an incompatible later version, it’s impossible to downgrade, unless you’re feeling very brave or feel like re-installing the entire OS.)

It’s a cinch to change the BIOS settings to disable the Viper, and go for the on-board video, of course. Plus plug the monitor into the other socket. Just not quite the seamless experience I was looking for though.

It did boot up then, though the other thing Knoppix didn’t like was my USB mouse, so it was keyboard-only. Somewhere I have a USB to PS2 mouse adapter, which I can use for this.

By contrast, Knoppix booted up flawlessly on my newer PC, which evidently doesn’t have an orphaned graphics card and a weirdo mouse.

(Though when I rebooted into Windows XP, oddly it thought initially it had two monitors. Coincidence? Maybe.)

I could fiddle with Knoppix to get it working on the older PC, but time constraints and laziness may mean I try other bootable distros first. Other contenders include Ubuntu and Damn Small Linux.

Though now I come to think of it, if I want to do a bit more LAMP dabbling, I should look for something more permanent.

Slow SSL on Fedora

So, I’ve been using Fedora Core 3 (I really must upgrade to 4) and I’ve noticed that SSL – ie HTTPS – is really slow. Logging into eBay took something like a half hour. I consulted someone who uses FC3 as their primary operating system and his suggestion was to disable the firewall. “but…” I protested. The response was simple: “Stop being such a pussy. You’ve got a firewall in your modem.” And I do.

So I did – Applications | System Settings | Security Level got me to firewall configuration, one option of which was “forgetaboudit”. A reboot of the iptables (iptables is the linux firewall: very sophisticated, very powerful, very fragile, requires a detailed understanding of IP protocols to use correctly) later – either by a command line entry (simple – just enter service iptables restart) or a system reboot (easy to remember, but takes a fair old time – FC boot time is longer than XP’s) and the firewall’s behaviour was changed. Then secure logins went just as fast as straight HTTP, and it was clear that the Red Hat Firewall was the culprit.

Hours of searching the web revealed a suggestion for a change to the configuration file, which I went to implement in a restarted firewall – and it was already there. So, to make Firefox – or any other web browser – do fast SSL when it was going slow – you need to disable, then re-enable the firewall. You can do that by picking Applications | System Settings | Security Level from the menu, disabling the firewall, opening a terminal window and entering service iptables restart, and repeating the process but enabling the firewall this time (ensure you have web turned on).

In FC3 the default firewall install doesn’t like HTTPS. And I thought Windows was freaky. I understand the FC4 doesn’t do this crazy shit.

Dead USB port

So, in building the broadband access machine I’ve found a gift computer (twice as powerful as anything else I owned) that was ‘not working’. After loading XP onto and futzing with it for a while, I figured out that doing anything with the USB port locked up the computer… after a while. I tested the theory by running up a memory/CPU intensive game and letting it run for a few hours. It was happy until I transfered some files off the USB stick. Fault identified. If I want to transfer stuff off the machine, I’ll need to get a USB card, or hook up a network. And I think I’ll do the later.

With fault identification complete, I hooked up the broadband modem (Netcomm NB5) via the ethernet connection (given the USB connection wasn’t going to be working on this machine). Entered the IP of the modem into the browser, and got the modem’s login screen. Everything was good, and I shut down all access other than web via port 80 using the modem’s built-in firewall. Connection to the ISP was established, proxies entered into Firefox (not IE – CERT says there are no secure versions), and Google was available. Connectivity proven.

The web browsing machine got Fedora Core 3 loaded on (a simple process), and the proxy setup was repeated with the same results. FC3 comes with a pre-release version of Firefox, so I loaded up the CD with the .gz for 1.0.4 and loaded that onto the desktop. Then I spent a couple of hours figuring out that I needed to be root to install the browser, and where to install it. Having done that, I still haven’t got it as the default browser – that’s still the prerelease Firefox. But I can run up 1.0.4 from the command line, so at least it’s available, and adBlocker is installed, so well and good.

I figure that I’m going to lock the modem down to a single IP address it’s going to talk to, the FC3 machine. Anything else that wants data from the net is going to have to transfer it from the FC3 machine and won’t be exposed to the big bad internet, because I’m not ready to migrate our entire PC collection over to Linux just yet.

Which means I need to buy a switch.

Solaris goes open source

Sun has announced Solaris has gone open source — or at least bits of it, with the rest following soon. An interesting move, against what must be seen as the threat from Linux.

It’s not, of course, under the GNU licence, oh no, but under something called the Common Development and Distribution Licence, which Sun claims is basically pretty flexible, but without requiring derivative works to also be open source.

If you feel like trying it but don’t want the hassle of the 2.5Gb download, Solaris found its way onto magazine cover DVDs recently, including Australian Personal Computer.

Stupid KDE print dialog

The print dialog in KDE is tabbed, and one of the tabs allows you to pick via a radio button:
a) Print everything (default)
b) The following page range, from x to y.
The x and y boxes are enabled. Fiddle with them, drop your enormous graphics document to a single page, press ‘Print’.

And you’ll get the whole document. Because you didn’t pick (b), even though you clearly wanted it, what with changing the page range. And the developers haven’t either greyed out the x and y boxes in response to (b) not being picked, or made it so that changing x or y causes (b) to be selected.

Stupid Linux developers.

Subsequent investigations have discovered that it’s the print dialog from the Gnome PDF viewer. What’s that doing under KDE?
Gnome PDF viewer print dialog