Category Archives: Tech - Page 3

Configure Windows XP Network Settings from the Command Line

Once upon a time batch files were king in the PC world. Hardly a magazine issue, BBS discussion or user group meeting would go by without one of these handy scripts to add some functionality or usability to systems. Since the reign of Windows batch file programming has been on the decline. Of course shell scripting remains popular and extremely popular in Linux where most settings on the system are still controlled by text configuration files and command line utilities but in Microsoft land the script has been largely supplanted.

Even though the NT based operating systems (NT, 2000, XP, etc.) have actually made significantly more configuration available from the command line and there was a push for a new ‘Windows Scripting’ language these things have become largely forgotten and there are now an extremely limited number of users comparable to the Windows operating population which are comfortable writing scripts to automate things in Windows. Even among large corporate IT departments where there is perhaps the most to be gained by writing these sort of mini-utilities scripting is a dying art. One of the reasons for this is that most magazines and technical publications no longer regularly mention scripting or command line configuration utilities so there is a limited opportunity to learn about these tools.

Nevertheless these tools exist and when you find them they can be extremely useful. Take the “netsh” program for example. This handy little tool allows you to set and manipulate many of the Windows network settings from the command line and when combined with scripting it is possible to create scripts which will completely reconfigure your network interfaces (say from DHCP to a static address to another static address) for various network configurations all with the simple execution of a script.

You can learn more about this powerful tool from a few different Microsoft sites but while these provide some syntax and information perhaps the best place to get started is at one of the third party sites which covers it. Or now that you know about the utility you could just start experimenting with things.

For example running the “netsh -c interface dump” command will dump all kinds of interesting information about how your interfaces are currently configured to the prompt. It’s possible to capture this information to a text file and then ‘replay’ the data to reconfigure things as they currently are using something like “netsh -f netsettings.txt”

Keep the art alive!

D-STAR Projects

One of the many misconceptions about the D-STAR digital amateur radio protocol is that it is closed and will prevent tinkering by hobbyists. This turns out to be far from the truth indeed. Last year at the Dayton Hamvention there were several exhibits by D-STAR enthusiasts which included an entirely home brewed D-STAR radio and a home brewed D-STAR repeater controller. Well now someone has built a DV interface adapter which can provide a D-STAR digital voice interface on many existing transceivers. Of course some functionality is missing as there is no ability to change various DV settings from the minimal interface but it proves yet again that there is the possibility for much experimentation with this new digital mode.

On other fronts the OpenDSTAR group has released several software tools which build on existing commercially available repeaters and Internet gateways to extend functionality. Still in the pipe from that group is a USB dongle called the DV Dongle which will allow end users to encode audio in the AMBE format used by D-STAR digital voice for later playback through the repeater or, ostensibly, for live PC to repeater communications. Indeed the home brew spirit of amateur radio is alive and well in the world of digital communications, it just looks different than it has in the past.

Keeping an eye on system security

A few months ago I learned of an interesting website called myNetWatchman. This is a very interesting and free website which aggregates firewall logs from various sources around the Net (you are free to contribute your logs as well) and analyzes them for trends and potential infections by IP address. System administrators are then able to enter IP addresses of servers they manage into the site and see whether those servers have been exhibiting any malicious behavior towards the monitored firewalls. This is just one additional useful tool for sysadmins to monitor the behavior of their servers.

Free utility to create ISO CD-ROM images

Occasionally I have the need to have someone who is not as technically literate as myself send me a CD image. In the past I’ve recommended a number of shareware utilities (most of which are for ISO manipulation including extraction) but these are often more powerful than what the person needs and the associated cost is a disincentive. More recently I’ve found a piece of freeware from Lucersoft called LC ISO creator which does nothing but create ISO images of CDs and DVDs. It’s pretty difficult to make a mistake with a piece of software this simple.

Now if only there was a good open-source cross-platform GUI ISO manipulation utility that allowed for the creation, extraction and modification of ISO files. I’ve been really happy with InfraRecorder so I’m hoping something similar comes along in this vein.

Open Source CD Recording in Windows

Just last year I was lamenting about the lack of good open source CD recording software for the Win32 platform. I’ve been thrilled with k3b for Linux and was hoping that someone would come out with something similar for Windows. As the formally great Nero Burning ROM software has become more and more a bloated piece of junkware there have been several interesting developments on the CD recording software front.

First, the very unofficial “Nero Light” and “Nero Light Micro” setups of the Nero software have become increasingly popular with people “in the know”. Not produced by Ahead Nero Software these are slimmed versions of the Nero trial version from the Ahead software page which can be activated with a regular Nero key but which contain far less bloatware (13-35MB instead of 170+). While I haven’t tried them myself I hear they provide the most used functionality without throwing in the kitchen sink. Nero has grown far beyond simple disc burning software which is all I ever used it for and which has caused me to leave it behind.

