Peter's Blog

Redefining the Impossible

Items filed under knoppix


One justification I have for not installing Vista on my home pc is that it is set up for raid 0 and I am not sure that Vista comes with safe drivers for the disk controller, given Vista's notorious lack of drivers. I admit I haven't done any research into this, otherwise my justification might vanish.

On a passing whim I decided to try booting a Knoppix 5.1 CD on it. As is usual with Knoppix it Just Worked ('Just' in the sense of 'merely', rather than 'a moment ago' as it takes a couple of minutes to Just Work). I was able to browse the Raided partition. It ran ok, if sluggishly and at some feeble display resolution: it didn't seem to know about 1920x1200 mode.

I think there used to be a way to hack together a Windows live CD. I'm don't know if it has been figured out for Vista but I'm not sure I care: a knoppix disk can reset passwords but a Vista disk is probably Hamstrung.


Filed under: knoppix vista

Add a comment

Somebody at work was fiddling with the fuse box and took out all the servers in the IT room. I rebooted them all but our main file server wouldn't boot, the hard disk partition was fried.

I used a knoppix CD (excellent tool for any pc that won't boot from its hard disk) to delete the corrupt partition and then reinstalled Windows 2k server on it. Experience has taught me that there is little point in trying to repair windows installations. Fortunately this file server is set up with two disks, one for the OS and another for the data. This is a nice arrangement as if either disk dies, that's approximately half the work required to get the thing back up. I only had to reinstall Windows.

Things were back online by lunchtime, the only problem being that one of the computers in the building was unable to access the new shared file system: mine! Vista strikes again (this is one reason why I am using Vista, to iron out these sillies). It wouldn't connect to the file share without prompting for user name and password and it wouldn't accept any that I gave (apart from those for a local account on the PC, it wouldn't accept domain account details).

I decided the problem may be that in my haste to get the files online and people working, I omitting to install the latest service packs on the server. I ran the setup for service pack 4 and then remotely rebooted the server from home early this morning while nobody was using it. I connected to it using an ssh tunnel and ultravnc. For reference, the ssh tunnel command was:

ssh -L 5900:192.168.0.54:5900 me@work.com

This is saying, 'connect port 5900 on the pc 192.168.0.54 on the remote network to port 5900 on my local pc'. I connected to a linux server and used this as a relay to connect to the file server. I was able to open ultravnc at 127.0.0.1:5900 and see the windows desktop of the file server. Secure, magical, free. Yes, I could do all this with VPN's, Windows Remote Desktop, Terminal Services or whatever but ssh/vnc is much easier to set up and is immune to random weird Active Directory problems.

I opened 'Computer Management' and 'Shared Folders' and 'Open Files' which gives a nice list of who is using the file server. One user had 'desktop.ini' opened, nothing important so ZAP.

Anyway, the service pack did the trick and when I got to work Vista connected instantly.

Lessons learnt:

  • Know where the Windows Install disks are
  • Have the licence numbers printed and hung on the wall (not in a file on the server that just died, in an Access 2003 database, in a room full of servers with no copies of Access).
  • Buy a UPS, although it runs the risk that nothing ever fails and everyone thinks administration is easy. With the right tools it is, but don't let the world know.

4 Comments

Knoppix live DVD appears to work or I wouldn't be typing this.

It was a 3G download which I did using ftp via Filezilla as a bittorrent download would have taken something like two days. Even with ftp it took seven hours.

Blew it with nero straight from the iso file using my new dvd writer, rebooted and it Just Worked: nice.

I tried the tux racer game but it ran at about 1 fps. This pc has video integrated into the motherboard and is pretty awful in lunix, I haven't investigated but it doesn't appear to use any 3d acceleration. Screensavers in ubuntu are poor. I have a spare AGP slot and I might even be able to find an old AGP card to go in it. Something else for the todo list.

Booting from the Knoppix DVD I suddenly realise why read speed is more important than write speed. Slow on the uptake or what?


Filed under: knoppix ubuntu

Add a comment

knoppix is a version of linux that boots from a CD. This means you can run linux without having to install it. Apart from being a Linux showcase it is very useful for fixing problems in Windows (resetting passwords, undeleting files etc).


Filed under: knoppix

Add a comment

Due to some finger trouble in Salamander I accidently deleted some files. Oops.

I could have installed an undelete utility such as freeundelete but downloading it or installing it could have damaged the remains of the deleted files on the disk (as far as windows is concerned the space the files are occupying can be used to store something else) so I thought I'd try knoppix. It transpires that Knoppix 4 includes a utility called ntfsundelete to undelete ntfs files so I gave it a try:

  • reboot pc in knoppix. I used knoppix 2 as the start parameters to start in text mode so I didn't have to wait for a gui.
  • ran:
    ntfsundelete /dev/hda1
    
    and it listed the potentially undeletable files on my ntfs partition. There were a lot of them.
  • ran:
    ntfsundelete /dev/hda1 -m *.py
    
    and it listed just the python files, as the file I most wanted to undelete was python.
  • ran:
    ntfsundelete /dev/hda1 -m *.py -u
    
    and it undeleted the python files. They were in the current directory, knoppix's ram drive, i.e. it didn't try to write them back to the ntfs disk. This is very good, it means that if it failed it is unlikely to have ruined the ntfs drive.
  • look at my file:
    cat blah.py
    
    and argh I get funny characters and rubbish at the end of the file. Panic. Dissillusionment.
  • Open file in vim and it seems that the file is there but a load of rubbish has been added to the end. Maybe ntfsundelete does not now how long the file is and can only restore the whole sectors it was in? Conjecture. Anyway, in vim, delete the rubbish at the end of the file.
  • Use sftp to copy the file somewhere safe.

Conclusion: success, albeit not as clean as I would prefer. I do like the idea of being able to undelete the data with the partition read-only so if I fail miserably I can try again with some other tool.

Knoppix 2 Windows 0.


Filed under: knoppix windows

1 Comment

Gave someone a pc with a spanking new Windows 98 install on it and the first thing they did was install software on it and broke it. After a reboot Explorer gave a page fault in explorer.exe and the system was totally useless. This even happened in safe mode.

I suspected that the software installed much more recent versions of the system files and broke the otherwise 1998 vintage installation. I did a google and found q296211 which looked like a solution.

I ran through the procedure, using a dos boot disk to extract system files from CAB files until I came to comctl32.dll when the extract utility kept running out of memory. I tried installing himem.sys to no avail.

So I tried knoppix. It wouldn't boot on the pc in question so I had to whip the hard drive out and put it in another pc that I knew ran knoppix. Once in there I had to edit /etc/fstab to add rw access to the drive and then mount it. I then used the cabextract utility that comes as standard with knoppix:

cabextract base4.cab --filter comctl32.dll

I repeated for all the files mentioned in the article as I didn't want to mess about too much.

Fortunately the hard disk contained a copy of the windows 98 setup files, including all the cabs, otherwise I would have had a problem with knoppix occupying the cd drive.

Anyway I unmounted the drive, put it in it's box and problem solved. Windows 98 popped up a dialog to say someone had been tampering with comctl32.dll but when I rebooted and it didn't complain again.

Conclusion: knoppix is better than a dos prompt for fixing windows.


Filed under: knoppix windows

1 Comment

User has left and taken his Windows 2000 password with him. Great, I get to try resetting the password using knoppix. This is based on this with minor corrections and using Knoppix 4.0.

  • Boot pc with knoppix
  • Go to http://packages.debian.org/unstable/admin/chntpw and download the i386 version to the home directory
  • Run
    alien --to-tgz chntpw_whatever
    tar xvfz chntpw-whatever.tgz
    mv ./usr/sbin/chntpw .
    
    which should leave a file called chntpw in the home directory. You may get warnings about not running these as root but they don't seem to matter. Use sudo if it bothers you.
  • Run
    sudo vim /etc/fstab
    
    and change the fstab entry for your NTFS partition from ro to rw so you can write to it.
  • Mount the ntfs partition, e.g.
    mount /mnt/hda1
    
  • Go to the appropriate directory, e.g. for Windows 2000:
    cd /mnt/hda1/winnt/system32/config
    
    For Windows XP (which I haven't tried this on):
    cd /mnt/hda1/windows/system32/config
    
  • List Windows 2000 user accounts:
    ~/chntpw -l SAM
    
  • Reset password for a particular user:
    ~/chntpw -u username SAM
    
    when prompted, set the password to * as this will reset it. Trying to set a new password doesn't seem to work.
  • Get out of the directory and unmount the partitions
    cd /
    umount /mnt/hda1
    
  • reboot into windows

It took me three goes to get this to work, the above procedure succeeded. When it failed windows locked the account out completely which was disturbing. However, when I ran chntpw on the account it saw it was locked and offerred to unlock it which it succeeded in doing.

To compensate for potential security breeches from this, here is a security tip. If you are worried about security I would suggest locking your pc in a safe with the network disconnected.


Filed under: knoppix linux windows

2 Comments

One of the computers at work died yesterday. This pc happened to have some report generation software on it that was written by folk long departed and not backed up anywhere. On investigation today both of it's hard disks were fried, putting them in three other pc's, one of them was not recognised by the Bioses, the other had a corrupt partition table.

I did some googling and discovered that knoppix comes with a tool called 'gpart' which attempts to guess the partition table (guess partition: gpart, geddit?). I downloaded Knoppix 4.0 and tried running gpart but no joy.

As the two drives were identical I then tried swapping the drive electronics and now the Bios could see the other disk but the partition table was also toast and gpart gave an IO error.

In conclusion, failed to restore anything. However, I still think knoppix is has great potential as a data recovery tool.


Filed under: knoppix linux

Add a comment

Needed to copy some files from someones Windows 2000 box but they were away. How to do it?

  • Boot PC with knoppix
  • mount -t ntfs /dev/hda1 /mnt/hda1
  • CD to desired directory
  • Use rsync to copy files to server

Job done. Passwords? Who cares?

The boot didn't go so smoothly, it seemed to have problems with the sound adapter and X wouldn't boot properly. I got tired of waiting for X so I pressed ALT-F4 to get a login console and did it in text mode. I really should be memorising the boot option for a runlevel without X.

Repeat after me:

knoppix 2

Moral: encrypt your files.


Filed under: knoppix rsync

Add a comment

I bought a book, Knoppix Hacks. It is a collection of 100 things you can do with Knoppix, the Linux 'Live CD' distribution that simply boots from a CD. Knoppix always seemed to me like a technology demonstration: clever idea, nicely implemented but how much use is it? Boot linux from a CD, try out some apps, cannot save anything to hard disk, cannot do any real work.

Many of these hacks simply make me aware of the tools that are available. For example, the dd utility for cloning hard disks, including the ability to copy a disk through an ssh connection and dump the contents on a different pc. There are enough tips on linux system repair, data recovery, running temporary emergency servers etc here to really put me off using a windows based server system.

Speaking of Windows, it turns out that Knoppix is more useful for repairing windows boxes than the Microsoft recovery tools, which I have found to be pretty poor. Why fix a pc using a primitive command line prompt that takes about 15 minutes to boot up, when you could use a gui? The Windows hacks include how to reset the Windows passwords, hack the registry, run virus checkers, all from linux on a comatose windows installation.

Moral: don't let anyone into your data centre clutching a CD.


Filed under: knoppix linux

Add a comment

knoppix is a linux distribution that has a claim to fame that it will boot from a CD. The idea is that you blow it onto a CD and then put this CD into (almost) any pc and boot it up into linux without having to install anything on your hard disk. It's a great party trick and can be useful in desperate situations.


Filed under: knoppix linux

Add a comment

Installed new linux system on my server. Actually I intend to use it as a TV... anyway I finally decided on a distribution.

Gentoo:

  • previous distribution
  • too much hard work and nursing and random breaking

Knoppix:

  • confused as to whether it is supposed to be installed and used or just booted from live CDs as a party trick
  • worked with my TV card

Redhat:

  • the MS of the linux world. Used 7.1 yonks ago and was not impressed.

Suse:

  • Used for a long time (6.1, 6.3)
  • Slow ftp servers however many years ago
  • Ended up compiling everything as I could never find rpm's

Slackware:

  • First ever distribution I tried, years ago, from a cover disk on a magazine
  • Is it still going?

Ubuntu:

  • related to Gnoppix and Debian
  • very hard to remember the spelling. I think of it as umbongo. Umbongo, Umbongo, they drink it in the congo.
  • tried live CD (600M, 2 hour bittorrent download) and PC went into a constant rebooting loop
  • tried installation CD (600M, 2 hour bittorrent download) and PC went into a constant rebooting loop
  • don't remember a linux installation ever failing so bad.
  • it's boot screen just shows Ubuntu, a logo and a progress bar: I want boot logs.

Finally went back to Debian Woody:

  • It's low level enough for me without the Gentoo level of hastle and constant breaking.
  • I like apt: want to try something? It's installed in minutes.

Filed under: gentoo knoppix linux mp3 ubuntu

2 Comments

Since I flashed my DLink DI624 last week I haven't had any annoying/weird connection problems. So either:

  • Flashing DI624 fixed annoying/weird problems
  • WiFi using neighbours are on holiday
  • It's a flash in the pan and will start again, worse than ever.

Right now I have a UltraVNC window open on my laptop controlling my desktop PC upstairs while it burns a Knoppix ISO downloaded with BitTorrent using ISO Recorder.

Cool cool


Filed under: di624 knoppix wifi

Add a comment

I could do with a TV in my computer room. I have my old Gentoo server and a Pinnacle TV card sitting idle. I thought I would try just booting a Knoppix CD and seeing what I got. It booted ok and looking through the multimedia applications I found Xawtv, a TV application. It had a good go at searching for TV channels but it didn't find any. I faffed about for a while, setting up different types of TV card and tuner chipsets, but no joy. It didn't tell me it was broken but it didn't work either, all I got was a black TV shaped window with some noisy coloured pixels at the top. It my well be because of the aerial connection (in fact driven from my Sky Plus box downstairs, via a booster/distributor box) but it's too much hastle to grab a portable TV and check that out.

Knoppix: Works nicely. Possibly a good replacement for Gentoo as long as it has good package support.

Update: spent the afternoon on this and here are the conclusions:

  • The card is a Pinnacle PCTV Rave
  • It uses the MT2050 tuner chip which is not supported by the bttv drivers on the version of Knoppix I am using (17-7-04).
  • Patches exist but not sure they will work on a live CD. I'll try latest Knoppix before installing something properly.

Update:

The tuner works with Knoppix 3.6 (2004-8-16) running the 2.6 kernel (i.e. with the boot option 'knoppix26). The picture is very noisy, looks like a lot of processor noise. I'm thinking of installing properly, rather than just using a live cd. Choice of distribution? Knoppix, Debian, Ubuntu...


Filed under: gentoo knoppix linux sky+ ubuntu

Add a comment

Using Bit Torrent to download the lastest Knoppix CD. It's coming down at about 60KB/s which is as high as I ever see. It's uploading at 8k/s so I'm doing someone a favour.

It is intersting in that it is a python application. It normally uses wxPython for it's gui and it installs only the following files:

  • bittorrent.ico
  • btdownloadgui.exe
  • datetime.pyd
  • library.zip
  • LICENSE.txt
  • python23.dll
  • redirdonate.html
  • select.pyd
  • uninstall.exe
  • w9xpopen.exe
  • wxc.pyd
  • wxmsw24h.dll
  • zlib.pyd
  • _socket.pyd
  • _sre.pyd
  • _ssl.pyd
  • _winreg.pyd

Interesting, just the dll's that are necessary. It does make it big though, this lot adds up to 10M, mostly unused library code.

The source includes a headless version that runs a treat on the Gentoo box so I have no qualms about leaving it running to upload to my peers. There is a Gentoo ebuild for bitTorrent but that has a whole lot of dependencies, including gtk and wxPython, which it wanted to build from source.

Interesting, just the dll's that are necessary. It does make it big though, this lot adds up to 10M, mostly unused library code.

The source includes a headless version that runs a treat on the Gentoo box so I have no qualms about leaving it running to upload to my peers. There is a Gentoo ebuild for bitTorrent but that has a whole lot of dependencies, including gtk and wxPython, which it wanted to build from source.


2 Comments