Second, there are now two open source contenders for CD recording in Windows. Both are technically frontends to a Windows port of the command line cdrecord engine but so is k3b (requires Linux) which has been my favorite since dumping Nero. Even though I do most of my burning with k3b in Linux these days it is occasionally useful to burn something in Windows so I’m testing these as replacements for Nero on that platform.

Both cdrtfe and InfraRecorder provide basic CD burning capability on the Win32 platform though there are a few advantages and disadvantages to each. Cdrtfe is a bit more mature software but is also more complicated, has a less familiar interface and, let’s face it, not the best name in the world. On the other hand InfraRecorder is a lot easier to remember, has a clean, slick interface and is quickly gaining momentum but is quite a bit newer and has fewer configuration options at the moment. Personally, I really like the way InfraRecorder looks and feels which does count for something in software design and I’ve heard great things about the primary developer Christian Kindahl so I look forward to watching this product mature. Both packages allow for basic CD/DVD creation as well as ISO image burning and should already serve the majority of users’ needs, best of all they are both free and open source solutions.

Booting DOS from a USB flash drive

**UPDATE 2014/02/21: Times have changed and you might want to check out the Rufus utility I mention here as an alternative to these technical instructions.**

USB flash drives also called USB keys, pen drives and an assortment of other names can make quite handy reusable boot disks. Today I found myself in need of a DOS boot disk to upgrade the firmware on some hard drives and CD/DVD drives but didn’t want to burn a bunch of bootable CDs or try to find a USB floppy disk drive. I remembered that most newer BIOSs including the one on this system support booting from USB drives so I thought I would investigate that as an option. Unfortunately I found that, being an afterthought, boot support is not an easy thing to do and presents several challenges.

First and foremost is that while there is some information on how to accomplish this on the Internet, there is comparatively little and what information does exist is not as clear or definitive as would be useful. Secondly, there are a number of different methods and tools for accomplishing this and not all methods work with all BIOS implementations of bootable USB. For example, USB flash drives may be booted as fixed disks, floppy drives or USB-Zip drives each of which requires different methods of preparation and the requisite support in the BIOS. Both of the methods I will describe hear treat the flash drive as a fixed disk which seems to be the best method if your BIOS supports it and appears to be becoming the standard for new BIOSs. While these methods are based on readings of other guides and howtos I was unable to find something as simple as I describe here so this method was developed on my own though research based trial and error (and lots of reboots) over the better course of a day.

In its simplest description booting from a flash drive as a fixed disk works almost exactly like booting from a hard disk does. The BIOS invokes the boot sector and master boot record (MBR) on the flash drive which loads the operating system kernel. It would initially seem that it should be no problem to make this work, after all DOS based operating systems worked this way for years. The trick is getting the boot sector and MBR on the flash drive. In ye old DOS days when you wanted to install DOS from a floppy disk onto a fixed disk it was common to invoke the FDISK and SYS commands to create a MBR, boot sector and copy the required system files. The problem is that in most cases the USB flash drive is being prepared from within a recent copy of Windows such as Windows XP which no longer has these commands available for this use. On the other hand if you booted DOS from a floppy disk or bootable CD and had access to FDISK and SYS you would not (normally, without drivers) have access to the USB flash drive to install the files.

After reading the information that was available on the Internet I determined it would be reasonably easy to create a bootable DOS USB flash drive in Linux and possible, yet convoluted and confusing to do so from Windows. I wanted to avoid requiring the use of Linux because the average user of such a drive may not have access readily available to a Linux system. Most of the solutions for creating the drive in Windows either used a creation utility from HP (questionable availability and suitability) or a slew of command line utilities and requiring a floppy drive (or emulator) which seemed like an unnecessary and complicated hack to me. The solutions I present may require you to download a few software packages from the Internet but each only requires one command line utility and should be fairly straightforward. As an added bonus all of the software is free and open source.

Note that these methods were specifically designed for installing FreeDOS, an open source DOS. Similar methods may work for installing MS-DOS, DRDOS or other DOSs; however you will need to obtain the boot sector (probably either from source or via extraction from a floppy disk or disk image) and system files specific to your version of DOS. I recommend using FreeDOS whenever possible as it is generally compatible and provides many additional features not found in vintage DOSs.

The first method described is the FreeDOS direct booting method. The advantages of this method are that the drive boots directly into FreeDOS and requires no files on the flash drive root other than the FreeDOS system files (kernel.sys and command.com). The disadvantage is that you must download an additional software package and FreeDOS is the only OS you may boot from the flash drive.

The second method is the SYSLINUX chained booting method. Advantages to this method include more configuration and customization options and the ability to boot floppy disk images and/or other OSs from the same flash drive using a boot loader menu and chained boot loading. None of these enhancements are covered here, this document will only help you get FreeDOS up and running, for information on booting other OSs from the same drive see the SYSLINUX documentation. The disadvantages of this method include three additional files in the flash drive root (can be moved into other directories, see SYSLINUX documentation) and a slightly more complicated (though transparently so) boot process.
Read more »

Mounting Floppy Disk Images in Windows

It’s fairly easy to find information on the creation and use of CD images. Many solutions, both commercial, shareware/freeware and open source allow CD/DVD images to be created and or mounted for use without actually burning a disc. A bit more esoteric, especially in the world of Windows based systems is the floppy disk image and knowledge of them is shrinking, not growing.

Back before bootable CDs (and support in BIOSs) were common most Linux distributions distributed a boot disk image to go along with their CD so it was not uncommon for the power user to encounter a disk image. In these cases a DOS compatible utility called rawrite (or in more advanced distrobutions WinRawrite) could be used to write the image to a disk or, conversely, read a disk to an image file. In *NIX based systems such functionality, and the functionality of mounting a disk image without using a physical disk is usually built in to the operating system. Disk images have also been more common among Macintosh users going back many years with the Apple Disk Copy utility but especially in recent years with OS X where “Disk images have become the preferred transport mechanism for downloading files…” Still disk images remain fairly uncommon among Windows users, especially as floppy disk drives themselves become increasingly uncommon.

Because of my interest in vintage computing and vintage software I store much of my old software that originally came on floppy disks in disk images on my server. Creating the images from physical disks is fairly straight forward using WinRawrite but in some cases I have earlier copies of disks done in a proprietary self extracting image format which only can write the image to a physical disk. Obviously I would like to get all my images in the standard raw format but without spending the time to write each image to a physical disk and then reading it back with rawrite. Today I located a handy tool called Virtual Floppy Drive which works similarly to the virtual cd drive tools in that it can mount a disk image or a “blank” image to a drive letter on your system. This allows me to then run the proprietary self extracting image and “write” the image directly to a raw file. The tool is also handy if you want to create an image from scratch for distribution or edit an existing disk image.

A bit about copyright

Copyright was in the news again recently. Researcher Rufus Pollock has written a new paper in which he both qualitatively and quantitatively makes a case for limited length copyright being a better incentive than perpetual (or lengthy) copyright for the creation of new works (the goal of copyright). If you don’t want to read the full paper a review of it is available from ars technica. Pollock has also written in the past about the value of the public domain. Though his most recent paper is not as strong as other critics of current intellectual property policies (see Boldrin and Levine who suggest it provides no incentive and that it be abolished altogether) it provides an important (and perhaps more reasonable point to start discussing the purpose, success and benefit of intellectual property to society.

There’s more than Chernobyl and Three Mile Island

One of the classes I teach at the University of Minnesota is a course on Technology and Public Ethics. In this class we attempt to uncover some of the social and ethical issues surrounding technology. In some cases technology is a solution to a social dilemma and in other cases it creates or contributes to the dilemma. One topic we look at is the production, transmission and consumption of energy. In the study of society and ethics cut and dried answers are few and far between, such is the case for nuclear power.

While nuclear power has traditionally been viewed with disdain because of a lack of understanding about how it works, the dangers involved and the question of nuclear waste it is again being discussed as a power production option as we become more concerned with the causes and effects of global warming, specifically carbon emissions such as those from traditional power generation sources. In the end nuclear power may provide an important supplement to renewable energy sources in combating the problem of carbon emissions. Before arriving at a conclusion like that it would be important to understand concerns surrounding nuclear power. For the most part these center on the potential for disasters and nuclear waste. While many people have heard of the Three Mile Island incident in the United States and the Chernobyl incident in the Ukraine (see this posting) these are certainly not the only incidents on record.

Two incidents that took place much earlier in the history of nuclear reactors were the Windscale (U.K.) and SL-1 (U.S.) incidents. Thanks to the web you can read about these incidents from several sources:

In addition to these reactor incidents there have been many incidents or close calls in research laboratories which, while they do not generally pose a significant threat to the general public, are dangerous for those in the immediate vicinity.

There is also the question of what to do with nuclear waste. One might argue that a sound policy is the reprocessing of nuclear waste into less harmful and more useful/reusable isotopes and while this has been met with success in Europe it is not currently policy or procedure in the United States where indefinite storage is used. The current plan is for waste to be housed deep underground at Department of Energy storage facilities (Yucca Mountain and WIPP). One of the challenges posed by this plan is a desire to warn future generations of the potential hazards in these locations when all current languages might be lost. This article explains some of the proposed solutions for just this problem.

Handy tool for sheetmetal cutting

Yesterday I was introduced to the TurboShear by Malco which is one of the greatest innovations I’ve seen in sheetmetal work. Instead of using a hand or electric shear for cutting the metal this devices chucks into your cordless drill and allows much more precise cutting (such as square corners) than electric shears and is much faster than hand shears. Shears also work well for cutting vinyl, steel mesh and other similar materials. Malco also makes a heavy duty and fiber cement board version of the product though for basic sheetmetal work such as HVAC ducting the standard TS1 seems to do the trick just fine.